diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 51d1f53d44663..6fd7eb3450c00 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2023-03-21) + +- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2023-04. 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/securityinsights/azure-resourcemanager-securityinsights/README.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md index be7cd5eb6b9ee..954941cdea426 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SecurityInsights client library for Java. -This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-securityinsights - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md index de287165b2a01..e0bf6fc14c787 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md @@ -8,6 +8,10 @@ - [Get](#actions_get) - [ListByAlertRule](#actions_listbyalertrule) +## AlertRuleOperation + +- [TriggerRuleRun](#alertruleoperation_triggerrulerun) + ## AlertRuleTemplates - [Get](#alertruletemplates_get) @@ -45,6 +49,26 @@ - [Get](#bookmarks_get) - [List](#bookmarks_list) +## ContentPackageOperation + +- [Install](#contentpackageoperation_install) +- [Uninstall](#contentpackageoperation_uninstall) + +## ContentPackages + +- [Get](#contentpackages_get) +- [List](#contentpackages_list) + +## ContentTemplateOperation + +- [Delete](#contenttemplateoperation_delete) +- [Get](#contenttemplateoperation_get) +- [Install](#contenttemplateoperation_install) + +## ContentTemplates + +- [List](#contenttemplates_list) + ## DataConnectors - [Connect](#dataconnectors_connect) @@ -69,6 +93,7 @@ - [GetInsights](#entities_getinsights) - [List](#entities_list) - [Queries](#entities_queries) +- [RunPlaybook](#entities_runplaybook) ## EntitiesGetTimeline @@ -101,6 +126,18 @@ - [Get](#fileimports_get) - [List](#fileimports_list) +## Get + +- [SingleRecommendation](#get_singlerecommendation) + +## GetRecommendations + +- [List](#getrecommendations_list) + +## GetTriggeredAnalyticsRuleRuns + +- [List](#gettriggeredanalyticsruleruns_list) + ## IncidentComments - [CreateOrUpdate](#incidentcomments_createorupdate) @@ -115,6 +152,13 @@ - [Get](#incidentrelations_get) - [List](#incidentrelations_list) +## IncidentTasks + +- [CreateOrUpdate](#incidenttasks_createorupdate) +- [Delete](#incidenttasks_delete) +- [Get](#incidenttasks_get) +- [List](#incidenttasks_list) + ## Incidents - [CreateOrUpdate](#incidents_createorupdate) @@ -149,6 +193,14 @@ - [List](#operations_list) +## ProductPackageOperation + +- [Get](#productpackageoperation_get) + +## ProductPackages + +- [List](#productpackages_list) + ## ProductSettings - [Delete](#productsettings_delete) @@ -156,6 +208,14 @@ - [List](#productsettings_list) - [Update](#productsettings_update) +## ProductTemplateOperation + +- [Get](#producttemplateoperation_get) + +## ProductTemplates + +- [List](#producttemplates_list) + ## SecurityMLAnalyticsSettings - [CreateOrUpdate](#securitymlanalyticssettings_createorupdate) @@ -199,6 +259,14 @@ - [List](#threatintelligenceindicatorsoperation_list) +## TriggeredAnalyticsRuleRunOperation + +- [Get](#triggeredanalyticsrulerunoperation_get) + +## Update + +- [Recommendation](#update_recommendation) + ## WatchlistItems - [CreateOrUpdate](#watchlistitems_createorupdate) @@ -212,13 +280,27 @@ - [Delete](#watchlists_delete) - [Get](#watchlists_get) - [List](#watchlists_list) + +## WorkspaceManagerConfigurations + +- [CreateOrUpdate](#workspacemanagerconfigurations_createorupdate) +- [Delete](#workspacemanagerconfigurations_delete) +- [Get](#workspacemanagerconfigurations_get) +- [List](#workspacemanagerconfigurations_list) + +## WorkspaceManagerMembers + +- [CreateOrUpdate](#workspacemanagermembers_createorupdate) +- [Delete](#workspacemanagermembers_delete) +- [Get](#workspacemanagermembers_get) +- [List](#workspacemanagermembers_list) ### Actions_CreateOrUpdate ```java /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -244,12 +326,10 @@ public final class ActionsCreateOrUpdateSamples { ### Actions_Delete ```java -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -265,7 +345,7 @@ public final class ActionsDeleteSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -273,12 +353,10 @@ public final class ActionsDeleteSamples { ### Actions_Get ```java -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -294,7 +372,7 @@ public final class ActionsGetSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -302,12 +380,10 @@ public final class ActionsGetSamples { ### Actions_ListByAlertRule ```java -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -316,20 +392,50 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` -### AlertRuleTemplates_Get +### AlertRuleOperation_TriggerRuleRun ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.time.OffsetDateTime; + +/** Samples for AlertRuleOperation TriggerRuleRun. */ +public final class AlertRuleOperationTriggerRuleRunSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json + */ + /** + * Sample code: triggerRuleRun_Post. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggerRuleRunPost(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRuleOperations() + .triggerRuleRun( + "myRg", + "myWorkspace", + "65360bb0-8986-4ade-a89d-af3cf44d28aa", + new AnalyticsRuleRunTrigger().withExecutionTimeUtc(OffsetDateTime.parse("2022-12-22T15:37:03.074Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### AlertRuleTemplates_Get +```java /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -340,7 +446,8 @@ public final class AlertRuleTemplatesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); } } ``` @@ -348,12 +455,10 @@ public final class AlertRuleTemplatesGetSamples { ### AlertRuleTemplates_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -362,7 +467,7 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -370,9 +475,10 @@ public final class AlertRuleTemplatesListSamples { ### AlertRules_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; +import com.azure.resourcemanager.securityinsights.models.AlertProperty; +import com.azure.resourcemanager.securityinsights.models.AlertPropertyMapping; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -392,6 +498,7 @@ import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncide import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; import java.util.Arrays; @@ -401,7 +508,7 @@ import java.util.Map; /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -620,11 +727,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -644,11 +751,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -716,12 +823,26 @@ public final class AlertRulesCreateOrUpdateSamples { .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - Context.NONE); + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}") + .withAlertDynamicProperties( + Arrays + .asList( + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_COMPONENT_NAME) + .withValue("ProductComponentNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_NAME) + .withValue("ProductNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.ALERT_LINK) + .withValue("Link")))) + .withSentinelEntitiesMappings( + Arrays.asList(new SentinelEntityMapping().withColumnName("Entities"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json */ /** * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. @@ -940,11 +1061,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -985,7 +1106,7 @@ public final class AlertRulesCreateOrUpdateSamples { Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))) .withEventGroupingSettings( new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -1004,12 +1125,10 @@ public final class AlertRulesCreateOrUpdateSamples { ### AlertRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -1019,7 +1138,8 @@ public final class AlertRulesDeleteSamples { public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1027,12 +1147,10 @@ public final class AlertRulesDeleteSamples { ### AlertRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -1043,11 +1161,12 @@ public final class AlertRulesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -1057,11 +1176,12 @@ public final class AlertRulesGetSamples { public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -1069,11 +1189,13 @@ public final class AlertRulesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -1084,7 +1206,11 @@ public final class AlertRulesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); + .getWithResponse( + "myRg", + "myWorkspace", + "microsoftSecurityIncidentCreationRuleExample", + com.azure.core.util.Context.NONE); } } ``` @@ -1092,12 +1218,10 @@ public final class AlertRulesGetSamples { ### AlertRules_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -1105,7 +1229,7 @@ public final class AlertRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); + manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -1120,7 +1244,7 @@ import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. @@ -1145,12 +1269,10 @@ public final class AutomationRulesCreateOrUpdateSamples { ### AutomationRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -1161,7 +1283,8 @@ public final class AutomationRulesDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1169,12 +1292,10 @@ public final class AutomationRulesDeleteSamples { ### AutomationRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -1184,7 +1305,8 @@ public final class AutomationRulesGetSamples { public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1192,12 +1314,10 @@ public final class AutomationRulesGetSamples { ### AutomationRules_List ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -1205,7 +1325,7 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -1213,7 +1333,6 @@ public final class AutomationRulesListSamples { ### BookmarkOperation_Expand ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -1221,7 +1340,7 @@ import java.util.UUID; /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -1239,7 +1358,7 @@ public final class BookmarkOperationExpandSamples { .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1250,7 +1369,7 @@ public final class BookmarkOperationExpandSamples { /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. @@ -1273,12 +1392,10 @@ public final class BookmarkRelationsCreateOrUpdateSamples { ### BookmarkRelations_Delete ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -1294,7 +1411,7 @@ public final class BookmarkRelationsDeleteSamples { "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1302,12 +1419,10 @@ public final class BookmarkRelationsDeleteSamples { ### BookmarkRelations_Get ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -1323,7 +1438,7 @@ public final class BookmarkRelationsGetSamples { "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1331,12 +1446,10 @@ public final class BookmarkRelationsGetSamples { ### BookmarkRelations_List ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -1347,7 +1460,15 @@ public final class BookmarkRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "2216d0e1-91e3-4902-89fd-d2df8c535096", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -1366,7 +1487,7 @@ import java.util.UUID; /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -1410,12 +1531,10 @@ public final class BookmarksCreateOrUpdateSamples { ### Bookmarks_Delete ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -1425,7 +1544,8 @@ public final class BookmarksDeleteSamples { public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1433,12 +1553,10 @@ public final class BookmarksDeleteSamples { ### Bookmarks_Get ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1448,7 +1566,8 @@ public final class BookmarksGetSamples { public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1456,12 +1575,10 @@ public final class BookmarksGetSamples { ### Bookmarks_List ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1469,7 +1586,280 @@ public final class BookmarksListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); + manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### ContentPackageOperation_Install + +```java +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.PackageProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ContentPackageOperation Install. */ +public final class ContentPackageOperationInstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/InstallPackage.json + */ + /** + * Sample code: Install a package to the workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void installAPackageToTheWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackageOperations() + .define("str.azure-sentinel-solution-str") + .withExistingWorkspace("myRg", "myWorkspace") + .withTags(mapOf("tag1", "str")) + .withProperties( + new PackageProperties() + .withPackageKind(PackageKind.SOLUTION) + .withVersion("2.0.0") + .withDisplayName("str")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ContentPackageOperation_Uninstall + +```java +/** Samples for ContentPackageOperation Uninstall. */ +public final class ContentPackageOperationUninstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/UninstallPackage.json + */ + /** + * Sample code: Uninstall a package from the workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void uninstallAPackageFromTheWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackageOperations() + .uninstallWithResponse( + "myRg", "myWorkspace", "str.azure-sentinel-solution-str", com.azure.core.util.Context.NONE); + } +} +``` + +### ContentPackages_Get + +```java +/** Samples for ContentPackages Get. */ +public final class ContentPackagesGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetPackageById.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackages() + .getWithResponse( + "myRg", + "myWorkspace", + "str.azure-sentinel-solution-str", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ContentPackages_List + +```java +/** Samples for ContentPackages List. */ +public final class ContentPackagesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetPackages.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.contentPackages().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ContentTemplateOperation_Delete + +```java +/** Samples for ContentTemplateOperation Delete. */ +public final class ContentTemplateOperationDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/DeleteTemplate.json + */ + /** + * Sample code: Delete metadata. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplateOperations() + .deleteWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} +``` + +### ContentTemplateOperation_Get + +```java +/** Samples for ContentTemplateOperation Get. */ +public final class ContentTemplateOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetTemplateById.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplateOperations() + .getWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} +``` + +### ContentTemplateOperation_Install + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplatePropertiesAutoGenerated; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.SourceKind; +import com.azure.resourcemanager.securityinsights.models.SupportTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ContentTemplateOperation Install. */ +public final class ContentTemplateOperationInstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/InstallTemplate.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) + throws IOException { + manager + .contentTemplateOperations() + .define("str.azure-sentinel-solution-str") + .withExistingWorkspace("myRg", "myWorkspace") + .withTags(mapOf("tag1", "str")) + .withProperties( + new TemplatePropertiesAutoGenerated() + .withContentId("8365ebfe-a381-45b7-ad08-7d818070e11f") + .withVersion("1.0.1") + .withDisplayName("API Protection workbook template") + .withContentKind(Kind.ANALYTICS_RULE) + .withSource( + new MetadataSource() + .withKind(SourceKind.SOLUTION) + .withName("str") + .withSourceId("str.azure-sentinel-solution-str")) + .withAuthor(new MetadataAuthor().withName("Microsoft").withEmail("support@microsoft.com")) + .withSupport( + new MetadataSupport() + .withTier(SupportTier.MICROSOFT) + .withName("Microsoft Corporation") + .withEmail("support@microsoft.com") + .withLink("https://support.microsoft.com/")) + .withPackageId("str.azure-sentinel-solution-str") + .withPackageKind(PackageKind.SOLUTION) + .withPackageName("str") + .withMainTemplate( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"$schema\":\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.1\",\"resources\":[{\"name\":\"8365ebfe-a381-45b7-ad08-7d818070e11f\",\"type\":\"Microsoft.SecurityInsights/AlertRuleTemplates\",\"apiVersion\":\"2022-04-01-preview\",\"kind\":\"Scheduled\",\"location\":\"[parameters('workspace-location')]\",\"properties\":{\"description\":\"Creates" + + " an incident when a large number of Critical/High severity CrowdStrike Falcon" + + " sensor detections is triggered by a single user\",\"displayName\":\"Critical or" + + " High Severity Detections by" + + " User\",\"enabled\":false,\"query\":\"...\",\"queryFrequency\":\"PT1H\",\"queryPeriod\":\"PT1H\",\"severity\":\"High\",\"status\":\"Available\",\"suppressionDuration\":\"PT1H\",\"suppressionEnabled\":false,\"triggerOperator\":\"GreaterThan\",\"triggerThreshold\":0}},{\"name\":\"[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('AnalyticsRule-'," + + " last(split([resourceId('Microsoft.SecurityInsights/AlertRuleTemplates'," + + " 8365ebfe-a381-45b7-ad08-7d818070e11f)],'/'))))]\",\"type\":\"Microsoft.OperationalInsights/workspaces/providers/metadata\",\"apiVersion\":\"2022-01-01-preview\",\"properties\":{\"description\":\"CrowdStrike" + + " Falcon Endpoint Protection Analytics Rule" + + " 1\",\"author\":{\"name\":\"Microsoft\",\"email\":\"support@microsoft.com\"},\"contentId\":\"4465ebde-b381-45f7-ad08-7d818070a11c\",\"kind\":\"AnalyticsRule\",\"parentId\":\"[resourceId('Microsoft.SecurityInsights/AlertRuleTemplates'," + + " 8365ebfe-a381-45b7-ad08-7d818070e11f)]\",\"source\":{\"name\":\"str\",\"kind\":\"Solution\",\"sourceId\":\"str.azure-sentinel-solution-str\"},\"support\":{\"name\":\"Microsoft" + + " Corporation\",\"email\":\"support@microsoft.com\",\"link\":\"https://support.microsoft.com/\",\"tier\":\"Microsoft\"},\"version\":\"1.0.0\"}}]}", + Object.class, + SerializerEncoding.JSON))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ContentTemplates_List + +```java +/** Samples for ContentTemplates List. */ +public final class ContentTemplatesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetTemplates.json + */ + /** + * Sample code: Get all installed templates. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllInstalledTemplates( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplates() + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1478,7 +1868,6 @@ public final class BookmarksListSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; @@ -1488,7 +1877,7 @@ import java.util.Arrays; /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json */ /** * Sample code: Connect an APIPolling V2 logs data connector. @@ -1505,7 +1894,7 @@ public final class DataConnectorsConnectSamples { "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") .withOutputStream("Custom-MyTableRawData") @@ -1519,11 +1908,11 @@ public final class DataConnectorsConnectSamples { + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -1540,7 +1929,7 @@ public final class DataConnectorsConnectSamples { "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withRequestConfigUserInputValues( Arrays .asList( @@ -1551,7 +1940,7 @@ public final class DataConnectorsConnectSamples { + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1560,7 +1949,6 @@ public final class DataConnectorsConnectSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.Availability; import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; @@ -1583,6 +1971,18 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnecto import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesAlerts; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesIncidents; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; +import com.azure.resourcemanager.securityinsights.models.MtpProvider; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -1615,14 +2015,14 @@ import java.util.Arrays; /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftPurviewInformationProtectionDataConnetor.json */ /** - * Sample code: Creates or updates an Office365 data connector. + * Sample code: Creates or updates an MicrosoftPurviewInformationProtection data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnOffice365DataConnector( + public static void createsOrUpdatesAnMicrosoftPurviewInformationProtectionDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() @@ -1630,20 +2030,76 @@ public final class DataConnectorsCreateOrUpdateSamples { "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new OfficeDataConnector() + new MicrosoftPurviewInformationProtectionDataConnector() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDataTypes( - new OfficeDataConnectorDataTypes() - .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) - .withSharePoint( - new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) + new MicrosoftPurviewInformationProtectionConnectorDataTypes() + .withLogs( + new MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() + .withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + */ + /** + * Sample code: Creates or updates an Office365 data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOffice365DataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficeDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new OfficeDataConnectorDataTypes() + .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) + .withSharePoint( + new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftThreatProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates a MicrosoftThreatProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MtpDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MtpDataConnectorDataTypes() + .withIncidents(new MtpDataConnectorDataTypesIncidents().withState(DataTypeState.DISABLED)) + .withAlerts(new MtpDataConnectorDataTypesAlerts().withState(DataTypeState.ENABLED))) + .withFilteredProviders( + new MtpFilteredProviders() + .withAlerts(Arrays.asList(MtpProvider.MICROSOFT_DEFENDER_FOR_CLOUD_APPS))) + .withTenantId("178265c4-3136-4ff6-8ed1-b5b62b4cb5f5"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json */ /** * Sample code: Creates or updates an Office PowerBI data connector. @@ -1664,11 +2120,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new OfficePowerBIConnectorDataTypes() .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -1690,7 +2146,7 @@ public final class DataConnectorsCreateOrUpdateSamples { .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") .withCollectionId("135") .withUsername("--") - .withPassword("--") + .withPassword("fakeTokenPlaceholder") .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withPollingFrequency(PollingFrequency.ONCE_ADAY) .withDataTypes( @@ -1698,11 +2154,11 @@ public final class DataConnectorsCreateOrUpdateSamples { .withTaxiiClient( new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -1723,11 +2179,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new TIDataConnectorDataTypes() .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -1750,11 +2206,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() .withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -2070,11 +2526,11 @@ public final class DataConnectorsCreateOrUpdateSamples { + "> NOTE: If a longer timeout duration is required, consider" + " upgrading to an [App Service" + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json */ /** * Sample code: Creates or updates an Office365 Project data connector. @@ -2095,11 +2551,38 @@ public final class DataConnectorsCreateOrUpdateSamples { new Office365ProjectConnectorDataTypes() .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftThreatIntelligenceDataConnector.json + */ + /** + * Sample code: Creates or updates a Microsoft Threat Intelligence data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatIntelligenceDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "c345bf40-8509-4ed2-b947-50cb773aaf04", + new MstiDataConnector() + .withDataTypes( + new MstiDataConnectorDataTypes() + .withMicrosoftEmergingThreatFeed( + new MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed() + .withState(DataTypeState.ENABLED) + .withLookbackPeriod("1970-01-01T00:00:00.000Z"))) + .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -2207,8 +2690,8 @@ public final class DataConnectorsCreateOrUpdateSamples { .withAuth( new CodelessConnectorPollingAuthProperties() .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) + .withApiKeyName("fakeTokenPlaceholder") + .withApiKeyIdentifier("fakeTokenPlaceholder")) .withRequest( new CodelessConnectorPollingRequestProperties() .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") @@ -2239,7 +2722,7 @@ public final class DataConnectorsCreateOrUpdateSamples { .withResponse( new CodelessConnectorPollingResponseProperties() .withEventsJsonPaths(Arrays.asList("$")))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2247,12 +2730,10 @@ public final class DataConnectorsCreateOrUpdateSamples { ### DataConnectors_Delete ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json */ /** * Sample code: Delete an Office365 Project data connector. @@ -2263,11 +2744,28 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Delete an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -2278,11 +2776,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -2293,11 +2792,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json */ /** * Sample code: Delete an Office PowerBI data connector. @@ -2308,11 +2808,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -2323,7 +2824,24 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteMicrosoftThreatIntelligenceDataConnector.json + */ + /** + * Sample code: Delete an MicrosoftThreatIntelligence data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftThreatIntelligenceDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } } ``` @@ -2331,12 +2849,10 @@ public final class DataConnectorsDeleteSamples { ### DataConnectors_Disconnect ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -2347,7 +2863,8 @@ public final class DataConnectorsDisconnectSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .disconnectWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } ``` @@ -2355,12 +2872,26 @@ public final class DataConnectorsDisconnectSamples { ### DataConnectors_Get ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + */ + /** + * Sample code: Get an AADIP (Azure Active Directory Identity Protection) data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnAADIPAzureActiveDirectoryIdentityProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json */ /** * Sample code: Get an Office365 Project data connector. @@ -2371,11 +2902,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -2386,11 +2918,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** * Sample code: Get an Office ATP data connector. @@ -2401,11 +2934,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetIoTById.json */ /** * Sample code: Get a IoT data connector. @@ -2416,11 +2950,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -2431,11 +2966,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -2446,11 +2982,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -2461,11 +2998,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -2476,11 +3014,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -2490,11 +3029,12 @@ public final class DataConnectorsGetSamples { public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -2505,11 +3045,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -2520,11 +3061,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -2535,26 +3077,28 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftPurviewInformationProtectionDataConnetorById.json */ /** - * Sample code: Get an AAD data connector. + * Sample code: Get a MicrosoftPurviewInformationProtection data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAADDataConnector( + public static void getAMicrosoftPurviewInformationProtectionDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** * Sample code: Get an AATP data connector. @@ -2565,11 +3109,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** * Sample code: Get a APIPolling data connector. @@ -2580,11 +3125,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** * Sample code: Get an Office IRM data connector. @@ -2595,11 +3141,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -2610,11 +3157,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -2625,11 +3173,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -2640,11 +3189,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json */ /** * Sample code: Get an Office365 PowerBI data connector. @@ -2655,7 +3205,8 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -2663,12 +3214,10 @@ public final class DataConnectorsGetSamples { ### DataConnectors_List ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -2677,7 +3226,7 @@ public final class DataConnectorsListSamples { */ public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -2685,12 +3234,12 @@ public final class DataConnectorsListSamples { ### DataConnectorsCheckRequirementsOperation_Post ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; @@ -2703,7 +3252,7 @@ import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirement /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -2714,11 +3263,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeAtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json */ /** * Sample code: Check requirements for Office365Project. @@ -2729,26 +3282,34 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Office365ProjectCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** - * Sample code: Check requirements for AAD. + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection) - no authorization. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAAD( + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtectionNoAuthorization( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -2759,11 +3320,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsIoT.json */ /** * Sample code: Check requirements for IoT. @@ -2778,11 +3343,11 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { "myRg", "myWorkspace", new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -2793,45 +3358,54 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** - * Sample code: Check requirements for AAD - no authorization. + * Sample code: Check requirements for ASC. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAADNoAuthorization( + public static void checkRequirementsForASC( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftPurviewInformationProtection.json */ /** - * Sample code: Check requirements for ASC. + * Sample code: Check requirements for MicrosoftPurviewInformationProtection. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForASC( + public static void checkRequirementsForMicrosoftPurviewInformationProtection( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() .postWithResponse( "myRg", "myWorkspace", - new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + new MicrosoftPurviewInformationProtectionCheckRequirements() + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -2842,11 +3416,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -2857,11 +3435,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TiTaxiiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -2872,11 +3454,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeIrmCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -2887,11 +3473,34 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MstiCheckRequirements().withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + */ + /** + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection). + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtection( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json */ /** * Sample code: Check requirements for OfficePowerBI. @@ -2902,11 +3511,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficePowerBICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -2917,26 +3530,34 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Dynamics365CheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** - * Sample code: Check requirements for AAD - no license. + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection) - no license. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAADNoLicense( + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtectionNoLicense( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -2947,7 +3568,11 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } } ``` @@ -2955,12 +3580,10 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { ### DomainWhois_Get ```java -import com.azure.core.util.Context; - /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -2969,7 +3592,7 @@ public final class DomainWhoisGetSamples { */ public static void getWhoisInformationForASingleDomainName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); + manager.domainWhois().getWithResponse("myRg", "microsoft.com", com.azure.core.util.Context.NONE); } } ``` @@ -2977,7 +3600,6 @@ public final class DomainWhoisGetSamples { ### Entities_Expand ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -2985,7 +3607,7 @@ import java.util.UUID; /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -3003,7 +3625,7 @@ public final class EntitiesExpandSamples { .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3011,12 +3633,10 @@ public final class EntitiesExpandSamples { ### Entities_Get ```java -import com.azure.core.util.Context; - /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -3025,11 +3645,14 @@ public final class EntitiesGetSamples { */ public static void getASubmissionMailEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -3037,11 +3660,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -3049,11 +3675,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -3062,11 +3691,14 @@ public final class EntitiesGetSamples { */ public static void getAnIoTDeviceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -3075,11 +3707,14 @@ public final class EntitiesGetSamples { */ public static void getARegistryKeyEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -3087,11 +3722,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -3099,11 +3737,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -3112,11 +3753,14 @@ public final class EntitiesGetSamples { */ public static void getASecurityAlertEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -3124,11 +3768,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -3136,11 +3783,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -3149,11 +3799,14 @@ public final class EntitiesGetSamples { */ public static void getACloudApplicationEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -3161,11 +3814,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -3174,11 +3830,14 @@ public final class EntitiesGetSamples { */ public static void getARegistryValueEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -3186,11 +3845,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -3199,11 +3861,14 @@ public final class EntitiesGetSamples { */ public static void getAMailClusterEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -3212,11 +3877,14 @@ public final class EntitiesGetSamples { */ public static void getASecurityGroupEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -3225,11 +3893,14 @@ public final class EntitiesGetSamples { */ public static void getAMailMessageEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -3238,11 +3909,14 @@ public final class EntitiesGetSamples { */ public static void getAnAzureResourceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -3250,11 +3924,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -3262,7 +3939,10 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", com.azure.core.util.Context.NONE); } } ``` @@ -3270,7 +3950,6 @@ public final class EntitiesGetSamples { ### Entities_GetInsights ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import java.time.OffsetDateTime; import java.util.Arrays; @@ -3279,7 +3958,7 @@ import java.util.UUID; /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -3298,7 +3977,7 @@ public final class EntitiesGetInsightsSamples { .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withAddDefaultExtendedTimeRange(false) .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3306,12 +3985,10 @@ public final class EntitiesGetInsightsSamples { ### Entities_List ```java -import com.azure.core.util.Context; - /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -3319,7 +3996,7 @@ public final class EntitiesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); + manager.entities().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -3327,13 +4004,12 @@ public final class EntitiesListSamples { ### Entities_Queries ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -3348,22 +4024,43 @@ public final class EntitiesQueriesSamples { "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", EntityItemQueryKind.INSIGHT, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` -### EntitiesGetTimeline_List +### Entities_RunPlaybook ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import java.time.OffsetDateTime; - -/** Samples for EntitiesGetTimeline List. */ -public final class EntitiesGetTimelineListSamples { +/** Samples for Entities RunPlaybook. */ +public final class EntitiesRunPlaybookSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/manualTrigger/Entities_RunPlaybook.json + */ + /** + * Sample code: Entities_RunPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void entitiesRunPlaybook(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .entities() + .runPlaybookWithResponse( + "myRg", "myWorkspace", "72e01a22-5cd2-4139-a149-9f2736ff2ar2", null, com.azure.core.util.Context.NONE); + } +} +``` + +### EntitiesGetTimeline_List + +```java +import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; +import java.time.OffsetDateTime; + +/** Samples for EntitiesGetTimeline List. */ +public final class EntitiesGetTimelineListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -3381,7 +4078,7 @@ public final class EntitiesGetTimelineListSamples { .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withNumberOfBucket(4), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3389,12 +4086,10 @@ public final class EntitiesGetTimelineListSamples { ### EntitiesRelations_List ```java -import com.azure.core.util.Context; - /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -3405,7 +4100,15 @@ public final class EntitiesRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3413,7 +4116,6 @@ public final class EntitiesRelationsListSamples { ### EntityQueries_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; @@ -3424,7 +4126,7 @@ import java.util.Map; /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -3494,7 +4196,7 @@ public final class EntityQueriesCreateOrUpdateSamples { Arrays.asList("Host_OMSAgentID"))) .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) .withEnabled(true), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -3513,12 +4215,10 @@ public final class EntityQueriesCreateOrUpdateSamples { ### EntityQueries_Delete ```java -import com.azure.core.util.Context; - /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -3528,7 +4228,8 @@ public final class EntityQueriesDeleteSamples { public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3536,12 +4237,10 @@ public final class EntityQueriesDeleteSamples { ### EntityQueries_Get ```java -import com.azure.core.util.Context; - /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -3552,11 +4251,12 @@ public final class EntityQueriesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -3567,7 +4267,8 @@ public final class EntityQueriesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3575,13 +4276,12 @@ public final class EntityQueriesGetSamples { ### EntityQueries_List ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -3589,7 +4289,9 @@ public final class EntityQueriesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); + manager + .entityQueries() + .list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, com.azure.core.util.Context.NONE); } } ``` @@ -3597,12 +4299,10 @@ public final class EntityQueriesListSamples { ### EntityQueryTemplates_Get ```java -import com.azure.core.util.Context; - /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -3613,7 +4313,8 @@ public final class EntityQueryTemplatesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3621,13 +4322,12 @@ public final class EntityQueryTemplatesGetSamples { ### EntityQueryTemplates_List ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant99; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -3636,7 +4336,9 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); + manager + .entityQueryTemplates() + .list("myRg", "myWorkspace", Constant99.ACTIVITY, com.azure.core.util.Context.NONE); } } ``` @@ -3644,12 +4346,10 @@ public final class EntityQueryTemplatesListSamples { ### EntityRelations_GetRelation ```java -import com.azure.core.util.Context; - /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -3664,7 +4364,7 @@ public final class EntityRelationsGetRelationSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3680,7 +4380,7 @@ import com.azure.resourcemanager.securityinsights.models.IngestionMode; /** Samples for FileImports Create. */ public final class FileImportsCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/CreateFileImport.json */ /** * Sample code: Create a file import. @@ -3705,12 +4405,10 @@ public final class FileImportsCreateSamples { ### FileImports_Delete ```java -import com.azure.core.util.Context; - /** Samples for FileImports Delete. */ public final class FileImportsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/DeleteFileImport.json */ /** * Sample code: Delete a file import. @@ -3718,7 +4416,9 @@ public final class FileImportsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .fileImports() + .delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -3726,12 +4426,10 @@ public final class FileImportsDeleteSamples { ### FileImports_Get ```java -import com.azure.core.util.Context; - /** Samples for FileImports Get. */ public final class FileImportsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/GetFileImportById.json */ /** * Sample code: Get a file import. @@ -3741,7 +4439,8 @@ public final class FileImportsGetSamples { public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -3749,12 +4448,10 @@ public final class FileImportsGetSamples { ### FileImports_List ```java -import com.azure.core.util.Context; - /** Samples for FileImports List. */ public final class FileImportsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/GetFileImports.json */ /** * Sample code: Get all file imports. @@ -3764,7 +4461,81 @@ public final class FileImportsListSamples { public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Get_SingleRecommendation + +```java +import java.util.UUID; + +/** Samples for Get SingleRecommendation. */ +public final class GetSingleRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/GetRecommendation.json + */ + /** + * Sample code: Get a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getARecommendation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .gets() + .singleRecommendationWithResponse( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + com.azure.core.util.Context.NONE); + } +} +``` + +### GetRecommendations_List + +```java +/** Samples for GetRecommendations List. */ +public final class GetRecommendationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/GetRecommendations.json + */ + /** + * Sample code: Get Recommendations list. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getRecommendationsList( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getRecommendations().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### GetTriggeredAnalyticsRuleRuns_List + +```java +/** Samples for GetTriggeredAnalyticsRuleRuns List. */ +public final class GetTriggeredAnalyticsRuleRunsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRuns_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRuns_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunsGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getTriggeredAnalyticsRuleRuns().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -3775,14 +4546,14 @@ public final class FileImportsListSamples { /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident comment. + * Sample code: IncidentComments_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncidentComment( + public static void incidentCommentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -3797,19 +4568,17 @@ public final class IncidentCommentsCreateOrUpdateSamples { ### IncidentComments_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_Delete.json */ /** - * Sample code: Delete the incident comment. + * Sample code: IncidentComments_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteTheIncidentComment( + public static void incidentCommentsDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -3818,7 +4587,7 @@ public final class IncidentCommentsDeleteSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3826,20 +4595,17 @@ public final class IncidentCommentsDeleteSamples { ### IncidentComments_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_Get.json */ /** - * Sample code: Get an incident comment. + * Sample code: IncidentComments_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentCommentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() .getWithResponse( @@ -3847,7 +4613,7 @@ public final class IncidentCommentsGetSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3855,23 +4621,29 @@ public final class IncidentCommentsGetSamples { ### IncidentComments_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_List.json */ /** - * Sample code: Get all incident comments. + * Sample code: IncidentComments_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentComments( + public static void incidentCommentsList( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3879,13 +4651,12 @@ public final class IncidentCommentsListSamples { ### IncidentRelations_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -3904,7 +4675,7 @@ public final class IncidentRelationsCreateOrUpdateSamples { new RelationInner() .withRelatedResourceId( "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3912,12 +4683,10 @@ public final class IncidentRelationsCreateOrUpdateSamples { ### IncidentRelations_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -3933,7 +4702,7 @@ public final class IncidentRelationsDeleteSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3941,12 +4710,10 @@ public final class IncidentRelationsDeleteSamples { ### IncidentRelations_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -3962,7 +4729,7 @@ public final class IncidentRelationsGetSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3970,12 +4737,10 @@ public final class IncidentRelationsGetSamples { ### IncidentRelations_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -3986,7 +4751,117 @@ public final class IncidentRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_CreateOrUpdate + +```java +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; + +/** Samples for IncidentTasks CreateOrUpdate. */ +public final class IncidentTasksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_CreateOrUpdate.json + */ + /** + * Sample code: IncidentTasks_CreateOrUpdate. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksCreateOrUpdate( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withTitle("Task title") + .withStatus(IncidentTaskStatus.NEW) + .withDescription("Task description") + .create(); + } +} +``` + +### IncidentTasks_Delete + +```java +/** Samples for IncidentTasks Delete. */ +public final class IncidentTasksDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Delete.json + */ + /** + * Sample code: IncidentTasks_Delete. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .deleteWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_Get + +```java +/** Samples for IncidentTasks Get. */ +public final class IncidentTasksGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Get.json + */ + /** + * Sample code: IncidentTasks_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .getWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_List + +```java +/** Samples for IncidentTasks List. */ +public final class IncidentTasksListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_List.json + */ + /** + * Sample code: IncidentTasks_List. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4005,30 +4880,30 @@ import java.util.UUID; /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident. + * Sample code: Incidents_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncident( + public static void incidentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTitle("My incident") + .withDescription("This is a demo incident") + .withSeverity(IncidentSeverity.HIGH) + .withStatus(IncidentStatus.CLOSED) .withClassification(IncidentClassification.FALSE_POSITIVE) + .withClassificationReason(IncidentClassificationReason.INACCURATE_DATA) .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") + .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") .create(); } } @@ -4037,29 +4912,27 @@ public final class IncidentsCreateOrUpdateSamples { ### Incidents_CreateTeam ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTeam/Incidents_CreateTeam.json */ /** - * Sample code: Creates incident teams group. + * Sample code: Incidents_CreateTeam. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsCreateTeam(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", + "myRg", + "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); + new TeamInformationInner(), + com.azure.core.util.Context.NONE); } } ``` @@ -4067,22 +4940,21 @@ public final class IncidentsCreateTeamSamples { ### Incidents_Delete ```java -import com.azure.core.util.Context; - /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_Delete.json */ /** - * Sample code: Delete an incident. + * Sample code: Incidents_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4090,22 +4962,21 @@ public final class IncidentsDeleteSamples { ### Incidents_Get ```java -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_Get.json */ /** - * Sample code: Get an incident. + * Sample code: Incidents_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4113,20 +4984,27 @@ public final class IncidentsGetSamples { ### Incidents_List ```java -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_List.json */ /** - * Sample code: Get all incidents. + * Sample code: Incidents_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + public static void incidentsList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -4134,23 +5012,21 @@ public final class IncidentsListSamples { ### Incidents_ListAlerts ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentAlerts/Incidents_ListAlerts.json */ /** - * Sample code: Get all incident alerts. + * Sample code: Incidents_ListAlerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsListAlerts(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4158,23 +5034,22 @@ public final class IncidentsListAlertsSamples { ### Incidents_ListBookmarks ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentBookmarks/Incidents_ListBookmarks.json */ /** - * Sample code: Get all incident bookmarks. + * Sample code: Incidents_ListBookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentBookmarks( + public static void incidentsListBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4182,23 +5057,22 @@ public final class IncidentsListBookmarksSamples { ### Incidents_ListEntities ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentEntities/Incidents_ListEntities.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Incidents_ListEntities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void incidentsListEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listEntitiesWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4206,12 +5080,10 @@ public final class IncidentsListEntitiesSamples { ### Incidents_RunPlaybook ```java -import com.azure.core.util.Context; - /** Samples for Incidents RunPlaybook. */ public final class IncidentsRunPlaybookSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json */ /** * Sample code: Incidents_RunPlaybook. @@ -4222,7 +5094,8 @@ public final class IncidentsRunPlaybookSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .runPlaybookWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, com.azure.core.util.Context.NONE); } } ``` @@ -4230,12 +5103,10 @@ public final class IncidentsRunPlaybookSamples { ### IpGeodata_Get ```java -import com.azure.core.util.Context; - /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -4244,7 +5115,7 @@ public final class IpGeodataGetSamples { */ public static void getGeodataForASingleIPAddress( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", com.azure.core.util.Context.NONE); } } ``` @@ -4252,10 +5123,9 @@ public final class IpGeodataGetSamples { ### Metadata_Create ```java -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.azure.resourcemanager.securityinsights.models.Operator; @@ -4267,7 +5137,7 @@ import java.util.Arrays; /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -4284,7 +5154,7 @@ public final class MetadataCreateSamples { .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .withSource( new MetadataSource() .withKind(SourceKind.SOLUTION) @@ -4298,34 +5168,34 @@ public final class MetadataCreateSamples { .withEmail("support@microsoft.com") .withLink("https://support.microsoft.com/")) .withDependencies( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withOperator(Operator.AND) .withCriteria( Arrays .asList( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withOperator(Operator.OR) .withCriteria( Arrays .asList( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withName("Microsoft Defender for Endpoint"), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), - new MetadataDependencies() + .withKind("DataConnector"), + new MetadataDependenciesAutoGenerated() .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withVersion("2.0"))), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) + .withKind("Playbook") .withVersion("1.0"), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) + .withKind("Parser")))) .withCategories( new MetadataCategories() .withDomains(Arrays.asList("Application", "Security – Insider Threat")) @@ -4343,7 +5213,7 @@ public final class MetadataCreateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -4359,7 +5229,7 @@ public final class MetadataCreateSamples { .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .create(); } } @@ -4368,12 +5238,10 @@ public final class MetadataCreateSamples { ### Metadata_Delete ```java -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -4381,7 +5249,7 @@ public final class MetadataDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } ``` @@ -4389,12 +5257,10 @@ public final class MetadataDeleteSamples { ### Metadata_Get ```java -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -4403,7 +5269,7 @@ public final class MetadataGetSamples { */ public static void getSingleMetadataByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } ``` @@ -4411,12 +5277,10 @@ public final class MetadataGetSamples { ### Metadata_List ```java -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -4424,11 +5288,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -4437,7 +5301,7 @@ public final class MetadataListSamples { */ public static void getAllMetadataWithODataFilterOrderbySkipTop( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4445,14 +5309,13 @@ public final class MetadataListSamples { ### Metadata_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -4461,7 +5324,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) @@ -4473,12 +5339,10 @@ public final class MetadataUpdateSamples { ### OfficeConsents_Delete ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -4489,7 +5353,8 @@ public final class OfficeConsentsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } ``` @@ -4497,12 +5362,10 @@ public final class OfficeConsentsDeleteSamples { ### OfficeConsents_Get ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -4512,7 +5375,8 @@ public final class OfficeConsentsGetSamples { public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } ``` @@ -4520,12 +5384,10 @@ public final class OfficeConsentsGetSamples { ### OfficeConsents_List ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -4534,7 +5396,7 @@ public final class OfficeConsentsListSamples { */ public static void getAllOfficeConsents( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); + manager.officeConsents().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4542,12 +5404,10 @@ public final class OfficeConsentsListSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -4555,20 +5415,60 @@ public final class OperationsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ProductSettings_Delete +### ProductPackageOperation_Get ```java -import com.azure.core.util.Context; +/** Samples for ProductPackageOperation Get. */ +public final class ProductPackageOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetProductPackageById.json + */ + /** + * Sample code: Get a package. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAPackage(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productPackageOperations() + .getWithResponse( + "myRg", "myWorkspace", "str.azure-sentinel-solution-str", com.azure.core.util.Context.NONE); + } +} +``` +### ProductPackages_List + +```java +/** Samples for ProductPackages List. */ +public final class ProductPackagesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetProductPackages.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.productPackages().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ProductSettings_Delete + +```java /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -4577,7 +5477,7 @@ public final class ProductSettingsDeleteSamples { */ public static void deleteEyesOnSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } ``` @@ -4585,12 +5485,10 @@ public final class ProductSettingsDeleteSamples { ### ProductSettings_Get ```java -import com.azure.core.util.Context; - /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -4598,7 +5496,7 @@ public final class ProductSettingsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } ``` @@ -4606,12 +5504,10 @@ public final class ProductSettingsGetSamples { ### ProductSettings_List ```java -import com.azure.core.util.Context; - /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -4619,7 +5515,7 @@ public final class ProductSettingsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.productSettings().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4627,13 +5523,12 @@ public final class ProductSettingsListSamples { ### ProductSettings_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EyesOn; /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -4649,7 +5544,51 @@ public final class ProductSettingsUpdateSamples { "myWorkspace", "EyesOn", new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); + com.azure.core.util.Context.NONE); + } +} +``` + +### ProductTemplateOperation_Get + +```java +/** Samples for ProductTemplateOperation Get. */ +public final class ProductTemplateOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetProductTemplateById.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productTemplateOperations() + .getWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} +``` + +### ProductTemplates_List + +```java +/** Samples for ProductTemplates List. */ +public final class ProductTemplatesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetProductTemplates.json + */ + /** + * Sample code: Get all installed templates. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllInstalledTemplates( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productTemplates() + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4658,7 +5597,6 @@ public final class ProductSettingsUpdateSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -4672,7 +5610,7 @@ import java.util.UUID; /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -4726,7 +5664,7 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { .withIsDefaultSettings(true) .withAnomalySettingsVersion(0) .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -4734,12 +5672,10 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { ### SecurityMLAnalyticsSettings_Delete ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -4750,7 +5686,8 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE); } } ``` @@ -4758,12 +5695,10 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples { ### SecurityMLAnalyticsSettings_Get ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -4774,7 +5709,7 @@ public final class SecurityMLAnalyticsSettingsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE); } } ``` @@ -4782,12 +5717,10 @@ public final class SecurityMLAnalyticsSettingsGetSamples { ### SecurityMLAnalyticsSettings_List ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -4796,7 +5729,7 @@ public final class SecurityMLAnalyticsSettingsListSamples { */ public static void getAllSecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); + manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4807,7 +5740,7 @@ public final class SecurityMLAnalyticsSettingsListSamples { /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -4829,12 +5762,10 @@ public final class SentinelOnboardingStatesCreateSamples { ### SentinelOnboardingStates_Delete ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -4843,7 +5774,9 @@ public final class SentinelOnboardingStatesDeleteSamples { */ public static void deleteSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } ``` @@ -4851,12 +5784,10 @@ public final class SentinelOnboardingStatesDeleteSamples { ### SentinelOnboardingStates_Get ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -4865,7 +5796,9 @@ public final class SentinelOnboardingStatesGetSamples { */ public static void getSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } ``` @@ -4873,12 +5806,10 @@ public final class SentinelOnboardingStatesGetSamples { ### SentinelOnboardingStates_List ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -4887,7 +5818,7 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4895,13 +5826,12 @@ public final class SentinelOnboardingStatesListSamples { ### SourceControl_ListRepositories ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.RepoType; /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -4909,7 +5839,9 @@ public final class SourceControlListRepositoriesSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); + manager + .sourceControls() + .listRepositories("myRg", "myWorkspace", RepoType.GITHUB, com.azure.core.util.Context.NONE); } } ``` @@ -4926,7 +5858,7 @@ import java.util.Arrays; /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. @@ -4966,12 +5898,10 @@ public final class SourceControlsOperationCreateSamples { ### SourceControlsOperation_Delete ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -4982,7 +5912,8 @@ public final class SourceControlsOperationDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } ``` @@ -4990,12 +5921,10 @@ public final class SourceControlsOperationDeleteSamples { ### SourceControlsOperation_Get ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -5005,7 +5934,8 @@ public final class SourceControlsOperationGetSamples { public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } ``` @@ -5013,12 +5943,10 @@ public final class SourceControlsOperationGetSamples { ### SourceControlsOperation_List ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -5027,7 +5955,7 @@ public final class SourceControlsOperationListSamples { */ public static void getAllSourceControls( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); + manager.sourceControlsOperations().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5035,14 +5963,13 @@ public final class SourceControlsOperationListSamples { ### ThreatIntelligenceIndicator_AppendTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -5058,7 +5985,7 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5066,14 +5993,13 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { ### ThreatIntelligenceIndicator_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -5106,7 +6032,7 @@ public final class ThreatIntelligenceIndicatorCreateSamples { .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5114,14 +6040,13 @@ public final class ThreatIntelligenceIndicatorCreateSamples { ### ThreatIntelligenceIndicator_CreateIndicator ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -5153,7 +6078,7 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { .withValidFrom("2021-09-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5161,12 +6086,10 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { ### ThreatIntelligenceIndicator_Delete ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -5177,7 +6100,8 @@ public final class ThreatIntelligenceIndicatorDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE); } } ``` @@ -5185,12 +6109,10 @@ public final class ThreatIntelligenceIndicatorDeleteSamples { ### ThreatIntelligenceIndicator_Get ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -5201,7 +6123,8 @@ public final class ThreatIntelligenceIndicatorGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } ``` @@ -5209,7 +6132,6 @@ public final class ThreatIntelligenceIndicatorGetSamples { ### ThreatIntelligenceIndicator_QueryIndicators ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; @@ -5218,7 +6140,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -5242,10 +6164,10 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { Arrays .asList( new ThreatIntelligenceSortingCriteria() - .withItemKey("lastUpdatedTimeUtc") + .withItemKey("fakeTokenPlaceholder") .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5253,14 +6175,13 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { ### ThreatIntelligenceIndicator_ReplaceTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -5278,7 +6199,7 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5286,12 +6207,10 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { ### ThreatIntelligenceIndicatorMetrics_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -5300,7 +6219,9 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { */ public static void getThreatIntelligenceIndicatorsMetrics( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager + .threatIntelligenceIndicatorMetrics() + .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5308,12 +6229,10 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { ### ThreatIntelligenceIndicatorsOperation_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -5324,7 +6243,62 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### TriggeredAnalyticsRuleRunOperation_Get + +```java +/** Samples for TriggeredAnalyticsRuleRunOperation Get. */ +public final class TriggeredAnalyticsRuleRunOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRun_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRun_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .triggeredAnalyticsRuleRunOperations() + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); + } +} +``` + +### Update_Recommendation + +```java +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.State; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for Update Recommendation. */ +public final class UpdateRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/PatchRecommendation.json + */ + /** + * Sample code: Creates a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsARecommendation( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .updates() + .recommendation( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + Arrays.asList(new RecommendationPatch().withState(State.ACTIVE)), + com.azure.core.util.Context.NONE); } } ``` @@ -5338,7 +6312,7 @@ import java.util.Map; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. @@ -5385,12 +6359,10 @@ public final class WatchlistItemsCreateOrUpdateSamples { ### WatchlistItems_Delete ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -5402,7 +6374,11 @@ public final class WatchlistItemsDeleteSamples { manager .watchlistItems() .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", + com.azure.core.util.Context.NONE); } } ``` @@ -5410,12 +6386,10 @@ public final class WatchlistItemsDeleteSamples { ### WatchlistItems_Get ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -5426,7 +6400,11 @@ public final class WatchlistItemsGetSamples { manager .watchlistItems() .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "3f8901fe-63d9-4875-9ad5-9fb3b8105797", + com.azure.core.util.Context.NONE); } } ``` @@ -5434,12 +6412,10 @@ public final class WatchlistItemsGetSamples { ### WatchlistItems_List ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -5448,7 +6424,7 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } ``` @@ -5461,7 +6437,7 @@ import com.azure.resourcemanager.securityinsights.models.SourceType; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -5488,7 +6464,7 @@ public final class WatchlistsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -5516,12 +6492,10 @@ public final class WatchlistsCreateOrUpdateSamples { ### Watchlists_Delete ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -5529,7 +6503,9 @@ public final class WatchlistsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager + .watchlists() + .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } ``` @@ -5537,12 +6513,10 @@ public final class WatchlistsDeleteSamples { ### Watchlists_Get ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -5550,7 +6524,7 @@ public final class WatchlistsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } ``` @@ -5558,12 +6532,10 @@ public final class WatchlistsGetSamples { ### Watchlists_List ```java -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -5571,7 +6543,195 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerConfigurations_CreateOrUpdate + +```java +import com.azure.resourcemanager.securityinsights.models.Mode; + +/** Samples for WorkspaceManagerConfigurations CreateOrUpdate. */ +public final class WorkspaceManagerConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/CreateOrUpdateWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Create or Update a workspace manager Configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createOrUpdateAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .define("default") + .withExistingWorkspace("myRg", "myWorkspace") + .withMode(Mode.ENABLED) + .create(); + } +} +``` + +### WorkspaceManagerConfigurations_Delete + +```java +/** Samples for WorkspaceManagerConfigurations Delete. */ +public final class WorkspaceManagerConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/DeleteWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Delete a workspace manager configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerConfigurations_Get + +```java +/** Samples for WorkspaceManagerConfigurations Get. */ +public final class WorkspaceManagerConfigurationsGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/GetWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Get a workspace manager configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerConfigurations_List + +```java +/** Samples for WorkspaceManagerConfigurations List. */ +public final class WorkspaceManagerConfigurationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/GetAllWorkspaceManagerConfigurations.json + */ + /** + * Sample code: Get all workspace manager configurations for a Sentinel workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllWorkspaceManagerConfigurationsForASentinelWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .list("myRg", "myWorkspace", null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerMembers_CreateOrUpdate + +```java +/** Samples for WorkspaceManagerMembers CreateOrUpdate. */ +public final class WorkspaceManagerMembersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/CreateOrUpdateWorkspaceManagerMember.json + */ + /** + * Sample code: Create or Update a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createOrUpdateAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .define("afbd324f-6c48-459c-8710-8d1e1cd03812") + .withExistingWorkspace("myRg", "myWorkspace") + .withTargetWorkspaceId( + "/subscriptions/7aef9d48-814f-45ad-b644-b0343316e174/resourceGroups/otherRg/providers/Microsoft.OperationalInsights/workspaces/Example_Workspace") + .withTargetWorkspaceTenantId("f676d436-8d16-42db-81b7-ab578e110ccd") + .create(); + } +} +``` + +### WorkspaceManagerMembers_Delete + +```java +/** Samples for WorkspaceManagerMembers Delete. */ +public final class WorkspaceManagerMembersDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/DeleteWorkspaceManagerMember.json + */ + /** + * Sample code: Delete a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .deleteWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerMembers_Get + +```java +/** Samples for WorkspaceManagerMembers Get. */ +public final class WorkspaceManagerMembersGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/GetWorkspaceManagerMember.json + */ + /** + * Sample code: Get a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .getWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceManagerMembers_List + +```java +/** Samples for WorkspaceManagerMembers List. */ +public final class WorkspaceManagerMembersListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/GetAllWorkspaceManagerMembers.json + */ + /** + * Sample code: Get all workspace manager members. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllWorkspaceManagerMembers( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .list("myRg", "myWorkspace", null, null, null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml index 2626b0f74cc40..0fa63c41fb6dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for SecurityInsights Management - This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09. + This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2023-04. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java index 6868ca4ea727a..dd1730bc5b3db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java @@ -25,12 +25,17 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; import com.azure.resourcemanager.securityinsights.implementation.ActionsImpl; +import com.azure.resourcemanager.securityinsights.implementation.AlertRuleOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.AlertRuleTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.AlertRulesImpl; import com.azure.resourcemanager.securityinsights.implementation.AutomationRulesImpl; import com.azure.resourcemanager.securityinsights.implementation.BookmarkOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.BookmarkRelationsImpl; import com.azure.resourcemanager.securityinsights.implementation.BookmarksImpl; +import com.azure.resourcemanager.securityinsights.implementation.ContentPackageOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ContentPackagesImpl; +import com.azure.resourcemanager.securityinsights.implementation.ContentTemplateOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ContentTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsCheckRequirementsOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsImpl; import com.azure.resourcemanager.securityinsights.implementation.DomainWhoisImpl; @@ -41,14 +46,22 @@ import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl; import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetRecommendationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetTriggeredAnalyticsRuleRunsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.IncidentTasksImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl; import com.azure.resourcemanager.securityinsights.implementation.IpGeodatasImpl; import com.azure.resourcemanager.securityinsights.implementation.MetadatasImpl; import com.azure.resourcemanager.securityinsights.implementation.OfficeConsentsImpl; import com.azure.resourcemanager.securityinsights.implementation.OperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ProductPackageOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ProductPackagesImpl; import com.azure.resourcemanager.securityinsights.implementation.ProductSettingsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ProductTemplateOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.ProductTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.SecurityInsightsBuilder; import com.azure.resourcemanager.securityinsights.implementation.SecurityMLAnalyticsSettingsImpl; import com.azure.resourcemanager.securityinsights.implementation.SentinelOnboardingStatesImpl; @@ -57,15 +70,24 @@ import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorMetricsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.TriggeredAnalyticsRuleRunOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.UpdatesImpl; import com.azure.resourcemanager.securityinsights.implementation.WatchlistItemsImpl; import com.azure.resourcemanager.securityinsights.implementation.WatchlistsImpl; +import com.azure.resourcemanager.securityinsights.implementation.WorkspaceManagerConfigurationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.WorkspaceManagerMembersImpl; import com.azure.resourcemanager.securityinsights.models.Actions; +import com.azure.resourcemanager.securityinsights.models.AlertRuleOperations; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; import com.azure.resourcemanager.securityinsights.models.AlertRules; import com.azure.resourcemanager.securityinsights.models.AutomationRules; import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; import com.azure.resourcemanager.securityinsights.models.Bookmarks; +import com.azure.resourcemanager.securityinsights.models.ContentPackageOperations; +import com.azure.resourcemanager.securityinsights.models.ContentPackages; +import com.azure.resourcemanager.securityinsights.models.ContentTemplateOperations; +import com.azure.resourcemanager.securityinsights.models.ContentTemplates; import com.azure.resourcemanager.securityinsights.models.DataConnectors; import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; import com.azure.resourcemanager.securityinsights.models.DomainWhois; @@ -76,14 +98,22 @@ import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; import com.azure.resourcemanager.securityinsights.models.EntityRelations; import com.azure.resourcemanager.securityinsights.models.FileImports; +import com.azure.resourcemanager.securityinsights.models.GetRecommendations; +import com.azure.resourcemanager.securityinsights.models.GetTriggeredAnalyticsRuleRuns; +import com.azure.resourcemanager.securityinsights.models.Gets; import com.azure.resourcemanager.securityinsights.models.IncidentComments; import com.azure.resourcemanager.securityinsights.models.IncidentRelations; +import com.azure.resourcemanager.securityinsights.models.IncidentTasks; import com.azure.resourcemanager.securityinsights.models.Incidents; import com.azure.resourcemanager.securityinsights.models.IpGeodatas; import com.azure.resourcemanager.securityinsights.models.Metadatas; import com.azure.resourcemanager.securityinsights.models.OfficeConsents; import com.azure.resourcemanager.securityinsights.models.Operations; +import com.azure.resourcemanager.securityinsights.models.ProductPackageOperations; +import com.azure.resourcemanager.securityinsights.models.ProductPackages; import com.azure.resourcemanager.securityinsights.models.ProductSettings; +import com.azure.resourcemanager.securityinsights.models.ProductTemplateOperations; +import com.azure.resourcemanager.securityinsights.models.ProductTemplates; import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates; import com.azure.resourcemanager.securityinsights.models.SourceControls; @@ -91,8 +121,12 @@ import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRunOperations; +import com.azure.resourcemanager.securityinsights.models.Updates; import com.azure.resourcemanager.securityinsights.models.WatchlistItems; import com.azure.resourcemanager.securityinsights.models.Watchlists; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerConfigurations; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerMembers; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -113,6 +147,8 @@ public final class SecurityInsightsManager { private AutomationRules automationRules; + private Entities entities; + private Incidents incidents; private Bookmarks bookmarks; @@ -121,12 +157,26 @@ public final class SecurityInsightsManager { private BookmarkOperations bookmarkOperations; + private ContentPackages contentPackages; + + private ContentPackageOperations contentPackageOperations; + + private ProductPackages productPackages; + + private ProductPackageOperations productPackageOperations; + + private ProductTemplates productTemplates; + + private ProductTemplateOperations productTemplateOperations; + + private ContentTemplates contentTemplates; + + private ContentTemplateOperations contentTemplateOperations; + private IpGeodatas ipGeodatas; private DomainWhois domainWhois; - private Entities entities; - private EntitiesGetTimelines entitiesGetTimelines; private EntitiesRelations entitiesRelations; @@ -143,12 +193,20 @@ public final class SecurityInsightsManager { private IncidentRelations incidentRelations; + private IncidentTasks incidentTasks; + private Metadatas metadatas; private OfficeConsents officeConsents; private SentinelOnboardingStates sentinelOnboardingStates; + private GetRecommendations getRecommendations; + + private Gets gets; + + private Updates updates; + private SecurityMLAnalyticsSettings securityMLAnalyticsSettings; private ProductSettings productSettings; @@ -163,10 +221,20 @@ public final class SecurityInsightsManager { private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; + private TriggeredAnalyticsRuleRunOperations triggeredAnalyticsRuleRunOperations; + + private GetTriggeredAnalyticsRuleRuns getTriggeredAnalyticsRuleRuns; + + private AlertRuleOperations alertRuleOperations; + private Watchlists watchlists; private WatchlistItems watchlistItems; + private WorkspaceManagerConfigurations workspaceManagerConfigurations; + + private WorkspaceManagerMembers workspaceManagerMembers; + private DataConnectors dataConnectors; private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; @@ -338,7 +406,7 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.securityinsights") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -443,6 +511,18 @@ public AutomationRules automationRules() { return automationRules; } + /** + * Gets the resource collection API of Entities. + * + * @return Resource collection API of Entities. + */ + public Entities entities() { + if (this.entities == null) { + this.entities = new EntitiesImpl(clientObject.getEntities(), this); + } + return entities; + } + /** * Gets the resource collection API of Incidents. It manages Incident. * @@ -491,6 +571,106 @@ public BookmarkOperations bookmarkOperations() { return bookmarkOperations; } + /** + * Gets the resource collection API of ContentPackages. + * + * @return Resource collection API of ContentPackages. + */ + public ContentPackages contentPackages() { + if (this.contentPackages == null) { + this.contentPackages = new ContentPackagesImpl(clientObject.getContentPackages(), this); + } + return contentPackages; + } + + /** + * Gets the resource collection API of ContentPackageOperations. It manages PackageModel. + * + * @return Resource collection API of ContentPackageOperations. + */ + public ContentPackageOperations contentPackageOperations() { + if (this.contentPackageOperations == null) { + this.contentPackageOperations = + new ContentPackageOperationsImpl(clientObject.getContentPackageOperations(), this); + } + return contentPackageOperations; + } + + /** + * Gets the resource collection API of ProductPackages. + * + * @return Resource collection API of ProductPackages. + */ + public ProductPackages productPackages() { + if (this.productPackages == null) { + this.productPackages = new ProductPackagesImpl(clientObject.getProductPackages(), this); + } + return productPackages; + } + + /** + * Gets the resource collection API of ProductPackageOperations. + * + * @return Resource collection API of ProductPackageOperations. + */ + public ProductPackageOperations productPackageOperations() { + if (this.productPackageOperations == null) { + this.productPackageOperations = + new ProductPackageOperationsImpl(clientObject.getProductPackageOperations(), this); + } + return productPackageOperations; + } + + /** + * Gets the resource collection API of ProductTemplates. + * + * @return Resource collection API of ProductTemplates. + */ + public ProductTemplates productTemplates() { + if (this.productTemplates == null) { + this.productTemplates = new ProductTemplatesImpl(clientObject.getProductTemplates(), this); + } + return productTemplates; + } + + /** + * Gets the resource collection API of ProductTemplateOperations. + * + * @return Resource collection API of ProductTemplateOperations. + */ + public ProductTemplateOperations productTemplateOperations() { + if (this.productTemplateOperations == null) { + this.productTemplateOperations = + new ProductTemplateOperationsImpl(clientObject.getProductTemplateOperations(), this); + } + return productTemplateOperations; + } + + /** + * Gets the resource collection API of ContentTemplates. + * + * @return Resource collection API of ContentTemplates. + */ + public ContentTemplates contentTemplates() { + if (this.contentTemplates == null) { + this.contentTemplates = new ContentTemplatesImpl(clientObject.getContentTemplates(), this); + } + return contentTemplates; + } + + /** + * Gets the resource collection API of ContentTemplateOperations. It manages TemplateModelAutoGenerated. + * + * @return Resource collection API of ContentTemplateOperations. + */ + public ContentTemplateOperations contentTemplateOperations() { + if (this.contentTemplateOperations == null) { + this.contentTemplateOperations = + new ContentTemplateOperationsImpl(clientObject.getContentTemplateOperations(), this); + } + return contentTemplateOperations; + } + /** * Gets the resource collection API of IpGeodatas. * @@ -515,18 +695,6 @@ public DomainWhois domainWhois() { return domainWhois; } - /** - * Gets the resource collection API of Entities. - * - * @return Resource collection API of Entities. - */ - public Entities entities() { - if (this.entities == null) { - this.entities = new EntitiesImpl(clientObject.getEntities(), this); - } - return entities; - } - /** * Gets the resource collection API of EntitiesGetTimelines. * @@ -623,6 +791,18 @@ public IncidentRelations incidentRelations() { return incidentRelations; } + /** + * Gets the resource collection API of IncidentTasks. It manages IncidentTask. + * + * @return Resource collection API of IncidentTasks. + */ + public IncidentTasks incidentTasks() { + if (this.incidentTasks == null) { + this.incidentTasks = new IncidentTasksImpl(clientObject.getIncidentTasks(), this); + } + return incidentTasks; + } + /** * Gets the resource collection API of Metadatas. It manages MetadataModel. * @@ -660,6 +840,42 @@ public SentinelOnboardingStates sentinelOnboardingStates() { return sentinelOnboardingStates; } + /** + * Gets the resource collection API of GetRecommendations. + * + * @return Resource collection API of GetRecommendations. + */ + public GetRecommendations getRecommendations() { + if (this.getRecommendations == null) { + this.getRecommendations = new GetRecommendationsImpl(clientObject.getGetRecommendations(), this); + } + return getRecommendations; + } + + /** + * Gets the resource collection API of Gets. + * + * @return Resource collection API of Gets. + */ + public Gets gets() { + if (this.gets == null) { + this.gets = new GetsImpl(clientObject.getGets(), this); + } + return gets; + } + + /** + * Gets the resource collection API of Updates. + * + * @return Resource collection API of Updates. + */ + public Updates updates() { + if (this.updates == null) { + this.updates = new UpdatesImpl(clientObject.getUpdates(), this); + } + return updates; + } + /** * Gets the resource collection API of SecurityMLAnalyticsSettings. * @@ -750,6 +966,45 @@ public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { return threatIntelligenceIndicatorMetrics; } + /** + * Gets the resource collection API of TriggeredAnalyticsRuleRunOperations. + * + * @return Resource collection API of TriggeredAnalyticsRuleRunOperations. + */ + public TriggeredAnalyticsRuleRunOperations triggeredAnalyticsRuleRunOperations() { + if (this.triggeredAnalyticsRuleRunOperations == null) { + this.triggeredAnalyticsRuleRunOperations = + new TriggeredAnalyticsRuleRunOperationsImpl( + clientObject.getTriggeredAnalyticsRuleRunOperations(), this); + } + return triggeredAnalyticsRuleRunOperations; + } + + /** + * Gets the resource collection API of GetTriggeredAnalyticsRuleRuns. + * + * @return Resource collection API of GetTriggeredAnalyticsRuleRuns. + */ + public GetTriggeredAnalyticsRuleRuns getTriggeredAnalyticsRuleRuns() { + if (this.getTriggeredAnalyticsRuleRuns == null) { + this.getTriggeredAnalyticsRuleRuns = + new GetTriggeredAnalyticsRuleRunsImpl(clientObject.getGetTriggeredAnalyticsRuleRuns(), this); + } + return getTriggeredAnalyticsRuleRuns; + } + + /** + * Gets the resource collection API of AlertRuleOperations. + * + * @return Resource collection API of AlertRuleOperations. + */ + public AlertRuleOperations alertRuleOperations() { + if (this.alertRuleOperations == null) { + this.alertRuleOperations = new AlertRuleOperationsImpl(clientObject.getAlertRuleOperations(), this); + } + return alertRuleOperations; + } + /** * Gets the resource collection API of Watchlists. It manages Watchlist. * @@ -774,6 +1029,32 @@ public WatchlistItems watchlistItems() { return watchlistItems; } + /** + * Gets the resource collection API of WorkspaceManagerConfigurations. It manages WorkspaceManagerConfiguration. + * + * @return Resource collection API of WorkspaceManagerConfigurations. + */ + public WorkspaceManagerConfigurations workspaceManagerConfigurations() { + if (this.workspaceManagerConfigurations == null) { + this.workspaceManagerConfigurations = + new WorkspaceManagerConfigurationsImpl(clientObject.getWorkspaceManagerConfigurations(), this); + } + return workspaceManagerConfigurations; + } + + /** + * Gets the resource collection API of WorkspaceManagerMembers. It manages WorkspaceManagerMember. + * + * @return Resource collection API of WorkspaceManagerMembers. + */ + public WorkspaceManagerMembers workspaceManagerMembers() { + if (this.workspaceManagerMembers == null) { + this.workspaceManagerMembers = + new WorkspaceManagerMembersImpl(clientObject.getWorkspaceManagerMembers(), this); + } + return workspaceManagerMembers; + } + /** * Gets the resource collection API of DataConnectors. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java index 1679ca2138ad0..18cfd50a24315 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java @@ -44,21 +44,6 @@ public interface ActionsClient { PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - /** * Gets the action of alert rule. * @@ -77,21 +62,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** - * Creates or updates the action of alert rule. + * Gets the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); + ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Creates or updates the action of alert rule. @@ -117,18 +100,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the action of alert rule. + * Creates or updates the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); /** * Delete the action of alert rule. @@ -146,4 +132,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + + /** + * Delete the action of alert rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param actionId Action 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java new file mode 100644 index 0000000000000..7cd2bdbeb6c94 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; + +/** An instance of this class provides access to all the operations defined in AlertRuleOperationsClient. */ +public interface AlertRuleOperationsClient { + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java index c568ee0f23feb..1747732b0446d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java @@ -46,13 +46,15 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -60,13 +62,11 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index d40ca296e5fc6..c77a3e9fa2fa2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java @@ -46,13 +46,15 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -60,15 +62,13 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -93,15 +94,14 @@ AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -109,12 +109,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -122,12 +124,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 8bdfc546a32d2..1e448c15a2037 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java @@ -13,20 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); - /** * Gets the automation rule. * @@ -44,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Creates or updates the automation rule. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -52,10 +38,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -79,7 +65,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -87,10 +73,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -108,6 +94,20 @@ Response createOrUpdateWithResponse( Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + /** + * Delete the automation rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + /** * Gets all automation rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java index 1d63a4251db12..036b2b83f4368 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java @@ -20,14 +20,19 @@ public interface BookmarkOperationsClient { * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); + Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context); /** * Expand an bookmark. @@ -36,17 +41,12 @@ BookmarkExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); + BookmarkExpandResponseInner expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java index e644d527b90a3..0b823c7fb706a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java @@ -56,21 +56,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation 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 a bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - /** * Gets a bookmark relation. * @@ -89,21 +74,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** - * Creates the bookmark relation. + * Gets a bookmark relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return a bookmark relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); + RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Creates the bookmark relation. @@ -129,18 +112,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the bookmark relation. + * Creates the bookmark relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + RelationInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); /** * Delete the bookmark relation. @@ -158,4 +144,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + + /** + * Delete the bookmark relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param bookmarkId Bookmark ID. + * @param relationName Relation 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java index 767fec60845b3..0e9d306ada842 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java @@ -46,13 +46,15 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -60,15 +62,13 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Creates or updates the bookmark. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); /** * Creates or updates the bookmark. @@ -93,15 +94,14 @@ BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); + BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); /** * Delete the bookmark. @@ -109,12 +109,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -122,13 +125,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackageOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackageOperationsClient.java new file mode 100644 index 0000000000000..86a1384503ad6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackageOperationsClient.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.azure.resourcemanager.securityinsights.models.PackageInstallationProperties; + +/** An instance of this class provides access to all the operations defined in ContentPackageOperationsClient. */ +public interface ContentPackageOperationsClient { + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response installWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties, + Context context); + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageModelInner install( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties); + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response uninstallWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context); + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void uninstall(String resourceGroupName, String workspaceName, String packageId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackagesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackagesClient.java new file mode 100644 index 0000000000000..870ee3ac095ec --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentPackagesClient.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; + +/** An instance of this class provides access to all the operations defined in ContentPackagesClient. */ +public interface ContentPackagesClient { + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed packages as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed packages as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an installed packages by its id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 an installed packages by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageModelInner get(String resourceGroupName, String workspaceName, String packageId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplateOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplateOperationsClient.java new file mode 100644 index 0000000000000..26234407f0543 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplateOperationsClient.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.TemplateInstallationProperties; + +/** An instance of this class provides access to all the operations defined in ContentTemplateOperationsClient. */ +public interface ContentTemplateOperationsClient { + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @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 template resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response installWithResponse( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties, + Context context); + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return template resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TemplateModelAutoGeneratedInner install( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties); + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template byt its identifier along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template byt its identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TemplateModelAutoGeneratedInner get(String resourceGroupName, String workspaceName, String templateId); + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String templateId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplatesClient.java new file mode 100644 index 0000000000000..0c818934e3b0c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ContentTemplatesClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; + +/** An instance of this class provides access to all the operations defined in ContentTemplatesClient. */ +public interface ContentTemplatesClient { + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed templates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed templates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java index 146c3f4c17933..55a1fe985fac9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java @@ -22,16 +22,18 @@ public interface DataConnectorsCheckRequirementsOperationsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @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 requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorRequirementsStateInner post( + Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context); /** * Get requirements state for a data connector type. @@ -39,16 +41,14 @@ DataConnectorRequirementsStateInner post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse( + DataConnectorRequirementsStateInner post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java index 78d1cc36c200c..4763778493a5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java @@ -41,20 +41,6 @@ public interface DataConnectorsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector 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 a data connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -72,20 +58,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -109,17 +93,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -138,19 +125,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Connects a data connector. @@ -174,17 +159,19 @@ Response connectWithResponse( Context context); /** - * Disconnect a data connector. + * Connects a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); + void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); /** * Disconnect a data connector. @@ -201,4 +188,17 @@ Response connectWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response disconnectWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + + /** + * Disconnect a data connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataConnectorId Connector 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java index e9ae9d9fcfedd..250fe4b189d44 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java @@ -17,25 +17,25 @@ public interface DomainWhoisClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. + * @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 whois information for a single domain name. + * @return whois information for a single domain name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); + Response getWithResponse(String resourceGroupName, String domain, Context context); /** * Get whois information for a single domain name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @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 whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String domain, Context context); + EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java index 28404013fdcbe..a46f8d6f2c71d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java @@ -16,49 +16,70 @@ import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; +import com.azure.resourcemanager.securityinsights.models.EntityManualTriggerRequestBody; /** An instance of this class provides access to all the operations defined in EntitiesClient. */ public interface EntitiesClient { /** - * Gets all entities. + * Triggers playbook on a specific entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @param requestBody Describes the request body for triggering a playbook on an entity. + * @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 all entities as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody, + Context context); + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void runPlaybook(String resourceGroupName, String workspaceName, String entityIdentifier); /** * Gets all entities. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets an entity. + * Gets all entities. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param entityId entity ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. + * @return all entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityInner get(String resourceGroupName, String workspaceName, String entityId); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Gets an entity. @@ -77,20 +98,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityId, Context context); /** - * Expands an entity. + * Gets an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); + EntityInner get(String resourceGroupName, String workspaceName, String entityId); /** * Expands an entity. @@ -114,20 +133,20 @@ Response expandWithResponse( Context context); /** - * Get Insights and Activities for an entity. + * Expands an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param kind The Kind parameter for queries. + * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); + EntityExpandResponseInner expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); /** * Get Insights and Activities for an entity. @@ -147,20 +166,20 @@ Response queriesWithResponse( String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); /** - * Execute Insights for an entity. + * Get Insights and Activities for an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. + * @param kind The Kind parameter for queries. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return insights and Activities for an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); + GetQueriesResponseInner queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); /** * Execute Insights for an entity. @@ -182,4 +201,20 @@ Response getInsightsWithResponse( String entityId, EntityGetInsightsParameters parameters, Context context); + + /** + * Execute Insights for an entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityId entity ID. + * @param parameters The parameters required to execute insights on the given entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Get Insights result operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EntityGetInsightsResponseInner getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java index bfa335c3065ee..e5cb96dad5214 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java @@ -20,14 +20,19 @@ public interface EntitiesGetTimelinesClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); + Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context); /** * Timeline for an entity. @@ -36,17 +41,12 @@ EntityTimelineResponseInner list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); + EntityTimelineResponseInner list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java index 68ba3c6be0c38..82117433e1883 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java @@ -44,20 +44,6 @@ public interface EntityQueriesClient { PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query 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 an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); - /** * Gets an entity query. * @@ -75,20 +61,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); /** - * Creates or updates the entity query. + * Gets an entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); + EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); /** * Creates or updates the entity query. @@ -112,17 +96,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the entity query. + * Creates or updates the entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String entityQueryId); + EntityQueryInner createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); /** * Delete the entity query. @@ -139,4 +126,17 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); + + /** + * Delete the entity query. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityQueryId entity query 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String entityQueryId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java index 96c60a276daef..21fcbda551712 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java @@ -10,7 +10,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant99; /** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ public interface EntityQueryTemplatesClient { @@ -41,7 +41,7 @@ public interface EntityQueryTemplatesClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); + String resourceGroupName, String workspaceName, Constant99 kind, Context context); /** * Gets an entity query. @@ -49,13 +49,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); /** * Gets an entity query. @@ -63,13 +65,11 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); + EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java index 9f6c0165269d7..3e639cbd1f196 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java @@ -19,13 +19,15 @@ public interface EntityRelationsClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); + Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); /** * Gets an entity relation. @@ -34,13 +36,11 @@ public interface EntityRelationsClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); + RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java index 91450d050bdea..78fe1246fb250 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java @@ -61,13 +61,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context); /** * Gets a file import. @@ -75,15 +77,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); + FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); /** * Creates the file import. @@ -92,14 +92,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. + * @return represents a file import in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); + Response createWithResponse( + String resourceGroupName, + String workspaceName, + String fileImportId, + FileImportInner fileImport, + Context context); /** * Creates the file import. @@ -108,19 +113,14 @@ FileImportInner create( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. + * @return represents a file import in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context); + FileImportInner create( + String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); /** * Delete the file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java new file mode 100644 index 0000000000000..033e2193ceb48 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; + +/** An instance of this class provides access to all the operations defined in GetRecommendationsClient. */ +public interface GetRecommendationsClient { + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationListInner list(String resourceGroupName, String workspaceName); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java new file mode 100644 index 0000000000000..8e65e0fbb1c32 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; + +/** An instance of this class provides access to all the operations defined in GetTriggeredAnalyticsRuleRunsClient. */ +public interface GetTriggeredAnalyticsRuleRunsClient { + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java new file mode 100644 index 0000000000000..bebc957f54575 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import java.util.UUID; + +/** An instance of this class provides access to all the operations defined in GetsClient. */ +public interface GetsClient { + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context); + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation 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 a recommendation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner singleRecommendation(String resourceGroupName, String workspaceName, UUID recommendationId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java index c8f34adc35784..6d88b1dfaa7b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java @@ -63,14 +63,15 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Gets an incident comment. @@ -79,15 +80,14 @@ IncidentCommentInner get( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentCommentInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Creates or updates the incident comment. @@ -97,18 +97,20 @@ Response getWithResponse( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. + * @return represents an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment); + IncidentCommentInner incidentComment, + Context context); /** * Creates or updates the incident comment. @@ -118,20 +120,18 @@ IncidentCommentInner createOrUpdate( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. + * @return represents an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + IncidentCommentInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment, - Context context); + IncidentCommentInner incidentComment); /** * Delete the incident comment. @@ -140,12 +140,15 @@ Response createOrUpdateWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Delete the incident comment. @@ -154,13 +157,10 @@ Response createOrUpdateWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java index 8f2125a0506df..c3348eddef7de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java @@ -56,21 +56,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation 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 an incident relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - /** * Gets an incident relation. * @@ -89,21 +74,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Gets an incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return an incident relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** * Creates or updates the incident relation. @@ -129,18 +112,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the incident relation. + * Creates or updates the incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + RelationInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); /** * Delete the incident relation. @@ -158,4 +144,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + + /** + * Delete the incident relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param relationName Relation 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java new file mode 100644 index 0000000000000..176e702b25299 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; + +/** An instance of this class provides access to all the operations defined in IncidentTasksClient. */ +public interface IncidentTasksClient { + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 an incident task. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentTaskInner get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask, + Context context); + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentTaskInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java index 12e0bda1f5e85..0205c001fdc3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java @@ -15,7 +15,6 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ public interface IncidentsClient { @@ -25,13 +24,20 @@ public interface IncidentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @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 any object. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); /** * Triggers playbook on a specific incident. @@ -39,20 +45,13 @@ public interface IncidentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @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 any object along with {@link Response}. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); /** * Gets all incidents. @@ -94,20 +93,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident 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 an incident. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); - /** * Gets an incident. * @@ -125,20 +110,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates or updates the incident. + * Gets an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); + IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); /** * Creates or updates the incident. @@ -151,24 +134,27 @@ IncidentInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context); /** - * Delete the incident. + * Creates or updates the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId); + IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); /** * Delete the incident. @@ -187,20 +173,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Delete the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. @@ -220,22 +203,24 @@ Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context); /** - * Gets all incident alerts. + * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident alerts. + * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); + TeamInformationInner createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -254,7 +239,7 @@ Response listAlertsWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -262,10 +247,10 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident bookmarks. + * @return all incident alerts. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); + IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident bookmarks. @@ -284,7 +269,7 @@ Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -292,10 +277,10 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident related entities. + * @return all incident bookmarks. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); + IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident related entities. @@ -312,4 +297,18 @@ Response listBookmarksWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets all incident related entities. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident related entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java index 50c85d732cb84..7edc1995d469d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java @@ -17,25 +17,25 @@ public interface IpGeodatasClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @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 geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); + Response getWithResponse(String resourceGroupName, String ipAddress, Context context); /** * Get geodata for a single IP address. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); + EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java index a42eaa9112f18..c54168b52e0dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java @@ -53,20 +53,6 @@ PagedIterable list( Integer skip, Context context); - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata 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 a Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); - /** * Get a Metadata. * @@ -84,7 +70,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Delete a Metadata. + * Get a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -92,9 +78,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Metadata. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String metadataName); + MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -113,20 +100,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Create a Metadata. + * Delete a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Create a Metadata. @@ -150,20 +134,20 @@ Response createWithResponse( Context context); /** - * Update an existing Metadata. + * Create a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. + * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); + MetadataModelInner create( + String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); /** * Update an existing Metadata. @@ -185,4 +169,20 @@ Response updateWithResponse( String metadataName, MetadataPatch metadataPatch, Context context); + + /** + * Update an existing Metadata. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param metadataName The Metadata name. + * @param metadataPatch Partial metadata request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetadataModelInner update( + String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java index 09ab2236789b7..2a7969042a81a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java @@ -46,13 +46,15 @@ public interface OfficeConsentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Gets an office365 consent. @@ -60,15 +62,13 @@ public interface OfficeConsentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); /** * Delete the office365 consent. @@ -76,12 +76,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String consentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Delete the office365 consent. @@ -89,13 +92,10 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + void delete(String resourceGroupName, String workspaceName, String consentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackageOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackageOperationsClient.java new file mode 100644 index 0000000000000..12f4aa3fe9953 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackageOperationsClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; + +/** An instance of this class provides access to all the operations defined in ProductPackageOperationsClient. */ +public interface ProductPackageOperationsClient { + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a package by its identifier from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context); + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 a package by its identifier from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageModelAutoGeneratedInner get(String resourceGroupName, String workspaceName, String packageId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackagesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackagesClient.java new file mode 100644 index 0000000000000..83825801fe809 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductPackagesClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; + +/** An instance of this class provides access to all the operations defined in ProductPackagesClient. */ +public interface ProductPackagesClient { + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all packages from the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all packages from the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java index ddb0f006d6b3c..3711cbf68a268 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java @@ -18,27 +18,27 @@ public interface ProductSettingsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. + * @return list of all the settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); /** * List of all the settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. + * @return list of all the settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + SettingListInner list(String resourceGroupName, String workspaceName); /** * Gets a setting. @@ -46,13 +46,15 @@ public interface ProductSettingsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. + * @return a setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context); /** * Gets a setting. @@ -60,15 +62,13 @@ public interface ProductSettingsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. + * @return a setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); + SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); /** * Delete setting of the product. @@ -76,12 +76,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context); /** * Delete setting of the product. @@ -89,15 +92,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsName); /** * Updates setting. @@ -106,13 +106,15 @@ Response deleteWithResponse( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. + * @return the Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); + Response updateWithResponse( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); /** * Updates setting. @@ -121,13 +123,11 @@ Response deleteWithResponse( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. + * @return the Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); + SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplateOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplateOperationsClient.java new file mode 100644 index 0000000000000..44774e8ee7fdb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplateOperationsClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; + +/** An instance of this class provides access to all the operations defined in ProductTemplateOperationsClient. */ +public interface ProductTemplateOperationsClient { + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template by its identifier along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template by its identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TemplateModelInner get(String resourceGroupName, String workspaceName, String templateId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplatesClient.java new file mode 100644 index 0000000000000..874481394ad17 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductTemplatesClient.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; + +/** An instance of this class provides access to all the operations defined in ProductTemplatesClient. */ +public interface ProductTemplatesClient { + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all templates in the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all templates in the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java index 4d9c0b816c820..f4b025e0c7800 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java @@ -72,6 +72,13 @@ public interface SecurityInsights { */ AutomationRulesClient getAutomationRules(); + /** + * Gets the EntitiesClient object to access its operations. + * + * @return the EntitiesClient object. + */ + EntitiesClient getEntities(); + /** * Gets the IncidentsClient object to access its operations. * @@ -100,6 +107,62 @@ public interface SecurityInsights { */ BookmarkOperationsClient getBookmarkOperations(); + /** + * Gets the ContentPackagesClient object to access its operations. + * + * @return the ContentPackagesClient object. + */ + ContentPackagesClient getContentPackages(); + + /** + * Gets the ContentPackageOperationsClient object to access its operations. + * + * @return the ContentPackageOperationsClient object. + */ + ContentPackageOperationsClient getContentPackageOperations(); + + /** + * Gets the ProductPackagesClient object to access its operations. + * + * @return the ProductPackagesClient object. + */ + ProductPackagesClient getProductPackages(); + + /** + * Gets the ProductPackageOperationsClient object to access its operations. + * + * @return the ProductPackageOperationsClient object. + */ + ProductPackageOperationsClient getProductPackageOperations(); + + /** + * Gets the ProductTemplatesClient object to access its operations. + * + * @return the ProductTemplatesClient object. + */ + ProductTemplatesClient getProductTemplates(); + + /** + * Gets the ProductTemplateOperationsClient object to access its operations. + * + * @return the ProductTemplateOperationsClient object. + */ + ProductTemplateOperationsClient getProductTemplateOperations(); + + /** + * Gets the ContentTemplatesClient object to access its operations. + * + * @return the ContentTemplatesClient object. + */ + ContentTemplatesClient getContentTemplates(); + + /** + * Gets the ContentTemplateOperationsClient object to access its operations. + * + * @return the ContentTemplateOperationsClient object. + */ + ContentTemplateOperationsClient getContentTemplateOperations(); + /** * Gets the IpGeodatasClient object to access its operations. * @@ -114,13 +177,6 @@ public interface SecurityInsights { */ DomainWhoisClient getDomainWhois(); - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - EntitiesClient getEntities(); - /** * Gets the EntitiesGetTimelinesClient object to access its operations. * @@ -177,6 +233,13 @@ public interface SecurityInsights { */ IncidentRelationsClient getIncidentRelations(); + /** + * Gets the IncidentTasksClient object to access its operations. + * + * @return the IncidentTasksClient object. + */ + IncidentTasksClient getIncidentTasks(); + /** * Gets the MetadatasClient object to access its operations. * @@ -198,6 +261,27 @@ public interface SecurityInsights { */ SentinelOnboardingStatesClient getSentinelOnboardingStates(); + /** + * Gets the GetRecommendationsClient object to access its operations. + * + * @return the GetRecommendationsClient object. + */ + GetRecommendationsClient getGetRecommendations(); + + /** + * Gets the GetsClient object to access its operations. + * + * @return the GetsClient object. + */ + GetsClient getGets(); + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + UpdatesClient getUpdates(); + /** * Gets the SecurityMLAnalyticsSettingsClient object to access its operations. * @@ -247,6 +331,27 @@ public interface SecurityInsights { */ ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); + /** + * Gets the TriggeredAnalyticsRuleRunOperationsClient object to access its operations. + * + * @return the TriggeredAnalyticsRuleRunOperationsClient object. + */ + TriggeredAnalyticsRuleRunOperationsClient getTriggeredAnalyticsRuleRunOperations(); + + /** + * Gets the GetTriggeredAnalyticsRuleRunsClient object to access its operations. + * + * @return the GetTriggeredAnalyticsRuleRunsClient object. + */ + GetTriggeredAnalyticsRuleRunsClient getGetTriggeredAnalyticsRuleRuns(); + + /** + * Gets the AlertRuleOperationsClient object to access its operations. + * + * @return the AlertRuleOperationsClient object. + */ + AlertRuleOperationsClient getAlertRuleOperations(); + /** * Gets the WatchlistsClient object to access its operations. * @@ -261,6 +366,20 @@ public interface SecurityInsights { */ WatchlistItemsClient getWatchlistItems(); + /** + * Gets the WorkspaceManagerConfigurationsClient object to access its operations. + * + * @return the WorkspaceManagerConfigurationsClient object. + */ + WorkspaceManagerConfigurationsClient getWorkspaceManagerConfigurations(); + + /** + * Gets the WorkspaceManagerMembersClient object to access its operations. + * + * @return the WorkspaceManagerMembersClient object. + */ + WorkspaceManagerMembersClient getWorkspaceManagerMembers(); + /** * Gets the DataConnectorsClient object to access its operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java index 421b464275887..4a2af29bc349b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java @@ -47,13 +47,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -61,15 +63,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -78,17 +78,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @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 security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -97,19 +99,17 @@ SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -117,12 +117,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -130,13 +133,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java index 10a75e9aee2e0..500eef1cdbded 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java @@ -13,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ public interface SentinelOnboardingStatesClient { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - /** * Get Sentinel onboarding state. * @@ -45,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Create Sentinel onboarding state. + * Get Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -56,7 +41,7 @@ Response getWithResponse( * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner create( + SentinelOnboardingStateInner get( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** @@ -81,7 +66,7 @@ Response createWithResponse( Context context); /** - * Delete Sentinel onboarding state. + * Create Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -89,9 +74,11 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + SentinelOnboardingStateInner create( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -110,17 +97,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Gets all Sentinel onboarding states. + * Delete Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. @@ -136,4 +123,17 @@ Response deleteWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Gets all Sentinel onboarding states. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Sentinel onboarding states. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java index cbf7109c8ebbc..c5f05f4d7c0cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java @@ -40,20 +40,6 @@ public interface SourceControlsOperationsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control 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 a source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); - /** * Gets a source control byt its identifier. * @@ -71,7 +57,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** - * Delete a source control. + * Gets a source control byt its identifier. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -79,9 +65,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 source control byt its identifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sourceControlId); + SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); /** * Delete a source control. @@ -100,20 +87,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** - * Creates a source control. + * Delete a source control. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); + void delete(String resourceGroupName, String workspaceName, String sourceControlId); /** * Creates a source control. @@ -135,4 +119,20 @@ Response createWithResponse( String sourceControlId, SourceControlInner sourceControl, Context context); + + /** + * Creates a source control. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param sourceControlId Source control Id. + * @param sourceControl The SourceControl. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a SourceControl in Azure Security Insights. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SourceControlInner create( + String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java index 326b9eedc2e1d..7c8b95c16111d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java @@ -19,27 +19,27 @@ public interface ThreatIntelligenceIndicatorMetricsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 1e34a2b75f055..b8bcc35455e34 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java @@ -16,21 +16,6 @@ /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public interface ThreatIntelligenceIndicatorsClient { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -51,18 +36,19 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -81,23 +67,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -121,17 +102,23 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -148,6 +135,19 @@ Response createWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -191,16 +191,19 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -209,19 +212,16 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -230,17 +230,19 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @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 threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -249,17 +251,15 @@ ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceTagsWithResponse( + ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java new file mode 100644 index 0000000000000..8f00e32a20b41 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; + +/** + * An instance of this class provides access to all the operations defined in TriggeredAnalyticsRuleRunOperationsClient. + */ +public interface TriggeredAnalyticsRuleRunOperationsClient { + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context); + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredAnalyticsRuleRunInner get(String resourceGroupName, String workspaceName, String ruleRunId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java new file mode 100644 index 0000000000000..6eb19141c6ad6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import java.util.List; +import java.util.UUID; + +/** An instance of this class provides access to all the operations defined in UpdatesClient. */ +public interface UpdatesClient { + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java index 80ba49f0d3be4..122ba7a8ee9cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java @@ -53,14 +53,15 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Gets a watchlist, without its watchlist items. @@ -69,15 +70,14 @@ WatchlistItemInner get( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. @@ -86,12 +86,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. @@ -100,15 +103,12 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Creates or updates a watchlist item. @@ -118,18 +118,20 @@ Response deleteWithResponse( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem); + WatchlistItemInner watchlistItem, + Context context); /** * Creates or updates a watchlist item. @@ -139,18 +141,16 @@ WatchlistItemInner createOrUpdate( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context); + WatchlistItemInner watchlistItem); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java index 10b174e1207f9..682536c9ff543 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java @@ -52,13 +52,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Gets a watchlist, without its watchlist items. @@ -66,15 +68,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. @@ -82,12 +82,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. @@ -95,15 +98,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To @@ -116,14 +116,19 @@ WatchlistsDeleteResponse deleteWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); + WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To @@ -136,17 +141,12 @@ WatchlistInner createOrUpdate( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context); + WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerConfigurationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerConfigurationsClient.java new file mode 100644 index 0000000000000..063a2af5cbcdd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerConfigurationsClient.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; + +/** An instance of this class provides access to all the operations defined in WorkspaceManagerConfigurationsClient. */ +public interface WorkspaceManagerConfigurationsClient { + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken, Context context); + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context); + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 workspace manager configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceManagerConfigurationInner get( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName); + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context); + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName); + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration, + Context context); + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceManagerConfigurationInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerMembersClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerMembersClient.java new file mode 100644 index 0000000000000..3411c91d2e49a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WorkspaceManagerMembersClient.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; + +/** An instance of this class provides access to all the operations defined in WorkspaceManagerMembersClient. */ +public interface WorkspaceManagerMembersClient { + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken, Context context); + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager member along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context); + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 workspace manager member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceManagerMemberInner get(String resourceGroupName, String workspaceName, String workspaceManagerMemberName); + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember, + Context context); + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceManagerMemberInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember); + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context); + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String workspaceManagerMemberName); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java index ca6a6d8e19e0c..468850febe04f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java @@ -7,9 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -/** AAD (Azure Active Directory) requirements check properties. */ +/** AADIP (Azure Active Directory Identity Protection) requirements check properties. */ @Fluent public final class AadCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of AadCheckRequirementsProperties class. */ + public AadCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public AadCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java index be85a145cdd0a..2d1f8e6ea0401 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java @@ -9,7 +9,7 @@ import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.fasterxml.jackson.annotation.JsonProperty; -/** AAD (Azure Active Directory) data connector properties. */ +/** AADIP (Azure Active Directory Identity Protection) data connector properties. */ @Fluent public final class AadDataConnectorProperties extends DataConnectorTenantId { /* @@ -18,6 +18,10 @@ public final class AadDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AadDataConnectorProperties class. */ + public AadDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java index ee6d93cd9141e..6c7b1aeb9e0c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** AATP (Azure Advanced Threat Protection) requirements check properties. */ @Fluent public final class AatpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of AatpCheckRequirementsProperties class. */ + public AatpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public AatpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java index 3a0bdc1ed428b..40f02df994d0b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AatpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AatpDataConnectorProperties class. */ + public AatpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java index 22c53e70b3363..1563c755d3e16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java @@ -86,6 +86,10 @@ public final class AccountEntityProperties extends EntityCommonProperties { @JsonProperty(value = "dnsDomain", access = JsonProperty.Access.WRITE_ONLY) private String dnsDomain; + /** Creates an instance of AccountEntityProperties class. */ + public AccountEntityProperties() { + } + /** * Get the aadTenantId property: The Azure Active Directory tenant id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java index 412a0c40b92e1..67708914e0847 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java @@ -18,6 +18,10 @@ public final class ActionRequestProperties extends ActionPropertiesBase { @JsonProperty(value = "triggerUri", required = true) private String triggerUri; + /** Creates an instance of ActionRequestProperties class. */ + public ActionRequestProperties() { + } + /** * Get the triggerUri property: Logic App Callback URL for this specific workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java index 3122bbedd575f..59f6d9376c5cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java @@ -17,6 +17,10 @@ public final class ActionResponseInner extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionResponseProperties innerProperties; + /** Creates an instance of ActionResponseInner class. */ + public ActionResponseInner() { + } + /** * Get the innerProperties property: Action properties for get request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java index 0661a17d64444..785b119c87b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java @@ -17,6 +17,10 @@ public final class ActionResponseProperties extends ActionPropertiesBase { @JsonProperty(value = "workflowId") private String workflowId; + /** Creates an instance of ActionResponseProperties class. */ + public ActionResponseProperties() { + } + /** * Get the workflowId property: The name of the logic app's workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java index e3017231f55dc..799215801a2e6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java @@ -83,6 +83,10 @@ public final class ActivityEntityQueriesProperties { @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedTimeUtc; + /** Creates an instance of ActivityEntityQueriesProperties class. */ + public ActivityEntityQueriesProperties() { + } + /** * Get the title property: The entity query title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java index f8483ae549dc3..e96290857c277 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java @@ -65,6 +65,10 @@ public final class ActivityEntityQueryTemplateProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> entitiesFilter; + /** Creates an instance of ActivityEntityQueryTemplateProperties class. */ + public ActivityEntityQueryTemplateProperties() { + } + /** * Get the title property: The entity query title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java index f3346f5f0a508..8f143205727b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java @@ -35,6 +35,10 @@ }) @Fluent public class AlertRuleInner extends ResourceWithEtag { + /** Creates an instance of AlertRuleInner class. */ + public AlertRuleInner() { + } + /** {@inheritDoc} */ @Override public AlertRuleInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java index a3b8dba668999..5c551acf76bb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java @@ -43,6 +43,10 @@ public class AlertRuleTemplateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of AlertRuleTemplateInner class. */ + public AlertRuleTemplateInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java new file mode 100644 index 0000000000000..ceacd97517c3c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The Analytics Rule Run Trigger properties. */ +@Fluent +public final class AnalyticsRuleRunTriggerProperties { + /* + * The executionTimeUtc property. + */ + @JsonProperty(value = "executionTimeUtc", required = true) + private OffsetDateTime executionTimeUtc; + + /** Creates an instance of AnalyticsRuleRunTriggerProperties class. */ + public AnalyticsRuleRunTriggerProperties() { + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.executionTimeUtc; + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the AnalyticsRuleRunTriggerProperties object itself. + */ + public AnalyticsRuleRunTriggerProperties withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (executionTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property executionTimeUtc in model AnalyticsRuleRunTriggerProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AnalyticsRuleRunTriggerProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java index 1dbd5f5a9d027..70189cf9a7830 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java @@ -16,6 +16,10 @@ public final class AnomaliesSettingsProperties { @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isEnabled; + /** Creates an instance of AnomaliesSettingsProperties class. */ + public AnomaliesSettingsProperties() { + } + /** * Get the isEnabled property: Determines whether the setting is enable or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java index 039d66c006749..f78270cddf6ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java @@ -103,6 +103,10 @@ public final class AnomalySecurityMLAnalyticsSettingsProperties { @JsonProperty(value = "settingsDefinitionId") private UUID settingsDefinitionId; + /** Creates an instance of AnomalySecurityMLAnalyticsSettingsProperties class. */ + public AnomalySecurityMLAnalyticsSettingsProperties() { + } + /** * Get the description property: The description of the SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java index 4e31c9709d7d4..3a37df572e0d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java @@ -24,6 +24,10 @@ public final class ApiPollingParameters { @JsonProperty(value = "pollingConfig") private CodelessConnectorPollingConfigProperties pollingConfig; + /** Creates an instance of ApiPollingParameters class. */ + public ApiPollingParameters() { + } + /** * Get the connectorUiConfig property: Config to describe the instructions blade. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java index c7755a357b32f..1e2d07858049d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java @@ -16,6 +16,10 @@ public final class AscCheckRequirementsProperties { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscCheckRequirementsProperties class. */ + public AscCheckRequirementsProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java index 486d75131f913..51c71ec827fac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AscDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscDataConnectorProperties class. */ + public AscDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java index 1880bf1f167c8..0523e36cd73df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java @@ -23,6 +23,10 @@ public final class AutomationRuleInner extends ResourceWithEtag { @JsonProperty(value = "properties", required = true) private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); + /** Creates an instance of AutomationRuleInner class. */ + public AutomationRuleInner() { + } + /** * Get the innerProperties property: Automation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java index 7208c57ed3b71..85363dedd3808 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java @@ -64,6 +64,10 @@ public final class AutomationRuleProperties { @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo createdBy; + /** Creates an instance of AutomationRuleProperties class. */ + public AutomationRuleProperties() { + } + /** * Get the displayName property: The display name of the automation rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java index 49ef9cc2defa6..48fee1f98959c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java @@ -24,6 +24,10 @@ public final class AwsCloudTrailDataConnectorProperties { @JsonProperty(value = "dataTypes", required = true) private AwsCloudTrailDataConnectorDataTypes dataTypes; + /** Creates an instance of AwsCloudTrailDataConnectorProperties class. */ + public AwsCloudTrailDataConnectorProperties() { + } + /** * Get the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws * account. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java index fb81e27a84570..c5910740e8973 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java @@ -37,6 +37,10 @@ public final class AwsS3DataConnectorProperties { @JsonProperty(value = "dataTypes", required = true) private AwsS3DataConnectorDataTypes dataTypes; + /** Creates an instance of AwsS3DataConnectorProperties class. */ + public AwsS3DataConnectorProperties() { + } + /** * Get the destinationTable property: The logs destination table name in LogAnalytics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java index e73dcc2482d49..6fe113c9c158e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java @@ -23,6 +23,10 @@ public final class AzureResourceEntityProperties extends EntityCommonProperties @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; + /** Creates an instance of AzureResourceEntityProperties class. */ + public AzureResourceEntityProperties() { + } + /** * Get the resourceId property: The azure resource id of the resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java index 24e6c6ae3a874..625cdd6aade5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java @@ -24,6 +24,10 @@ public final class BookmarkExpandResponseInner { @JsonProperty(value = "value") private BookmarkExpandResponseValue value; + /** Creates an instance of BookmarkExpandResponseInner class. */ + public BookmarkExpandResponseInner() { + } + /** * Get the metadata property: The metadata from the expansion operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java index 5d04c419ecc56..994355b88b8f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java @@ -23,6 +23,10 @@ public final class BookmarkInner extends ResourceWithEtag { @JsonProperty(value = "properties") private BookmarkProperties innerProperties; + /** Creates an instance of BookmarkInner class. */ + public BookmarkInner() { + } + /** * Get the innerProperties property: Bookmark properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java index 44be7d59238af..2436eecd63434 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java @@ -113,6 +113,10 @@ public final class BookmarkProperties { @JsonProperty(value = "techniques") private List techniques; + /** Creates an instance of BookmarkProperties class. */ + public BookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java index 3b8a4b7b7a4ee..0a73580c561b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java @@ -30,6 +30,10 @@ public final class CloudApplicationEntityProperties extends EntityCommonProperti @JsonProperty(value = "instanceName", access = JsonProperty.Access.WRITE_ONLY) private String instanceName; + /** Creates an instance of CloudApplicationEntityProperties class. */ + public CloudApplicationEntityProperties() { + } + /** * Get the appId property: The technical identifier of the application. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java index ec2fa5baa2728..2cf1829de01bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java @@ -17,6 +17,10 @@ public final class CodelessParameters { @JsonProperty(value = "connectorUiConfig") private CodelessUiConnectorConfigProperties connectorUiConfig; + /** Creates an instance of CodelessParameters class. */ + public CodelessParameters() { + } + /** * Get the connectorUiConfig property: Config to describe the instructions blade. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java index cfec062d16099..d155b4a5e67cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.securityinsights.models.IoTDataConnector; import com.azure.resourcemanager.securityinsights.models.McasDataConnector; import com.azure.resourcemanager.securityinsights.models.MdatpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -48,6 +49,9 @@ @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class), @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class), + @JsonSubTypes.Type( + name = "MicrosoftPurviewInformationProtection", + value = MicrosoftPurviewInformationProtectionDataConnector.class), @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class), @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class), @@ -61,6 +65,10 @@ }) @Fluent public class DataConnectorInner extends ResourceWithEtag { + /** Creates an instance of DataConnectorInner class. */ + public DataConnectorInner() { + } + /** {@inheritDoc} */ @Override public DataConnectorInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java index 6fde14a69e47e..b99c5fd6bd29d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java @@ -24,6 +24,10 @@ public final class DataConnectorRequirementsStateInner { @JsonProperty(value = "licenseState") private DataConnectorLicenseState licenseState; + /** Creates an instance of DataConnectorRequirementsStateInner class. */ + public DataConnectorRequirementsStateInner() { + } + /** * Get the authorizationState property: Authorization state for this connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java index 5565c6456bf3b..b197548705d5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java @@ -36,6 +36,10 @@ public final class DnsEntityProperties extends EntityCommonProperties { @JsonProperty(value = "ipAddressEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List ipAddressEntityIds; + /** Creates an instance of DnsEntityProperties class. */ + public DnsEntityProperties() { + } + /** * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java index e88e1fce95ed4..9e374b9155e94 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Dynamics365 requirements check properties. */ @Fluent public final class Dynamics365CheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of Dynamics365CheckRequirementsProperties class. */ + public Dynamics365CheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public Dynamics365CheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java index bde2773bc7c97..250a414e49c6e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java @@ -19,6 +19,10 @@ public final class Dynamics365DataConnectorProperties extends DataConnectorTenan @JsonProperty(value = "dataTypes", required = true) private Dynamics365DataConnectorDataTypes dataTypes; + /** Creates an instance of Dynamics365DataConnectorProperties class. */ + public Dynamics365DataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java index 17b9864df9bbb..7f9cebb082e42 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java @@ -48,6 +48,10 @@ public final class EnrichmentDomainWhoisInner { @JsonProperty(value = "parsedWhois") private EnrichmentDomainWhoisDetails parsedWhois; + /** Creates an instance of EnrichmentDomainWhoisInner class. */ + public EnrichmentDomainWhoisInner() { + } + /** * Get the domain property: The domain for this whois record. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java index 8fc05f9c066a9..19bf540c2cc9c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java @@ -112,6 +112,10 @@ public final class EnrichmentIpGeodataInner { @JsonProperty(value = "stateCode") private String stateCode; + /** Creates an instance of EnrichmentIpGeodataInner class. */ + public EnrichmentIpGeodataInner() { + } + /** * Get the asn property: The autonomous system number associated with this IP address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java index 286aa9d87ccc6..4b4404e2ce9cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java @@ -18,6 +18,10 @@ public final class EntityAnalyticsProperties { @JsonProperty(value = "entityProviders") private List entityProviders; + /** Creates an instance of EntityAnalyticsProperties class. */ + public EntityAnalyticsProperties() { + } + /** * Get the entityProviders property: The relevant entity providers that are synced. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java index 1526fff102b44..29ad5815e1d4e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java @@ -24,6 +24,10 @@ public final class EntityExpandResponseInner { @JsonProperty(value = "value") private EntityExpandResponseValue value; + /** Creates an instance of EntityExpandResponseInner class. */ + public EntityExpandResponseInner() { + } + /** * Get the metadata property: The metadata from the expansion operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java index 0b2543093f8ee..01e887ab5e842 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java @@ -25,6 +25,10 @@ public final class EntityGetInsightsResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of EntityGetInsightsResponseInner class. */ + public EntityGetInsightsResponseInner() { + } + /** * Get the metadata property: The metadata from the get insights operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java index f829a29d3b07d..e4e1cd75d704a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java @@ -73,6 +73,10 @@ public class EntityInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of EntityInner class. */ + public EntityInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java index f1bdc7049f0e0..7c1dd21af0808 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java @@ -25,6 +25,10 @@ }) @Fluent public class EntityQueryInner extends ResourceWithEtag { + /** Creates an instance of EntityQueryInner class. */ + public EntityQueryInner() { + } + /** {@inheritDoc} */ @Override public EntityQueryInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java index b0d7b460f1ae8..ffaa9e8e9c8b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java @@ -29,6 +29,10 @@ public class EntityQueryTemplateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of EntityQueryTemplateInner class. */ + public EntityQueryTemplateInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java index 14d25888dac98..49d0fde3c2c13 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java @@ -25,6 +25,10 @@ public final class EntityTimelineResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of EntityTimelineResponseInner class. */ + public EntityTimelineResponseInner() { + } + /** * Get the metadata property: The metadata from the timeline operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java index 5f1ff9e9d6f58..2aa172898641f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java @@ -48,6 +48,10 @@ public final class ExpansionEntityQueriesProperties { @JsonProperty(value = "queryTemplate") private String queryTemplate; + /** Creates an instance of ExpansionEntityQueriesProperties class. */ + public ExpansionEntityQueriesProperties() { + } + /** * Get the dataSources property: List of the data sources that are required to run the query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java index 90e3adfec3d77..9c2629cc652c2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java @@ -16,6 +16,10 @@ public final class EyesOnSettingsProperties { @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isEnabled; + /** Creates an instance of EyesOnSettingsProperties class. */ + public EyesOnSettingsProperties() { + } + /** * Get the isEnabled property: Determines whether the setting is enable or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java index 7588902fa6034..9fc1d12ab5d5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java @@ -36,6 +36,10 @@ public final class FileEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) private String hostEntityId; + /** Creates an instance of FileEntityProperties class. */ + public FileEntityProperties() { + } + /** * Get the directory property: The full path to the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java index 8ebadc2878607..aeb52c51f490f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java @@ -24,6 +24,10 @@ public final class FileHashEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hashValue", access = JsonProperty.Access.WRITE_ONLY) private String hashValue; + /** Creates an instance of FileHashEntityProperties class. */ + public FileHashEntityProperties() { + } + /** * Get the algorithm property: The hash algorithm type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java index fe47f14b590cb..f74e253ce149a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java @@ -31,6 +31,10 @@ public final class FileImportInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of FileImportInner class. */ + public FileImportInner() { + } + /** * Get the innerProperties property: File import properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java index 1ae17de2e4938..36ec96e9f4fc1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java @@ -96,6 +96,10 @@ public final class FileImportProperties { @JsonProperty(value = "importValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime importValidUntilTimeUtc; + /** Creates an instance of FileImportProperties class. */ + public FileImportProperties() { + } + /** * Get the ingestionMode property: Describes how to ingest the records in the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java index 3ce589c95ac66..cb5aa5599a7ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java @@ -77,6 +77,10 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of FusionAlertRuleProperties class. */ + public FusionAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java index 162717edb32f2..a6d980efc93ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java @@ -83,6 +83,10 @@ public final class FusionAlertRuleTemplateProperties { @JsonProperty(value = "sourceSettings") private List sourceSettings; + /** Creates an instance of FusionAlertRuleTemplateProperties class. */ + public FusionAlertRuleTemplateProperties() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java index d001a56c976d5..24162b32c41b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java @@ -18,6 +18,10 @@ public final class GetQueriesResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of GetQueriesResponseInner class. */ + public GetQueriesResponseInner() { + } + /** * Get the value property: The query result values. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java index 16f6768461088..7e8f10cbaac04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java @@ -67,6 +67,10 @@ public final class HostEntityProperties extends EntityCommonProperties { @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) private String osVersion; + /** Creates an instance of HostEntityProperties class. */ + public HostEntityProperties() { + } + /** * Get the azureId property: The azure resource id of the VM. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java index 5be6c7dc4e9b8..52b6ecb245167 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java @@ -82,6 +82,10 @@ public final class HuntingBookmarkProperties extends EntityCommonProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /** Creates an instance of HuntingBookmarkProperties class. */ + public HuntingBookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java index 18459e1b4f138..c5e7f0834b7df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java @@ -19,6 +19,10 @@ public final class IncidentAlertListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentAlertListInner class. */ + public IncidentAlertListInner() { + } + /** * Get the value property: Array of incident alerts. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java index aa6aec92f5881..e313e259db7a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java @@ -19,6 +19,10 @@ public final class IncidentBookmarkListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentBookmarkListInner class. */ + public IncidentBookmarkListInner() { + } + /** * Get the value property: Array of incident bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java index 5bde60b473fa1..0f617183d8d18 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java @@ -19,6 +19,10 @@ public final class IncidentCommentInner extends ResourceWithEtag { @JsonProperty(value = "properties") private IncidentCommentProperties innerProperties; + /** Creates an instance of IncidentCommentInner class. */ + public IncidentCommentInner() { + } + /** * Get the innerProperties property: Incident comment properties. * @@ -35,24 +39,6 @@ public IncidentCommentInner withEtag(String etag) { return this; } - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - /** * Get the message property: The comment message. * @@ -76,6 +62,24 @@ public IncidentCommentInner withMessage(String message) { return this; } + /** + * Get the createdTimeUtc property: The time the comment was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + } + + /** + * Get the lastModifiedTimeUtc property: The time the comment was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + /** * Get the author property: Describes the client that created the comment. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java index 6cc4d172a5e22..5f96cf5d770f3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java @@ -13,6 +13,12 @@ /** Incident comment property bag. */ @Fluent public final class IncidentCommentProperties { + /* + * The comment message + */ + @JsonProperty(value = "message", required = true) + private String message; + /* * The time the comment was created */ @@ -25,34 +31,14 @@ public final class IncidentCommentProperties { @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedTimeUtc; - /* - * The comment message - */ - @JsonProperty(value = "message", required = true) - private String message; - /* * Describes the client that created the comment */ @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo author; - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; + /** Creates an instance of IncidentCommentProperties class. */ + public IncidentCommentProperties() { } /** @@ -75,6 +61,24 @@ public IncidentCommentProperties withMessage(String message) { return this; } + /** + * Get the createdTimeUtc property: The time the comment was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the lastModifiedTimeUtc property: The time the comment was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + /** * Get the author property: Describes the client that created the comment. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java index 3f6dbe089b16e..60024736964d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java @@ -24,6 +24,10 @@ public final class IncidentEntitiesResponseInner { @JsonProperty(value = "metaData") private List metadata; + /** Creates an instance of IncidentEntitiesResponseInner class. */ + public IncidentEntitiesResponseInner() { + } + /** * Get the entities property: Array of the incident related entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java index 7f44360a2ebdf..9f3ef4abdef29 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java @@ -17,17 +17,21 @@ import java.time.OffsetDateTime; import java.util.List; -/** Represents an incident in Azure Security Insights. */ +/** The Incident model. */ @Fluent public final class IncidentInner extends ResourceWithEtag { /* - * Incident properties + * The properties property. */ @JsonProperty(value = "properties") private IncidentPropertiesInner innerProperties; + /** Creates an instance of IncidentInner class. */ + public IncidentInner() { + } + /** - * Get the innerProperties property: Incident properties. + * Get the innerProperties property: The properties property. * * @return the innerProperties value. */ @@ -43,222 +47,232 @@ public IncidentInner withEtag(String etag) { } /** - * Get the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - public IncidentAdditionalData additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the classification property: The reason the incident was closed. + * Get the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - public IncidentClassification classification() { - return this.innerProperties() == null ? null : this.innerProperties().classification(); + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); } /** - * Set the classification property: The reason the incident was closed. + * Set the title property: The title of the incident. * - * @param classification the classification value to set. + * @param title the title value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassification(IncidentClassification classification) { + public IncidentInner withTitle(String title) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassification(classification); + this.innerProperties().withTitle(title); return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - public String classificationComment() { - return this.innerProperties() == null ? null : this.innerProperties().classificationComment(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the description property: The description of the incident. * - * @param classificationComment the classificationComment value to set. + * @param description the description value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassificationComment(String classificationComment) { + public IncidentInner withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassificationComment(classificationComment); + this.innerProperties().withDescription(description); return this; } /** - * Get the classificationReason property: The classification reason the incident was closed with. + * Get the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - public IncidentClassificationReason classificationReason() { - return this.innerProperties() == null ? null : this.innerProperties().classificationReason(); + public IncidentSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); } /** - * Set the classificationReason property: The classification reason the incident was closed with. + * Set the severity property: The severity of the incident. * - * @param classificationReason the classificationReason value to set. + * @param severity the severity value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { + public IncidentInner withSeverity(IncidentSeverity severity) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassificationReason(classificationReason); + this.innerProperties().withSeverity(severity); return this; } /** - * Get the createdTimeUtc property: The time the incident was created. + * Get the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + public IncidentStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Get the description property: The description of the incident. + * Set the status property: The status of the incident. * - * @return the description value. + * @param status the status value to set. + * @return the IncidentInner object itself. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public IncidentInner withStatus(IncidentStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentPropertiesInner(); + } + this.innerProperties().withStatus(status); + return this; } /** - * Set the description property: The description of the incident. + * Get the classification property: The reason the incident was closed. * - * @param description the description value to set. + * @return the classification value. + */ + public IncidentClassification classification() { + return this.innerProperties() == null ? null : this.innerProperties().classification(); + } + + /** + * Set the classification property: The reason the incident was closed. + * + * @param classification the classification value to set. * @return the IncidentInner object itself. */ - public IncidentInner withDescription(String description) { + public IncidentInner withClassification(IncidentClassification classification) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withDescription(description); + this.innerProperties().withClassification(classification); return this; } /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. + * Get the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - public OffsetDateTime firstActivityTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().firstActivityTimeUtc(); + public IncidentClassificationReason classificationReason() { + return this.innerProperties() == null ? null : this.innerProperties().classificationReason(); } /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. + * Set the classificationReason property: The classification reason the incident was closed with. * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. + * @param classificationReason the classificationReason value to set. * @return the IncidentInner object itself. */ - public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); + this.innerProperties().withClassificationReason(classificationReason); return this; } /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - public String incidentUrl() { - return this.innerProperties() == null ? null : this.innerProperties().incidentUrl(); + public String classificationComment() { + return this.innerProperties() == null ? null : this.innerProperties().classificationComment(); } /** - * Get the incidentNumber property: A sequential number. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentNumber value. + * @param classificationComment the classificationComment value to set. + * @return the IncidentInner object itself. */ - public Integer incidentNumber() { - return this.innerProperties() == null ? null : this.innerProperties().incidentNumber(); + public IncidentInner withClassificationComment(String classificationComment) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentPropertiesInner(); + } + this.innerProperties().withClassificationComment(classificationComment); + return this; } /** - * Get the labels property: List of labels relevant to this incident. + * Get the owner property: Describes a user that the incident is assigned to. * - * @return the labels value. + * @return the owner value. */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); + public IncidentOwnerInfo owner() { + return this.innerProperties() == null ? null : this.innerProperties().owner(); } /** - * Set the labels property: List of labels relevant to this incident. + * Set the owner property: Describes a user that the incident is assigned to. * - * @param labels the labels value to set. + * @param owner the owner value to set. * @return the IncidentInner object itself. */ - public IncidentInner withLabels(List labels) { + public IncidentInner withOwner(IncidentOwnerInfo owner) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withLabels(labels); + this.innerProperties().withOwner(owner); return this; } /** - * Get the providerName property: The name of the source provider that generated the incident. + * Get the labels property: List of labels relevant to this incident. * - * @return the providerName value. + * @return the labels value. */ - public String providerName() { - return this.innerProperties() == null ? null : this.innerProperties().providerName(); + public List labels() { + return this.innerProperties() == null ? null : this.innerProperties().labels(); } /** - * Set the providerName property: The name of the source provider that generated the incident. + * Set the labels property: List of labels relevant to this incident. * - * @param providerName the providerName value to set. + * @param labels the labels value to set. * @return the IncidentInner object itself. */ - public IncidentInner withProviderName(String providerName) { + public IncidentInner withLabels(List labels) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withProviderName(providerName); + this.innerProperties().withLabels(labels); return this; } /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. + * Get the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - public String providerIncidentId() { - return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); + public OffsetDateTime firstActivityTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().firstActivityTimeUtc(); } /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. + * Set the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId the providerIncidentId value to set. + * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. * @return the IncidentInner object itself. */ - public IncidentInner withProviderIncidentId(String providerIncidentId) { + public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withProviderIncidentId(providerIncidentId); + this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); return this; } @@ -295,83 +309,82 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - public IncidentOwnerInfo owner() { - return this.innerProperties() == null ? null : this.innerProperties().owner(); + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Get the incidentNumber property: A sequential number. * - * @param owner the owner value to set. - * @return the IncidentInner object itself. + * @return the incidentNumber value. */ - public IncidentInner withOwner(IncidentOwnerInfo owner) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withOwner(owner); - return this; + public Integer incidentNumber() { + return this.innerProperties() == null ? null : this.innerProperties().incidentNumber(); } /** - * Get the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. + * Get the additionalData property: Additional data on the incident. * - * @return the relatedAnalyticRuleIds value. + * @return the additionalData value. */ - public List relatedAnalyticRuleIds() { - return this.innerProperties() == null ? null : this.innerProperties().relatedAnalyticRuleIds(); + public IncidentAdditionalData additionalData() { + return this.innerProperties() == null ? null : this.innerProperties().additionalData(); } /** - * Get the severity property: The severity of the incident. + * Get the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. * - * @return the severity value. + * @return the relatedAnalyticRuleIds value. */ - public IncidentSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public List relatedAnalyticRuleIds() { + return this.innerProperties() == null ? null : this.innerProperties().relatedAnalyticRuleIds(); } /** - * Set the severity property: The severity of the incident. + * Get the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @param severity the severity value to set. - * @return the IncidentInner object itself. + * @return the incidentUrl value. */ - public IncidentInner withSeverity(IncidentSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withSeverity(severity); - return this; + public String incidentUrl() { + return this.innerProperties() == null ? null : this.innerProperties().incidentUrl(); } /** - * Get the status property: The status of the incident. + * Get the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @return the providerName value. */ - public IncidentStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + public String providerName() { + return this.innerProperties() == null ? null : this.innerProperties().providerName(); } /** - * Set the status property: The status of the incident. + * Set the providerName property: The name of the source provider that generated the incident. * - * @param status the status value to set. + * @param providerName the providerName value to set. * @return the IncidentInner object itself. */ - public IncidentInner withStatus(IncidentStatus status) { + public IncidentInner withProviderName(String providerName) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withStatus(status); + this.innerProperties().withProviderName(providerName); return this; } + /** + * Get the providerIncidentId property: The incident ID assigned by the incident provider. + * + * @return the providerIncidentId value. + */ + public String providerIncidentId() { + return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); + } + /** * Get the teamInformation property: Describes a team for the incident. * @@ -395,29 +408,6 @@ public IncidentInner withTeamInformation(TeamInformationInner teamInformation) { return this; } - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withTitle(title); - return this; - } - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java index 5262e2c3ba589..0e9cf4c65fe04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java @@ -17,62 +17,56 @@ import java.time.OffsetDateTime; import java.util.List; -/** Describes incident properties. */ +/** The IncidentProperties model. */ @Fluent public final class IncidentPropertiesInner { /* - * Additional data on the incident - */ - @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) - private IncidentAdditionalData additionalData; - - /* - * The reason the incident was closed + * The title of the incident */ - @JsonProperty(value = "classification") - private IncidentClassification classification; + @JsonProperty(value = "title", required = true) + private String title; /* - * Describes the reason the incident was closed + * The description of the incident */ - @JsonProperty(value = "classificationComment") - private String classificationComment; + @JsonProperty(value = "description") + private String description; /* - * The classification reason the incident was closed with + * The severity of the incident */ - @JsonProperty(value = "classificationReason") - private IncidentClassificationReason classificationReason; + @JsonProperty(value = "severity", required = true) + private IncidentSeverity severity; /* - * The time the incident was created + * The status of the incident */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; + @JsonProperty(value = "status", required = true) + private IncidentStatus status; /* - * The description of the incident + * The reason the incident was closed */ - @JsonProperty(value = "description") - private String description; + @JsonProperty(value = "classification") + private IncidentClassification classification; /* - * The time of the first activity in the incident + * The classification reason the incident was closed with */ - @JsonProperty(value = "firstActivityTimeUtc") - private OffsetDateTime firstActivityTimeUtc; + @JsonProperty(value = "classificationReason") + private IncidentClassificationReason classificationReason; /* - * The deep-link url to the incident in Azure portal + * Describes the reason the incident was closed */ - @JsonProperty(value = "incidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String incidentUrl; + @JsonProperty(value = "classificationComment") + private String classificationComment; /* - * A sequential number + * Describes a user that the incident is assigned to */ - @JsonProperty(value = "incidentNumber", access = JsonProperty.Access.WRITE_ONLY) - private Integer incidentNumber; + @JsonProperty(value = "owner") + private IncidentOwnerInfo owner; /* * List of labels relevant to this incident @@ -81,16 +75,10 @@ public final class IncidentPropertiesInner { private List labels; /* - * The name of the source provider that generated the incident - */ - @JsonProperty(value = "providerName") - private String providerName; - - /* - * The incident ID assigned by the incident provider + * The time of the first activity in the incident */ - @JsonProperty(value = "providerIncidentId") - private String providerIncidentId; + @JsonProperty(value = "firstActivityTimeUtc") + private OffsetDateTime firstActivityTimeUtc; /* * The time of the last activity in the incident @@ -105,10 +93,22 @@ public final class IncidentPropertiesInner { private OffsetDateTime lastModifiedTimeUtc; /* - * Describes a user that the incident is assigned to + * The time the incident was created */ - @JsonProperty(value = "owner") - private IncidentOwnerInfo owner; + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * A sequential number + */ + @JsonProperty(value = "incidentNumber", access = JsonProperty.Access.WRITE_ONLY) + private Integer incidentNumber; + + /* + * Additional data on the incident + */ + @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) + private IncidentAdditionalData additionalData; /* * List of resource ids of Analytic rules related to the incident @@ -117,16 +117,22 @@ public final class IncidentPropertiesInner { private List relatedAnalyticRuleIds; /* - * The severity of the incident + * The deep-link url to the incident in Azure portal */ - @JsonProperty(value = "severity", required = true) - private IncidentSeverity severity; + @JsonProperty(value = "incidentUrl", access = JsonProperty.Access.WRITE_ONLY) + private String incidentUrl; /* - * The status of the incident + * The name of the source provider that generated the incident */ - @JsonProperty(value = "status", required = true) - private IncidentStatus status; + @JsonProperty(value = "providerName") + private String providerName; + + /* + * The incident ID assigned by the incident provider + */ + @JsonProperty(value = "providerIncidentId", access = JsonProperty.Access.WRITE_ONLY) + private String providerIncidentId; /* * Describes a team for the incident @@ -134,146 +140,168 @@ public final class IncidentPropertiesInner { @JsonProperty(value = "teamInformation") private TeamInformationInner teamInformation; - /* - * The title of the incident + /** Creates an instance of IncidentPropertiesInner class. */ + public IncidentPropertiesInner() { + } + + /** + * Get the title property: The title of the incident. + * + * @return the title value. */ - @JsonProperty(value = "title", required = true) - private String title; + public String title() { + return this.title; + } /** - * Get the additionalData property: Additional data on the incident. + * Set the title property: The title of the incident. * - * @return the additionalData value. + * @param title the title value to set. + * @return the IncidentPropertiesInner object itself. */ - public IncidentAdditionalData additionalData() { - return this.additionalData; + public IncidentPropertiesInner withTitle(String title) { + this.title = title; + return this; } /** - * Get the classification property: The reason the incident was closed. + * Get the description property: The description of the incident. * - * @return the classification value. + * @return the description value. */ - public IncidentClassification classification() { - return this.classification; + public String description() { + return this.description; } /** - * Set the classification property: The reason the incident was closed. + * Set the description property: The description of the incident. * - * @param classification the classification value to set. + * @param description the description value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassification(IncidentClassification classification) { - this.classification = classification; + public IncidentPropertiesInner withDescription(String description) { + this.description = description; return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the severity property: The severity of the incident. * - * @return the classificationComment value. + * @return the severity value. */ - public String classificationComment() { - return this.classificationComment; + public IncidentSeverity severity() { + return this.severity; } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the severity property: The severity of the incident. * - * @param classificationComment the classificationComment value to set. + * @param severity the severity value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; + public IncidentPropertiesInner withSeverity(IncidentSeverity severity) { + this.severity = severity; return this; } /** - * Get the classificationReason property: The classification reason the incident was closed with. + * Get the status property: The status of the incident. * - * @return the classificationReason value. + * @return the status value. */ - public IncidentClassificationReason classificationReason() { - return this.classificationReason; + public IncidentStatus status() { + return this.status; } /** - * Set the classificationReason property: The classification reason the incident was closed with. + * Set the status property: The status of the incident. * - * @param classificationReason the classificationReason value to set. + * @param status the status value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { - this.classificationReason = classificationReason; + public IncidentPropertiesInner withStatus(IncidentStatus status) { + this.status = status; return this; } /** - * Get the createdTimeUtc property: The time the incident was created. + * Get the classification property: The reason the incident was closed. * - * @return the createdTimeUtc value. + * @return the classification value. */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; + public IncidentClassification classification() { + return this.classification; } /** - * Get the description property: The description of the incident. + * Set the classification property: The reason the incident was closed. * - * @return the description value. + * @param classification the classification value to set. + * @return the IncidentPropertiesInner object itself. */ - public String description() { - return this.description; + public IncidentPropertiesInner withClassification(IncidentClassification classification) { + this.classification = classification; + return this; } /** - * Set the description property: The description of the incident. + * Get the classificationReason property: The classification reason the incident was closed with. * - * @param description the description value to set. + * @return the classificationReason value. + */ + public IncidentClassificationReason classificationReason() { + return this.classificationReason; + } + + /** + * Set the classificationReason property: The classification reason the incident was closed with. + * + * @param classificationReason the classificationReason value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withDescription(String description) { - this.description = description; + public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { + this.classificationReason = classificationReason; return this; } /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the firstActivityTimeUtc value. + * @return the classificationComment value. */ - public OffsetDateTime firstActivityTimeUtc() { - return this.firstActivityTimeUtc; + public String classificationComment() { + return this.classificationComment; } /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. + * @param classificationComment the classificationComment value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.firstActivityTimeUtc = firstActivityTimeUtc; + public IncidentPropertiesInner withClassificationComment(String classificationComment) { + this.classificationComment = classificationComment; return this; } /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. + * Get the owner property: Describes a user that the incident is assigned to. * - * @return the incidentUrl value. + * @return the owner value. */ - public String incidentUrl() { - return this.incidentUrl; + public IncidentOwnerInfo owner() { + return this.owner; } /** - * Get the incidentNumber property: A sequential number. + * Set the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @param owner the owner value to set. + * @return the IncidentPropertiesInner object itself. */ - public Integer incidentNumber() { - return this.incidentNumber; + public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { + this.owner = owner; + return this; } /** @@ -297,42 +325,22 @@ public IncidentPropertiesInner withLabels(List labels) { } /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. + * Get the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - public String providerIncidentId() { - return this.providerIncidentId; + public OffsetDateTime firstActivityTimeUtc() { + return this.firstActivityTimeUtc; } /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. + * Set the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId the providerIncidentId value to set. + * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withProviderIncidentId(String providerIncidentId) { - this.providerIncidentId = providerIncidentId; + public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + this.firstActivityTimeUtc = firstActivityTimeUtc; return this; } @@ -366,23 +374,30 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - public IncidentOwnerInfo owner() { - return this.owner; + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Get the incidentNumber property: A sequential number. * - * @param owner the owner value to set. - * @return the IncidentPropertiesInner object itself. + * @return the incidentNumber value. */ - public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { - this.owner = owner; - return this; + public Integer incidentNumber() { + return this.incidentNumber; + } + + /** + * Get the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + public IncidentAdditionalData additionalData() { + return this.additionalData; } /** @@ -395,43 +410,41 @@ public List relatedAnalyticRuleIds() { } /** - * Get the severity property: The severity of the incident. + * Get the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - public IncidentSeverity severity() { - return this.severity; + public String incidentUrl() { + return this.incidentUrl; } /** - * Set the severity property: The severity of the incident. + * Get the providerName property: The name of the source provider that generated the incident. * - * @param severity the severity value to set. - * @return the IncidentPropertiesInner object itself. + * @return the providerName value. */ - public IncidentPropertiesInner withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; + public String providerName() { + return this.providerName; } /** - * Get the status property: The status of the incident. + * Set the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @param providerName the providerName value to set. + * @return the IncidentPropertiesInner object itself. */ - public IncidentStatus status() { - return this.status; + public IncidentPropertiesInner withProviderName(String providerName) { + this.providerName = providerName; + return this; } /** - * Set the status property: The status of the incident. + * Get the providerIncidentId property: The incident ID assigned by the incident provider. * - * @param status the status value to set. - * @return the IncidentPropertiesInner object itself. + * @return the providerIncidentId value. */ - public IncidentPropertiesInner withStatus(IncidentStatus status) { - this.status = status; - return this; + public String providerIncidentId() { + return this.providerIncidentId; } /** @@ -454,40 +467,16 @@ public IncidentPropertiesInner withTeamInformation(TeamInformationInner teamInfo return this; } - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withTitle(String title) { - this.title = title; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (additionalData() != null) { - additionalData().validate(); - } - if (labels() != null) { - labels().forEach(e -> e.validate()); - } - if (owner() != null) { - owner().validate(); + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); } if (severity() == null) { throw LOGGER @@ -500,14 +489,18 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property status in model IncidentPropertiesInner")); } + if (owner() != null) { + owner().validate(); + } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } + if (additionalData() != null) { + additionalData().validate(); + } if (teamInformation() != null) { teamInformation().validate(); } - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); - } } private static final ClientLogger LOGGER = new ClientLogger(IncidentPropertiesInner.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java new file mode 100644 index 0000000000000..d3326ded49d10 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ClientInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The IncidentTask model. */ +@Fluent +public final class IncidentTaskInner extends ResourceWithEtag { + /* + * The properties property. + */ + @JsonProperty(value = "properties", required = true) + private IncidentTaskProperties innerProperties = new IncidentTaskProperties(); + + /** Creates an instance of IncidentTaskInner class. */ + public IncidentTaskInner() { + } + + /** + * Get the innerProperties property: The properties property. + * + * @return the innerProperties value. + */ + private IncidentTaskProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IncidentTaskInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withTitle(String title) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withTitle(title); + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public IncidentTaskStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withStatus(IncidentTaskStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + } + + /** + * Get the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + } + + /** + * Set the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy the createdBy value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withCreatedBy(ClientInfo createdBy) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withCreatedBy(createdBy); + return this; + } + + /** + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + public ClientInfo lastModifiedBy() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedBy(); + } + + /** + * Set the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @param lastModifiedBy the lastModifiedBy value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withLastModifiedBy(ClientInfo lastModifiedBy) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withLastModifiedBy(lastModifiedBy); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model IncidentTaskInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentTaskInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java new file mode 100644 index 0000000000000..414bb17bd8162 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ClientInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The IncidentTaskProperties model. */ +@Fluent +public final class IncidentTaskProperties { + /* + * The title of the task + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * The description of the task + */ + @JsonProperty(value = "description") + private String description; + + /* + * The status property. + */ + @JsonProperty(value = "status", required = true) + private IncidentTaskStatus status; + + /* + * The time the task was created + */ + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * The last time the task was updated + */ + @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedTimeUtc; + + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "createdBy") + private ClientInfo createdBy; + + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "lastModifiedBy") + private ClientInfo lastModifiedBy; + + /** Creates an instance of IncidentTaskProperties class. */ + public IncidentTaskProperties() { + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public IncidentTaskStatus status() { + return this.status; + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withStatus(IncidentTaskStatus status) { + this.status = status; + return this; + } + + /** + * Get the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.createdBy; + } + + /** + * Set the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy the createdBy value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withCreatedBy(ClientInfo createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + public ClientInfo lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Set the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @param lastModifiedBy the lastModifiedBy value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withLastModifiedBy(ClientInfo lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model IncidentTaskProperties")); + } + if (status() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property status in model IncidentTaskProperties")); + } + if (createdBy() != null) { + createdBy().validate(); + } + if (lastModifiedBy() != null) { + lastModifiedBy().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentTaskProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java index 63643c5077a2a..6a51d0a15ac73 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java @@ -16,6 +16,10 @@ public final class IoTCheckRequirementsProperties { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of IoTCheckRequirementsProperties class. */ + public IoTCheckRequirementsProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java index 1917add910f9e..8eba9f642ee3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class IoTDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of IoTDataConnectorProperties class. */ + public IoTDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java index 971f9f13da46d..8318c4f857b17 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java @@ -183,6 +183,10 @@ public final class IoTDeviceEntityProperties extends EntityCommonProperties { @JsonProperty(value = "isScanner", access = JsonProperty.Access.WRITE_ONLY) private Boolean isScanner; + /** Creates an instance of IoTDeviceEntityProperties class. */ + public IoTDeviceEntityProperties() { + } + /** * Get the deviceId property: The ID of the IoT Device in the IoT Hub. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java index fa6b07dd783f8..0a9b814b6a3c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java @@ -32,6 +32,10 @@ public final class IpEntityProperties extends EntityCommonProperties { @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) private List threatIntelligence; + /** Creates an instance of IpEntityProperties class. */ + public IpEntityProperties() { + } + /** * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java index 423fdf2974b65..6e93e2edaaee0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java @@ -63,6 +63,10 @@ public final class MLBehaviorAnalyticsAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleProperties class. */ + public MLBehaviorAnalyticsAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java index c048baca30533..f9703e6e8eb96 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java @@ -23,6 +23,10 @@ public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertR @JsonProperty(value = "severity", required = true) private AlertSeverity severity; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleTemplateProperties class. */ + public MLBehaviorAnalyticsAlertRuleTemplateProperties() { + } + /** * Get the severity property: The severity for alerts created by this alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java index 62c3cc3aec6a2..b523b9c536eb4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java @@ -103,6 +103,10 @@ public final class MailClusterEntityProperties extends EntityCommonProperties { @JsonProperty(value = "clusterGroup", access = JsonProperty.Access.WRITE_ONLY) private String clusterGroup; + /** Creates an instance of MailClusterEntityProperties class. */ + public MailClusterEntityProperties() { + } + /** * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java index e2d92d2606a64..9d3fb6ad8c86f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java @@ -168,6 +168,10 @@ public final class MailMessageEntityProperties extends EntityCommonProperties { @JsonProperty(value = "deliveryLocation") private DeliveryLocation deliveryLocation; + /** Creates an instance of MailMessageEntityProperties class. */ + public MailMessageEntityProperties() { + } + /** * Get the fileEntityIds property: The File entity ids of this mail message's attachments. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java index c0ec6c6fdaee8..efc2be76821be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java @@ -37,6 +37,10 @@ public final class MailboxEntityProperties extends EntityCommonProperties { @JsonProperty(value = "externalDirectoryObjectId", access = JsonProperty.Access.WRITE_ONLY) private UUID externalDirectoryObjectId; + /** Creates an instance of MailboxEntityProperties class. */ + public MailboxEntityProperties() { + } + /** * Get the mailboxPrimaryAddress property: The mailbox's primary address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java index ded00f33417f7..847174346dd7e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java @@ -36,6 +36,10 @@ public final class MalwareEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List processEntityIds; + /** Creates an instance of MalwareEntityProperties class. */ + public MalwareEntityProperties() { + } + /** * Get the category property: The malware category by the vendor, e.g. Trojan. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java index 529764ae709a0..9e35ce58e22c7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MCAS (Microsoft Cloud App Security) requirements check properties. */ @Fluent public final class McasCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of McasCheckRequirementsProperties class. */ + public McasCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public McasCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java index 38068dd107827..c33416cc576c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class McasDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private McasDataConnectorDataTypes dataTypes; + /** Creates an instance of McasDataConnectorProperties class. */ + public McasDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java index 789441efbf971..ed965d8ada06b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. */ @Fluent public final class MdatpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MdatpCheckRequirementsProperties class. */ + public MdatpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MdatpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java index a1466e451fb02..20d29e00d16ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class MdatpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of MdatpDataConnectorProperties class. */ + public MdatpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java index 25c3b51662426..c9e2219100b43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java @@ -5,10 +5,9 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; @@ -25,6 +24,10 @@ public final class MetadataModelInner extends ResourceWithEtag { @JsonProperty(value = "properties") private MetadataProperties innerProperties; + /** Creates an instance of MetadataModelInner class. */ + public MetadataModelInner() { + } + /** * Get the innerProperties property: Metadata properties. * @@ -125,7 +128,7 @@ public MetadataModelInner withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.innerProperties() == null ? null : this.innerProperties().kind(); } @@ -135,7 +138,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataModelInner object itself. */ - public MetadataModelInner withKind(Kind kind) { + public MetadataModelInner withKind(String kind) { if (this.innerProperties() == null) { this.innerProperties = new MetadataProperties(); } @@ -219,7 +222,7 @@ public MetadataModelInner withSupport(MetadataSupport support) { * * @return the dependencies value. */ - public MetadataDependencies dependencies() { + public MetadataDependenciesAutoGenerated dependencies() { return this.innerProperties() == null ? null : this.innerProperties().dependencies(); } @@ -231,7 +234,7 @@ public MetadataDependencies dependencies() { * @param dependencies the dependencies value to set. * @return the MetadataModelInner object itself. */ - public MetadataModelInner withDependencies(MetadataDependencies dependencies) { + public MetadataModelInner withDependencies(MetadataDependenciesAutoGenerated dependencies) { if (this.innerProperties() == null) { this.innerProperties = new MetadataProperties(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java index 3fed7e25da810..a774d8357a791 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java @@ -6,10 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.fasterxml.jackson.annotation.JsonProperty; @@ -44,7 +43,7 @@ public final class MetadataProperties { * The kind of content the metadata is for. */ @JsonProperty(value = "kind", required = true) - private Kind kind; + private String kind; /* * Source of the content. This is where/how it was created. @@ -70,7 +69,7 @@ public final class MetadataProperties { * operator/criteria for complex formats. */ @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; + private MetadataDependenciesAutoGenerated dependencies; /* * Categories for the solution content item @@ -138,6 +137,10 @@ public final class MetadataProperties { @JsonProperty(value = "previewImagesDark") private List previewImagesDark; + /** Creates an instance of MetadataProperties class. */ + public MetadataProperties() { + } + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -213,7 +216,7 @@ public MetadataProperties withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.kind; } @@ -223,7 +226,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataProperties object itself. */ - public MetadataProperties withKind(Kind kind) { + public MetadataProperties withKind(String kind) { this.kind = kind; return this; } @@ -295,7 +298,7 @@ public MetadataProperties withSupport(MetadataSupport support) { * * @return the dependencies value. */ - public MetadataDependencies dependencies() { + public MetadataDependenciesAutoGenerated dependencies() { return this.dependencies; } @@ -307,7 +310,7 @@ public MetadataDependencies dependencies() { * @param dependencies the dependencies value to set. * @return the MetadataProperties object itself. */ - public MetadataProperties withDependencies(MetadataDependencies dependencies) { + public MetadataProperties withDependencies(MetadataDependenciesAutoGenerated dependencies) { this.dependencies = dependencies; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java index 470f6f2cb6848..a61d3fd0c8df5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java @@ -5,10 +5,9 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.fasterxml.jackson.annotation.JsonProperty; @@ -43,7 +42,7 @@ public final class MetadataPropertiesPatch { * The kind of content the metadata is for. */ @JsonProperty(value = "kind") - private Kind kind; + private String kind; /* * Source of the content. This is where/how it was created. @@ -69,7 +68,7 @@ public final class MetadataPropertiesPatch { * operator/criteria for complex formats. */ @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; + private MetadataDependenciesAutoGenerated dependencies; /* * Categories for the solution content item @@ -137,6 +136,10 @@ public final class MetadataPropertiesPatch { @JsonProperty(value = "previewImagesDark") private List previewImagesDark; + /** Creates an instance of MetadataPropertiesPatch class. */ + public MetadataPropertiesPatch() { + } + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -212,7 +215,7 @@ public MetadataPropertiesPatch withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.kind; } @@ -222,7 +225,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataPropertiesPatch object itself. */ - public MetadataPropertiesPatch withKind(Kind kind) { + public MetadataPropertiesPatch withKind(String kind) { this.kind = kind; return this; } @@ -294,7 +297,7 @@ public MetadataPropertiesPatch withSupport(MetadataSupport support) { * * @return the dependencies value. */ - public MetadataDependencies dependencies() { + public MetadataDependenciesAutoGenerated dependencies() { return this.dependencies; } @@ -306,7 +309,7 @@ public MetadataDependencies dependencies() { * @param dependencies the dependencies value to set. * @return the MetadataPropertiesPatch object itself. */ - public MetadataPropertiesPatch withDependencies(MetadataDependencies dependencies) { + public MetadataPropertiesPatch withDependencies(MetadataDependenciesAutoGenerated dependencies) { this.dependencies = dependencies; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java new file mode 100644 index 0000000000000..64f4267b3b83d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; + +/** MicrosoftPurviewInformationProtection requirements check properties. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MicrosoftPurviewInformationProtectionCheckRequirementsProperties class. */ + public MicrosoftPurviewInformationProtectionCheckRequirementsProperties() { + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionCheckRequirementsProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java new file mode 100644 index 0000000000000..5b7f040e3a58c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Microsoft Purview Information Protection data connector properties. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionDataConnectorProperties extends DataConnectorTenantId { + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes; + + /** Creates an instance of MicrosoftPurviewInformationProtectionDataConnectorProperties class. */ + public MicrosoftPurviewInformationProtectionDataConnectorProperties() { + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnectorProperties object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnectorProperties withDataTypes( + MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionDataConnectorProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dataTypes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataTypes in model" + + " MicrosoftPurviewInformationProtectionDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftPurviewInformationProtectionDataConnectorProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java index 6c482ad3565a9..70a8a6b6897e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java @@ -47,6 +47,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleProperties @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedUtc; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java index d5732a0625a07..5809693c8da9e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java @@ -41,6 +41,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java index 6688b38be2fb1..c02f86f98592b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Microsoft Threat Intelligence requirements check properties. */ @Fluent public final class MstiCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MstiCheckRequirementsProperties class. */ + public MstiCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MstiCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java index 7bef9230fe38e..2aa5c866d40b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class MstiDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private MstiDataConnectorDataTypes dataTypes; + /** Creates an instance of MstiDataConnectorProperties class. */ + public MstiDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java index 68d2ff985a208..ae34070ce30f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MTP (Microsoft Threat Protection) requirements check properties. */ @Fluent public final class MtpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MtpCheckRequirementsProperties class. */ + public MtpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MtpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java index 2399f7dba1651..2a41315cbc1c3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; import com.fasterxml.jackson.annotation.JsonProperty; /** MTP (Microsoft Threat Protection) data connector properties. */ @@ -19,6 +20,16 @@ public final class MtpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private MtpDataConnectorDataTypes dataTypes; + /* + * The available filtered providers for the connector. + */ + @JsonProperty(value = "filteredProviders") + private MtpFilteredProviders filteredProviders; + + /** Creates an instance of MtpDataConnectorProperties class. */ + public MtpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -39,6 +50,26 @@ public MtpDataConnectorProperties withDataTypes(MtpDataConnectorDataTypes dataTy return this; } + /** + * Get the filteredProviders property: The available filtered providers for the connector. + * + * @return the filteredProviders value. + */ + public MtpFilteredProviders filteredProviders() { + return this.filteredProviders; + } + + /** + * Set the filteredProviders property: The available filtered providers for the connector. + * + * @param filteredProviders the filteredProviders value to set. + * @return the MtpDataConnectorProperties object itself. + */ + public MtpDataConnectorProperties withFilteredProviders(MtpFilteredProviders filteredProviders) { + this.filteredProviders = filteredProviders; + return this; + } + /** {@inheritDoc} */ @Override public MtpDataConnectorProperties withTenantId(String tenantId) { @@ -62,6 +93,9 @@ public void validate() { } else { dataTypes().validate(); } + if (filteredProviders() != null) { + filteredProviders().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorProperties.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java index 810e29f8c3400..b5a36f2601a93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java @@ -30,6 +30,10 @@ public final class NicEntityProperties extends EntityCommonProperties { @JsonProperty(value = "vlans", access = JsonProperty.Access.WRITE_ONLY) private List vlans; + /** Creates an instance of NicEntityProperties class. */ + public NicEntityProperties() { + } + /** * Get the macAddress property: The MAC address of this network interface. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java index 2d2b3f5d67917..1b8d5b450610a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -126,6 +127,16 @@ public final class NrtAlertRuleProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of NrtAlertRuleProperties class. */ + public NrtAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -463,6 +474,26 @@ public NrtAlertRuleProperties withEventGroupingSettings(EventGroupingSettings ev return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -503,6 +534,9 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(NrtAlertRuleProperties.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java index 97788b8fd862c..2efd4e7f66ad9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -64,6 +65,16 @@ public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithM @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of NrtAlertRuleTemplateProperties class. */ + public NrtAlertRuleTemplateProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -206,6 +217,27 @@ public NrtAlertRuleTemplateProperties withEventGroupingSettings(EventGroupingSet return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleTemplateProperties object itself. + */ + public NrtAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** {@inheritDoc} */ @Override public NrtAlertRuleTemplateProperties withTactics(List tactics) { @@ -274,5 +306,8 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java index e79cb5b7768f8..23caeff4c79a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Office365 Project requirements check properties. */ @Fluent public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of Office365ProjectCheckRequirementsProperties class. */ + public Office365ProjectCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public Office365ProjectCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java index 86464533c6a1a..9e5927a477b9c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class Office365ProjectDataConnectorProperties extends DataConnector @JsonProperty(value = "dataTypes", required = true) private Office365ProjectConnectorDataTypes dataTypes; + /** Creates an instance of Office365ProjectDataConnectorProperties class. */ + public Office365ProjectDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java index 7e6a246d93cb2..58a9e26868024 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. */ @Fluent public final class OfficeAtpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficeAtpCheckRequirementsProperties class. */ + public OfficeAtpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficeAtpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java index 9a64b134a987e..09263147ababb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class OfficeAtpDataConnectorProperties extends DataConnectorTenantI @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of OfficeAtpDataConnectorProperties class. */ + public OfficeAtpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java index e1ef2000626cc..193fab161e3d4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java @@ -24,6 +24,10 @@ public final class OfficeConsentInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of OfficeConsentInner class. */ + public OfficeConsentInner() { + } + /** * Get the innerProperties property: Office consent properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java index ef163ee8eda7d..8ee64090f57d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java @@ -22,6 +22,10 @@ public final class OfficeConsentProperties { @JsonProperty(value = "consentId") private String consentId; + /** Creates an instance of OfficeConsentProperties class. */ + public OfficeConsentProperties() { + } + /** * Get the tenantId property: The tenantId of the Office365 with the consent. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java index 4b02a823625c2..096c8e30c8b60 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class OfficeDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private OfficeDataConnectorDataTypes dataTypes; + /** Creates an instance of OfficeDataConnectorProperties class. */ + public OfficeDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java index 5ae6bc4079354..d7b6ff64086e0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** OfficeIRM (Microsoft Insider Risk Management) requirements check properties. */ @Fluent public final class OfficeIrmCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficeIrmCheckRequirementsProperties class. */ + public OfficeIrmCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficeIrmCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java index c3e618acc5a32..c8a3b73c57e1f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class OfficeIrmDataConnectorProperties extends DataConnectorTenantI @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of OfficeIrmDataConnectorProperties class. */ + public OfficeIrmDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java index b64db3bd6270e..5208736cff324 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Office PowerBI requirements check properties. */ @Fluent public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficePowerBICheckRequirementsProperties class. */ + public OfficePowerBICheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficePowerBICheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java index 4f19d046961e7..b62914d15bbc2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class OfficePowerBIDataConnectorProperties extends DataConnectorTen @JsonProperty(value = "dataTypes", required = true) private OfficePowerBIConnectorDataTypes dataTypes; + /** Creates an instance of OfficePowerBIDataConnectorProperties class. */ + public OfficePowerBIDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java index ec5a4d2872bb9..b7fba78deacdc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java @@ -35,6 +35,10 @@ public final class OperationInner { @JsonProperty(value = "isDataAction") private Boolean isDataAction; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the display property: Properties of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelAutoGeneratedInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelAutoGeneratedInner.java new file mode 100644 index 0000000000000..37f1d1f4147ed --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelAutoGeneratedInner.java @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Represents a Package in Azure Security Insights. */ +@Fluent +public final class PackageModelAutoGeneratedInner extends ResourceWithEtag { + /* + * package properties + */ + @JsonProperty(value = "properties") + private PackagePropertiesAutoGenerated innerProperties; + + /** Creates an instance of PackageModelAutoGeneratedInner class. */ + public PackageModelAutoGeneratedInner() { + } + + /** + * Get the innerProperties property: package properties. + * + * @return the innerProperties value. + */ + private PackagePropertiesAutoGenerated innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PackageModelAutoGeneratedInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the packageId property: The package id. + * + * @return the packageId value. + */ + public String packageId() { + return this.innerProperties() == null ? null : this.innerProperties().packageId(); + } + + /** + * Set the packageId property: The package id. + * + * @param packageId the packageId value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withPackageId(String packageId) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withPackageId(packageId); + return this; + } + + /** + * Get the packageKind property: The package kind. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.innerProperties() == null ? null : this.innerProperties().packageKind(); + } + + /** + * Set the packageKind property: The package kind. + * + * @param packageKind the packageKind value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withPackageKind(PackageKind packageKind) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withPackageKind(packageKind); + return this; + } + + /** + * Get the installedVersion property: The version of the installed package, null or absent means not installed. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.innerProperties() == null ? null : this.innerProperties().installedVersion(); + } + + /** + * Set the installedVersion property: The version of the installed package, null or absent means not installed. + * + * @param installedVersion the installedVersion value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withInstalledVersion(String installedVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withInstalledVersion(installedVersion); + return this; + } + + /** + * Get the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: The version of the content schema. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the resourceId property: The metadata resource id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: The metadata resource id. + * + * @param resourceId the resourceId value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Get the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + public Flag isNew() { + return this.innerProperties() == null ? null : this.innerProperties().isNew(); + } + + /** + * Set the isNew property: Flag indicates if this is a newly published package. + * + * @param isNew the isNew value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withIsNew(Flag isNew) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withIsNew(isNew); + return this; + } + + /** + * Get the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + public Flag isPreview() { + return this.innerProperties() == null ? null : this.innerProperties().isPreview(); + } + + /** + * Set the isPreview property: Flag indicates if this package is in preview. + * + * @param isPreview the isPreview value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withIsPreview(Flag isPreview) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withIsPreview(isPreview); + return this; + } + + /** + * Get the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + public Flag isFeatured() { + return this.innerProperties() == null ? null : this.innerProperties().isFeatured(); + } + + /** + * Set the isFeatured property: Flag indicates if this package is among the featured list. + * + * @param isFeatured the isFeatured value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withIsFeatured(Flag isFeatured) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withIsFeatured(isFeatured); + return this; + } + + /** + * Get the version property: the latest version number of the package. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: the latest version number of the package. + * + * @param version the version value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the displayName property: The display name of the package. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name of the package. + * + * @param displayName the displayName value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the description property: The description of the package. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the package. + * + * @param description the description value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + public String publisherDisplayName() { + return this.innerProperties() == null ? null : this.innerProperties().publisherDisplayName(); + } + + /** + * Set the publisherDisplayName property: The publisher display name of the package. + * + * @param publisherDisplayName the publisherDisplayName value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withPublisherDisplayName(String publisherDisplayName) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withPublisherDisplayName(publisherDisplayName); + return this; + } + + /** + * Get the source property: The source of the package. + * + * @return the source value. + */ + public MetadataSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: The source of the package. + * + * @param source the source value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withSource(MetadataSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the author property: The author of the package. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.innerProperties() == null ? null : this.innerProperties().author(); + } + + /** + * Set the author property: The author of the package. + * + * @param author the author value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withAuthor(MetadataAuthor author) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withAuthor(author); + return this; + } + + /** + * Get the support property: The support tier of the package. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.innerProperties() == null ? null : this.innerProperties().support(); + } + + /** + * Set the support property: The support tier of the package. + * + * @param support the support value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withSupport(MetadataSupport support) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withSupport(support); + return this; + } + + /** + * Get the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.innerProperties() == null ? null : this.innerProperties().dependencies(); + } + + /** + * Set the dependencies property: The support tier of the package. + * + * @param dependencies the dependencies value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withDependencies(MetadataDependencies dependencies) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withDependencies(dependencies); + return this; + } + + /** + * Get the providers property: Providers for the package item. + * + * @return the providers value. + */ + public List providers() { + return this.innerProperties() == null ? null : this.innerProperties().providers(); + } + + /** + * Set the providers property: Providers for the package item. + * + * @param providers the providers value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withProviders(List providers) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withProviders(providers); + return this; + } + + /** + * Get the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); + } + + /** + * Set the firstPublishDate property: first publish date package item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withFirstPublishDate(LocalDate firstPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withFirstPublishDate(firstPublishDate); + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); + } + + /** + * Set the lastPublishDate property: last publish date for the package item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withLastPublishDate(LocalDate lastPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withLastPublishDate(lastPublishDate); + return this; + } + + /** + * Get the categories property: The categories of the package. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.innerProperties() == null ? null : this.innerProperties().categories(); + } + + /** + * Set the categories property: The categories of the package. + * + * @param categories the categories value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withCategories(MetadataCategories categories) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withCategories(categories); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + public List threatAnalyticsTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalyticsTechniques(); + } + + /** + * Set the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalyticsTechniques the threatAnalyticsTechniques value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withThreatAnalyticsTechniques(List threatAnalyticsTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withThreatAnalyticsTechniques(threatAnalyticsTechniques); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Get the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + public Object packagedContent() { + return this.innerProperties() == null ? null : this.innerProperties().packagedContent(); + } + + /** + * Set the packagedContent property: the json to deploy. + * + * @param packagedContent the packagedContent value to set. + * @return the PackageModelAutoGeneratedInner object itself. + */ + public PackageModelAutoGeneratedInner withPackagedContent(Object packagedContent) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesAutoGenerated(); + } + this.innerProperties().withPackagedContent(packagedContent); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelInner.java new file mode 100644 index 0000000000000..565c2482c69e6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackageModelInner.java @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Represents a Package in Azure Security Insights. */ +@Fluent +public final class PackageModelInner extends ResourceWithEtag { + /* + * package properties + */ + @JsonProperty(value = "properties") + private PackagePropertiesWithPackageId innerProperties; + + /** Creates an instance of PackageModelInner class. */ + public PackageModelInner() { + } + + /** + * Get the innerProperties property: package properties. + * + * @return the innerProperties value. + */ + private PackagePropertiesWithPackageId innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PackageModelInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the packageId property: The package id. + * + * @return the packageId value. + */ + public String packageId() { + return this.innerProperties() == null ? null : this.innerProperties().packageId(); + } + + /** + * Set the packageId property: The package id. + * + * @param packageId the packageId value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withPackageId(String packageId) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withPackageId(packageId); + return this; + } + + /** + * Get the packageKind property: The package kind. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.innerProperties() == null ? null : this.innerProperties().packageKind(); + } + + /** + * Set the packageKind property: The package kind. + * + * @param packageKind the packageKind value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withPackageKind(PackageKind packageKind) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withPackageKind(packageKind); + return this; + } + + /** + * Get the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: The version of the content schema. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + public Flag isNew() { + return this.innerProperties() == null ? null : this.innerProperties().isNew(); + } + + /** + * Set the isNew property: Flag indicates if this is a newly published package. + * + * @param isNew the isNew value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withIsNew(Flag isNew) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withIsNew(isNew); + return this; + } + + /** + * Get the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + public Flag isPreview() { + return this.innerProperties() == null ? null : this.innerProperties().isPreview(); + } + + /** + * Set the isPreview property: Flag indicates if this package is in preview. + * + * @param isPreview the isPreview value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withIsPreview(Flag isPreview) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withIsPreview(isPreview); + return this; + } + + /** + * Get the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + public Flag isFeatured() { + return this.innerProperties() == null ? null : this.innerProperties().isFeatured(); + } + + /** + * Set the isFeatured property: Flag indicates if this package is among the featured list. + * + * @param isFeatured the isFeatured value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withIsFeatured(Flag isFeatured) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withIsFeatured(isFeatured); + return this; + } + + /** + * Get the version property: the latest version number of the package. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: the latest version number of the package. + * + * @param version the version value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the displayName property: The display name of the package. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name of the package. + * + * @param displayName the displayName value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the description property: The description of the package. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the package. + * + * @param description the description value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + public String publisherDisplayName() { + return this.innerProperties() == null ? null : this.innerProperties().publisherDisplayName(); + } + + /** + * Set the publisherDisplayName property: The publisher display name of the package. + * + * @param publisherDisplayName the publisherDisplayName value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withPublisherDisplayName(String publisherDisplayName) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withPublisherDisplayName(publisherDisplayName); + return this; + } + + /** + * Get the source property: The source of the package. + * + * @return the source value. + */ + public MetadataSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: The source of the package. + * + * @param source the source value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withSource(MetadataSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the author property: The author of the package. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.innerProperties() == null ? null : this.innerProperties().author(); + } + + /** + * Set the author property: The author of the package. + * + * @param author the author value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withAuthor(MetadataAuthor author) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withAuthor(author); + return this; + } + + /** + * Get the support property: The support tier of the package. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.innerProperties() == null ? null : this.innerProperties().support(); + } + + /** + * Set the support property: The support tier of the package. + * + * @param support the support value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withSupport(MetadataSupport support) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withSupport(support); + return this; + } + + /** + * Get the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.innerProperties() == null ? null : this.innerProperties().dependencies(); + } + + /** + * Set the dependencies property: The support tier of the package. + * + * @param dependencies the dependencies value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withDependencies(MetadataDependencies dependencies) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withDependencies(dependencies); + return this; + } + + /** + * Get the providers property: Providers for the package item. + * + * @return the providers value. + */ + public List providers() { + return this.innerProperties() == null ? null : this.innerProperties().providers(); + } + + /** + * Set the providers property: Providers for the package item. + * + * @param providers the providers value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withProviders(List providers) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withProviders(providers); + return this; + } + + /** + * Get the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); + } + + /** + * Set the firstPublishDate property: first publish date package item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withFirstPublishDate(LocalDate firstPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withFirstPublishDate(firstPublishDate); + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); + } + + /** + * Set the lastPublishDate property: last publish date for the package item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withLastPublishDate(LocalDate lastPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withLastPublishDate(lastPublishDate); + return this; + } + + /** + * Get the categories property: The categories of the package. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.innerProperties() == null ? null : this.innerProperties().categories(); + } + + /** + * Set the categories property: The categories of the package. + * + * @param categories the categories value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withCategories(MetadataCategories categories) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withCategories(categories); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + public List threatAnalyticsTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalyticsTechniques(); + } + + /** + * Set the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalyticsTechniques the threatAnalyticsTechniques value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withThreatAnalyticsTechniques(List threatAnalyticsTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withThreatAnalyticsTechniques(threatAnalyticsTechniques); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the PackageModelInner object itself. + */ + public PackageModelInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new PackagePropertiesWithPackageId(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesAutoGenerated.java new file mode 100644 index 0000000000000..2c0c9c163d9a2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesAutoGenerated.java @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Describes package properties. */ +@Fluent +public final class PackagePropertiesAutoGenerated { + /* + * The package id + */ + @JsonProperty(value = "packageId", required = true) + private String packageId; + + /* + * The package kind + */ + @JsonProperty(value = "packageKind", required = true) + private PackageKind packageKind; + + /* + * The version of the installed package, null or absent means not installed. + */ + @JsonProperty(value = "installedVersion") + private String installedVersion; + + /* + * The version of the content schema. + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * The metadata resource id. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Flag indicates if this is a newly published package. + */ + @JsonProperty(value = "isNew") + private Flag isNew; + + /* + * Flag indicates if this package is in preview. + */ + @JsonProperty(value = "isPreview") + private Flag isPreview; + + /* + * Flag indicates if this package is among the featured list. + */ + @JsonProperty(value = "isFeatured") + private Flag isFeatured; + + /* + * the latest version number of the package + */ + @JsonProperty(value = "version", required = true) + private String version; + + /* + * The display name of the package + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The description of the package + */ + @JsonProperty(value = "description") + private String description; + + /* + * The publisher display name of the package + */ + @JsonProperty(value = "publisherDisplayName") + private String publisherDisplayName; + + /* + * The source of the package + */ + @JsonProperty(value = "source") + private MetadataSource source; + + /* + * The author of the package + */ + @JsonProperty(value = "author") + private MetadataAuthor author; + + /* + * The support tier of the package + */ + @JsonProperty(value = "support") + private MetadataSupport support; + + /* + * The support tier of the package + */ + @JsonProperty(value = "dependencies") + private MetadataDependencies dependencies; + + /* + * Providers for the package item + */ + @JsonProperty(value = "providers") + private List providers; + + /* + * first publish date package item + */ + @JsonProperty(value = "firstPublishDate") + private LocalDate firstPublishDate; + + /* + * last publish date for the package item + */ + @JsonProperty(value = "lastPublishDate") + private LocalDate lastPublishDate; + + /* + * The categories of the package + */ + @JsonProperty(value = "categories") + private MetadataCategories categories; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the tactics being used + */ + @JsonProperty(value = "threatAnalyticsTechniques") + private List threatAnalyticsTechniques; + + /* + * the icon identifier. this id can later be fetched from the content metadata + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * the json to deploy + */ + @JsonProperty(value = "packagedContent") + private Object packagedContent; + + /** Creates an instance of PackagePropertiesAutoGenerated class. */ + public PackagePropertiesAutoGenerated() { + } + + /** + * Get the packageId property: The package id. + * + * @return the packageId value. + */ + public String packageId() { + return this.packageId; + } + + /** + * Set the packageId property: The package id. + * + * @param packageId the packageId value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withPackageId(String packageId) { + this.packageId = packageId; + return this; + } + + /** + * Get the packageKind property: The package kind. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.packageKind; + } + + /** + * Set the packageKind property: The package kind. + * + * @param packageKind the packageKind value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withPackageKind(PackageKind packageKind) { + this.packageKind = packageKind; + return this; + } + + /** + * Get the installedVersion property: The version of the installed package, null or absent means not installed. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + + /** + * Set the installedVersion property: The version of the installed package, null or absent means not installed. + * + * @param installedVersion the installedVersion value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withInstalledVersion(String installedVersion) { + this.installedVersion = installedVersion; + return this; + } + + /** + * Get the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: The version of the content schema. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the resourceId property: The metadata resource id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The metadata resource id. + * + * @param resourceId the resourceId value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + public Flag isNew() { + return this.isNew; + } + + /** + * Set the isNew property: Flag indicates if this is a newly published package. + * + * @param isNew the isNew value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withIsNew(Flag isNew) { + this.isNew = isNew; + return this; + } + + /** + * Get the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + public Flag isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Flag indicates if this package is in preview. + * + * @param isPreview the isPreview value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withIsPreview(Flag isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + public Flag isFeatured() { + return this.isFeatured; + } + + /** + * Set the isFeatured property: Flag indicates if this package is among the featured list. + * + * @param isFeatured the isFeatured value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withIsFeatured(Flag isFeatured) { + this.isFeatured = isFeatured; + return this; + } + + /** + * Get the version property: the latest version number of the package. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: the latest version number of the package. + * + * @param version the version value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the displayName property: The display name of the package. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name of the package. + * + * @param displayName the displayName value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description property: The description of the package. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the package. + * + * @param description the description value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + public String publisherDisplayName() { + return this.publisherDisplayName; + } + + /** + * Set the publisherDisplayName property: The publisher display name of the package. + * + * @param publisherDisplayName the publisherDisplayName value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withPublisherDisplayName(String publisherDisplayName) { + this.publisherDisplayName = publisherDisplayName; + return this; + } + + /** + * Get the source property: The source of the package. + * + * @return the source value. + */ + public MetadataSource source() { + return this.source; + } + + /** + * Set the source property: The source of the package. + * + * @param source the source value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withSource(MetadataSource source) { + this.source = source; + return this; + } + + /** + * Get the author property: The author of the package. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.author; + } + + /** + * Set the author property: The author of the package. + * + * @param author the author value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withAuthor(MetadataAuthor author) { + this.author = author; + return this; + } + + /** + * Get the support property: The support tier of the package. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.support; + } + + /** + * Set the support property: The support tier of the package. + * + * @param support the support value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withSupport(MetadataSupport support) { + this.support = support; + return this; + } + + /** + * Get the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.dependencies; + } + + /** + * Set the dependencies property: The support tier of the package. + * + * @param dependencies the dependencies value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withDependencies(MetadataDependencies dependencies) { + this.dependencies = dependencies; + return this; + } + + /** + * Get the providers property: Providers for the package item. + * + * @return the providers value. + */ + public List providers() { + return this.providers; + } + + /** + * Set the providers property: Providers for the package item. + * + * @param providers the providers value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.firstPublishDate; + } + + /** + * Set the firstPublishDate property: first publish date package item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withFirstPublishDate(LocalDate firstPublishDate) { + this.firstPublishDate = firstPublishDate; + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.lastPublishDate; + } + + /** + * Set the lastPublishDate property: last publish date for the package item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withLastPublishDate(LocalDate lastPublishDate) { + this.lastPublishDate = lastPublishDate; + return this; + } + + /** + * Get the categories property: The categories of the package. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.categories; + } + + /** + * Set the categories property: The categories of the package. + * + * @param categories the categories value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withCategories(MetadataCategories categories) { + this.categories = categories; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + public List threatAnalyticsTechniques() { + return this.threatAnalyticsTechniques; + } + + /** + * Set the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalyticsTechniques the threatAnalyticsTechniques value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withThreatAnalyticsTechniques(List threatAnalyticsTechniques) { + this.threatAnalyticsTechniques = threatAnalyticsTechniques; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + public Object packagedContent() { + return this.packagedContent; + } + + /** + * Set the packagedContent property: the json to deploy. + * + * @param packagedContent the packagedContent value to set. + * @return the PackagePropertiesAutoGenerated object itself. + */ + public PackagePropertiesAutoGenerated withPackagedContent(Object packagedContent) { + this.packagedContent = packagedContent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property packageId in model PackagePropertiesAutoGenerated")); + } + if (packageKind() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property packageKind in model PackagePropertiesAutoGenerated")); + } + if (version() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property version in model PackagePropertiesAutoGenerated")); + } + if (displayName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property displayName in model PackagePropertiesAutoGenerated")); + } + if (source() != null) { + source().validate(); + } + if (author() != null) { + author().validate(); + } + if (support() != null) { + support().validate(); + } + if (dependencies() != null) { + dependencies().validate(); + } + if (categories() != null) { + categories().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackagePropertiesAutoGenerated.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesWithPackageId.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesWithPackageId.java new file mode 100644 index 0000000000000..eb1782d556199 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/PackagePropertiesWithPackageId.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.PackageProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Describes package properties with packageId. */ +@Fluent +public final class PackagePropertiesWithPackageId extends PackageProperties { + /* + * The package id + */ + @JsonProperty(value = "packageId", required = true) + private String packageId; + + /** Creates an instance of PackagePropertiesWithPackageId class. */ + public PackagePropertiesWithPackageId() { + } + + /** + * Get the packageId property: The package id. + * + * @return the packageId value. + */ + public String packageId() { + return this.packageId; + } + + /** + * Set the packageId property: The package id. + * + * @param packageId the packageId value to set. + * @return the PackagePropertiesWithPackageId object itself. + */ + public PackagePropertiesWithPackageId withPackageId(String packageId) { + this.packageId = packageId; + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withPackageKind(PackageKind packageKind) { + super.withPackageKind(packageKind); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withContentSchemaVersion(String contentSchemaVersion) { + super.withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withIsNew(Flag isNew) { + super.withIsNew(isNew); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withIsPreview(Flag isPreview) { + super.withIsPreview(isPreview); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withIsFeatured(Flag isFeatured) { + super.withIsFeatured(isFeatured); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withVersion(String version) { + super.withVersion(version); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withPublisherDisplayName(String publisherDisplayName) { + super.withPublisherDisplayName(publisherDisplayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withSource(MetadataSource source) { + super.withSource(source); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withAuthor(MetadataAuthor author) { + super.withAuthor(author); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withSupport(MetadataSupport support) { + super.withSupport(support); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withDependencies(MetadataDependencies dependencies) { + super.withDependencies(dependencies); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withProviders(List providers) { + super.withProviders(providers); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withFirstPublishDate(LocalDate firstPublishDate) { + super.withFirstPublishDate(firstPublishDate); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withLastPublishDate(LocalDate lastPublishDate) { + super.withLastPublishDate(lastPublishDate); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withCategories(MetadataCategories categories) { + super.withCategories(categories); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withThreatAnalysisTactics(List threatAnalysisTactics) { + super.withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withThreatAnalyticsTechniques(List threatAnalyticsTechniques) { + super.withThreatAnalyticsTechniques(threatAnalyticsTechniques); + return this; + } + + /** {@inheritDoc} */ + @Override + public PackagePropertiesWithPackageId withIcon(String icon) { + super.withIcon(icon); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (packageId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property packageId in model PackagePropertiesWithPackageId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackagePropertiesWithPackageId.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java index b1dde67379389..655e1522bcbce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java @@ -67,6 +67,10 @@ public final class ProcessEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processId", access = JsonProperty.Access.WRITE_ONLY) private String processId; + /** Creates an instance of ProcessEntityProperties class. */ + public ProcessEntityProperties() { + } + /** * Get the accountEntityId property: The account entity id running the processes. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java new file mode 100644 index 0000000000000..0ff84a612a49c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java @@ -0,0 +1,612 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Category; +import com.azure.resourcemanager.securityinsights.models.Content; +import com.azure.resourcemanager.securityinsights.models.Context; +import com.azure.resourcemanager.securityinsights.models.Instructions; +import com.azure.resourcemanager.securityinsights.models.Priority; +import com.azure.resourcemanager.securityinsights.models.RecommendedAction; +import com.azure.resourcemanager.securityinsights.models.State; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** Recommendation object. */ +@Fluent +public final class RecommendationInner { + /* + * id of recommendation. + */ + @JsonProperty(value = "id", required = true) + private UUID id; + + /* + * Instructions of the recommendation. + */ + @JsonProperty(value = "instructions", required = true) + private Instructions instructions; + + /* + * Content of the recommendation. + */ + @JsonProperty(value = "content") + private Content content; + + /* + * Id of the resource this recommendation refers to. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Collection of additional properties for the recommendation. + */ + @JsonProperty(value = "additionalProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map additionalProperties; + + /* + * Title of the recommendation. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * Description of the recommendation. + */ + @JsonProperty(value = "description", required = true) + private String description; + + /* + * Title of the recommendation type. + */ + @JsonProperty(value = "recommendationTypeTitle", required = true) + private String recommendationTypeTitle; + + /* + * Id of the recommendation type. + */ + @JsonProperty(value = "recommendationTypeId", required = true) + private String recommendationTypeId; + + /* + * Category of the recommendation. + */ + @JsonProperty(value = "category", required = true) + private Category category; + + /* + * Context of the recommendation. + */ + @JsonProperty(value = "context", required = true) + private Context context; + + /* + * Id of the workspace this recommendation refers to. + */ + @JsonProperty(value = "workspaceId", required = true) + private UUID workspaceId; + + /* + * List of actions to take for this recommendation. + */ + @JsonProperty(value = "actions", required = true) + private List actions; + + /* + * State of the recommendation. + */ + @JsonProperty(value = "state", required = true) + private State state; + + /* + * Priority of the recommendation. + */ + @JsonProperty(value = "priority", required = true) + private Priority priority; + + /* + * The time stamp (UTC) when the recommendation was last evaluated. + */ + @JsonProperty(value = "lastEvaluatedTimeUtc", required = true) + private OffsetDateTime lastEvaluatedTimeUtc; + + /* + * The time stamp (UTC) when the recommendation should be displayed again. + */ + @JsonProperty(value = "hideUntilTimeUtc") + private OffsetDateTime hideUntilTimeUtc; + + /* + * The timestamp (UTC) after which the recommendation should not be displayed anymore. + */ + @JsonProperty(value = "displayUntilTimeUtc") + private OffsetDateTime displayUntilTimeUtc; + + /* + * Value indicating if the recommendation should be displayed or not. + */ + @JsonProperty(value = "visible") + private Boolean visible; + + /** Creates an instance of RecommendationInner class. */ + public RecommendationInner() { + } + + /** + * Get the id property: id of recommendation. + * + * @return the id value. + */ + public UUID id() { + return this.id; + } + + /** + * Set the id property: id of recommendation. + * + * @param id the id value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withId(UUID id) { + this.id = id; + return this; + } + + /** + * Get the instructions property: Instructions of the recommendation. + * + * @return the instructions value. + */ + public Instructions instructions() { + return this.instructions; + } + + /** + * Set the instructions property: Instructions of the recommendation. + * + * @param instructions the instructions value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withInstructions(Instructions instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get the content property: Content of the recommendation. + * + * @return the content value. + */ + public Content content() { + return this.content; + } + + /** + * Set the content property: Content of the recommendation. + * + * @param content the content value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withContent(Content content) { + this.content = content; + return this; + } + + /** + * Get the resourceId property: Id of the resource this recommendation refers to. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Id of the resource this recommendation refers to. + * + * @param resourceId the resourceId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the additionalProperties property: Collection of additional properties for the recommendation. + * + * @return the additionalProperties value. + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Collection of additional properties for the recommendation. + * + * @param additionalProperties the additionalProperties value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get the title property: Title of the recommendation. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Title of the recommendation. + * + * @param title the title value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: Description of the recommendation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the recommendation. + * + * @param description the description value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the recommendationTypeTitle property: Title of the recommendation type. + * + * @return the recommendationTypeTitle value. + */ + public String recommendationTypeTitle() { + return this.recommendationTypeTitle; + } + + /** + * Set the recommendationTypeTitle property: Title of the recommendation type. + * + * @param recommendationTypeTitle the recommendationTypeTitle value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationTypeTitle(String recommendationTypeTitle) { + this.recommendationTypeTitle = recommendationTypeTitle; + return this; + } + + /** + * Get the recommendationTypeId property: Id of the recommendation type. + * + * @return the recommendationTypeId value. + */ + public String recommendationTypeId() { + return this.recommendationTypeId; + } + + /** + * Set the recommendationTypeId property: Id of the recommendation type. + * + * @param recommendationTypeId the recommendationTypeId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationTypeId(String recommendationTypeId) { + this.recommendationTypeId = recommendationTypeId; + return this; + } + + /** + * Get the category property: Category of the recommendation. + * + * @return the category value. + */ + public Category category() { + return this.category; + } + + /** + * Set the category property: Category of the recommendation. + * + * @param category the category value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withCategory(Category category) { + this.category = category; + return this; + } + + /** + * Get the context property: Context of the recommendation. + * + * @return the context value. + */ + public Context context() { + return this.context; + } + + /** + * Set the context property: Context of the recommendation. + * + * @param context the context value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withContext(Context context) { + this.context = context; + return this; + } + + /** + * Get the workspaceId property: Id of the workspace this recommendation refers to. + * + * @return the workspaceId value. + */ + public UUID workspaceId() { + return this.workspaceId; + } + + /** + * Set the workspaceId property: Id of the workspace this recommendation refers to. + * + * @param workspaceId the workspaceId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withWorkspaceId(UUID workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the actions property: List of actions to take for this recommendation. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions to take for this recommendation. + * + * @param actions the actions value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the state property: State of the recommendation. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Set the state property: State of the recommendation. + * + * @param state the state value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withState(State state) { + this.state = state; + return this; + } + + /** + * Get the priority property: Priority of the recommendation. + * + * @return the priority value. + */ + public Priority priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of the recommendation. + * + * @param priority the priority value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withPriority(Priority priority) { + this.priority = priority; + return this; + } + + /** + * Get the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @return the lastEvaluatedTimeUtc value. + */ + public OffsetDateTime lastEvaluatedTimeUtc() { + return this.lastEvaluatedTimeUtc; + } + + /** + * Set the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @param lastEvaluatedTimeUtc the lastEvaluatedTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withLastEvaluatedTimeUtc(OffsetDateTime lastEvaluatedTimeUtc) { + this.lastEvaluatedTimeUtc = lastEvaluatedTimeUtc; + return this; + } + + /** + * Get the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + public OffsetDateTime hideUntilTimeUtc() { + return this.hideUntilTimeUtc; + } + + /** + * Set the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @param hideUntilTimeUtc the hideUntilTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withHideUntilTimeUtc(OffsetDateTime hideUntilTimeUtc) { + this.hideUntilTimeUtc = hideUntilTimeUtc; + return this; + } + + /** + * Get the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @return the displayUntilTimeUtc value. + */ + public OffsetDateTime displayUntilTimeUtc() { + return this.displayUntilTimeUtc; + } + + /** + * Set the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @param displayUntilTimeUtc the displayUntilTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDisplayUntilTimeUtc(OffsetDateTime displayUntilTimeUtc) { + this.displayUntilTimeUtc = displayUntilTimeUtc; + return this; + } + + /** + * Get the visible property: Value indicating if the recommendation should be displayed or not. + * + * @return the visible value. + */ + public Boolean visible() { + return this.visible; + } + + /** + * Set the visible property: Value indicating if the recommendation should be displayed or not. + * + * @param visible the visible value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withVisible(Boolean visible) { + this.visible = visible; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model RecommendationInner")); + } + if (instructions() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property instructions in model RecommendationInner")); + } else { + instructions().validate(); + } + if (content() != null) { + content().validate(); + } + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model RecommendationInner")); + } + if (description() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property description in model RecommendationInner")); + } + if (recommendationTypeTitle() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationTypeTitle in model RecommendationInner")); + } + if (recommendationTypeId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationTypeId in model RecommendationInner")); + } + if (category() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property category in model RecommendationInner")); + } + if (context() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property context in model RecommendationInner")); + } + if (workspaceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property workspaceId in model RecommendationInner")); + } + if (actions() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property actions in model RecommendationInner")); + } else { + actions().forEach(e -> e.validate()); + } + if (state() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property state in model RecommendationInner")); + } + if (priority() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property priority in model RecommendationInner")); + } + if (lastEvaluatedTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property lastEvaluatedTimeUtc in model RecommendationInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecommendationInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java new file mode 100644 index 0000000000000..fbd82bfff885d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of recommendations. */ +@Fluent +public final class RecommendationListInner { + /* + * An list of recommendations + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of RecommendationListInner class. */ + public RecommendationListInner() { + } + + /** + * Get the value property: An list of recommendations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An list of recommendations. + * + * @param value the value value to set. + * @return the RecommendationListInner object itself. + */ + public RecommendationListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java index 405ab6789eafd..c8ab8e0f600c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java @@ -24,6 +24,10 @@ public final class RegistryKeyEntityProperties extends EntityCommonProperties { @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) private String key; + /** Creates an instance of RegistryKeyEntityProperties class. */ + public RegistryKeyEntityProperties() { + } + /** * Get the hive property: the hive that holds the registry key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java index a15af888fb1bd..a1db6026f23ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java @@ -37,6 +37,10 @@ public final class RegistryValueEntityProperties extends EntityCommonProperties @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY) private RegistryValueKind valueType; + /** Creates an instance of RegistryValueEntityProperties class. */ + public RegistryValueEntityProperties() { + } + /** * Get the keyEntityId property: The registry key entity id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java index 40a02c226353c..407ab2618c47f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java @@ -17,6 +17,10 @@ public final class RelationInner extends ResourceWithEtag { @JsonProperty(value = "properties") private RelationProperties innerProperties; + /** Creates an instance of RelationInner class. */ + public RelationInner() { + } + /** * Get the innerProperties property: Relation properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java index 99e3df52c8c14..d02e2734c093e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java @@ -35,6 +35,10 @@ public final class RelationProperties { @JsonProperty(value = "relatedResourceKind", access = JsonProperty.Access.WRITE_ONLY) private String relatedResourceKind; + /** Creates an instance of RelationProperties class. */ + public RelationProperties() { + } + /** * Get the relatedResourceId property: The resource ID of the related resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java index dff64861cae53..877ea93a45107 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java @@ -29,6 +29,10 @@ public final class RepoInner { @JsonProperty(value = "branches") private List branches; + /** Creates an instance of RepoInner class. */ + public RepoInner() { + } + /** * Get the url property: The url to access the repository. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java index 98738e4e20290..ea3d05c03f25d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleCommonProperties; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -90,6 +91,10 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "incidentConfiguration") private IncidentConfiguration incidentConfiguration; + /** Creates an instance of ScheduledAlertRuleProperties class. */ + public ScheduledAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -377,6 +382,14 @@ public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverrid return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + super.withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java index 42be477852893..c8289dc020baa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -144,6 +145,16 @@ public final class ScheduledAlertRuleTemplateProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of ScheduledAlertRuleTemplateProperties class. */ + public ScheduledAlertRuleTemplateProperties() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * @@ -526,6 +537,27 @@ public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetail return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -544,5 +576,8 @@ public void validate() { if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java index 21db1aca93e58..b1ec169a23da3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java @@ -171,6 +171,10 @@ public final class SecurityAlertProperties extends EntityCommonProperties { @JsonProperty(value = "resourceIdentifiers", access = JsonProperty.Access.WRITE_ONLY) private List resourceIdentifiers; + /** Creates an instance of SecurityAlertProperties class. */ + public SecurityAlertProperties() { + } + /** * Get the alertDisplayName property: The display name of the alert. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java index e6bf9c697c0ab..c7704c108f5cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java @@ -30,6 +30,10 @@ public final class SecurityGroupEntityProperties extends EntityCommonProperties @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) private String sid; + /** Creates an instance of SecurityGroupEntityProperties class. */ + public SecurityGroupEntityProperties() { + } + /** * Get the distinguishedName property: The group distinguished name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java index 8bf08cc6714d7..c6f751dfa6aa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Anomaly", value = AnomalySecurityMLAnalyticsSettings.class)}) @Fluent public class SecurityMLAnalyticsSettingInner extends ResourceWithEtag { + /** Creates an instance of SecurityMLAnalyticsSettingInner class. */ + public SecurityMLAnalyticsSettingInner() { + } + /** {@inheritDoc} */ @Override public SecurityMLAnalyticsSettingInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java index e46fd29c170a9..368b6dbbd3408 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java @@ -17,6 +17,10 @@ public final class SentinelOnboardingStateInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SentinelOnboardingStateProperties innerProperties; + /** Creates an instance of SentinelOnboardingStateInner class. */ + public SentinelOnboardingStateInner() { + } + /** * Get the innerProperties property: The Sentinel onboarding state object. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java index d1067a68a26d6..881aae69ba588 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java @@ -16,6 +16,10 @@ public final class SentinelOnboardingStateProperties { @JsonProperty(value = "customerManagedKey") private Boolean customerManagedKey; + /** Creates an instance of SentinelOnboardingStateProperties class. */ + public SentinelOnboardingStateProperties() { + } + /** * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java index 420eae2ca8575..aeef11eb5f718 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java @@ -18,6 +18,10 @@ public final class SentinelOnboardingStatesListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SentinelOnboardingStatesListInner class. */ + public SentinelOnboardingStatesListInner() { + } + /** * Get the value property: Array of Sentinel onboarding states. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java index bc77b021a5b58..8845126988477 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java @@ -18,6 +18,10 @@ public final class SettingListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SettingListInner class. */ + public SettingListInner() { + } + /** * Get the value property: Array of settings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java index fe11570beafcd..139df92031e0c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java @@ -29,6 +29,10 @@ }) @Fluent public class SettingsInner extends ResourceWithEtag { + /** Creates an instance of SettingsInner class. */ + public SettingsInner() { + } + /** {@inheritDoc} */ @Override public SettingsInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java index 3d9c0096e645c..ffb10634c8f27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java @@ -24,6 +24,10 @@ public final class SourceControlInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SourceControlProperties innerProperties; + /** Creates an instance of SourceControlInner class. */ + public SourceControlInner() { + } + /** * Get the innerProperties property: source control properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java index c7b2417c0cdc4..eeff41d6f706d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java @@ -72,6 +72,10 @@ public final class SourceControlProperties { @JsonProperty(value = "lastDeploymentInfo") private DeploymentInfo lastDeploymentInfo; + /** Creates an instance of SourceControlProperties class. */ + public SourceControlProperties() { + } + /** * Get the id property: The id (a Guid) of the source control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java index b676b6b710614..3aa288796faa6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java @@ -73,6 +73,10 @@ public final class SubmissionMailEntityProperties extends EntityCommonProperties @JsonProperty(value = "reportType", access = JsonProperty.Access.WRITE_ONLY) private String reportType; + /** Creates an instance of SubmissionMailEntityProperties class. */ + public SubmissionMailEntityProperties() { + } + /** * Get the networkMessageId property: The network message id of email to which submission belongs. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java index defd84d018052..ff64044d5b37b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Threat Intelligence Platforms data connector required properties. */ @Fluent public final class TICheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of TICheckRequirementsProperties class. */ + public TICheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public TICheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java index 62d09af2a1b64..1b2535acb3e77 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java @@ -26,6 +26,10 @@ public final class TIDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private TIDataConnectorDataTypes dataTypes; + /** Creates an instance of TIDataConnectorProperties class. */ + public TIDataConnectorProperties() { + } + /** * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java index 9054e9c2939ed..1a536481b443e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java @@ -41,6 +41,10 @@ public final class TeamInformationInner { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of TeamInformationInner class. */ + public TeamInformationInner() { + } + /** * Get the teamId property: Team ID. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelAutoGeneratedInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelAutoGeneratedInner.java new file mode 100644 index 0000000000000..3fab22cb38681 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelAutoGeneratedInner.java @@ -0,0 +1,608 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Template resource definition. */ +@Fluent +public final class TemplateModelAutoGeneratedInner extends ResourceWithEtag { + /* + * template properties + */ + @JsonProperty(value = "properties") + private TemplatePropertiesAutoGenerated innerProperties; + + /** Creates an instance of TemplateModelAutoGeneratedInner class. */ + public TemplateModelAutoGeneratedInner() { + } + + /** + * Get the innerProperties property: template properties. + * + * @return the innerProperties value. + */ + private TemplatePropertiesAutoGenerated innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TemplateModelAutoGeneratedInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + public String contentId() { + return this.innerProperties() == null ? null : this.innerProperties().contentId(); + } + + /** + * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @param contentId the contentId value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withContentId(String contentId) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withContentId(contentId); + return this; + } + + /** + * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @param version the version value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the displayName property: The display name of the template. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name of the template. + * + * @param displayName the displayName value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + public Kind contentKind() { + return this.innerProperties() == null ? null : this.innerProperties().contentKind(); + } + + /** + * Set the contentKind property: The kind of content the template is for. + * + * @param contentKind the contentKind value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withContentKind(Kind contentKind) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withContentKind(contentKind); + return this; + } + + /** + * Get the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + public MetadataSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: Source of the content. This is where/how it was created. + * + * @param source the source value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withSource(MetadataSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the author property: The creator of the content item. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.innerProperties() == null ? null : this.innerProperties().author(); + } + + /** + * Set the author property: The creator of the content item. + * + * @param author the author value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withAuthor(MetadataAuthor author) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withAuthor(author); + return this; + } + + /** + * Get the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.innerProperties() == null ? null : this.innerProperties().support(); + } + + /** + * Set the support property: Support information for the template - type, name, contact information. + * + * @param support the support value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withSupport(MetadataSupport support) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withSupport(support); + return this; + } + + /** + * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.innerProperties() == null ? null : this.innerProperties().dependencies(); + } + + /** + * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @param dependencies the dependencies value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withDependencies(MetadataDependencies dependencies) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withDependencies(dependencies); + return this; + } + + /** + * Get the categories property: Categories for the item. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.innerProperties() == null ? null : this.innerProperties().categories(); + } + + /** + * Set the categories property: Categories for the item. + * + * @param categories the categories value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withCategories(MetadataCategories categories) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withCategories(categories); + return this; + } + + /** + * Get the providers property: Providers for the content item. + * + * @return the providers value. + */ + public List providers() { + return this.innerProperties() == null ? null : this.innerProperties().providers(); + } + + /** + * Set the providers property: Providers for the content item. + * + * @param providers the providers value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withProviders(List providers) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withProviders(providers); + return this; + } + + /** + * Get the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); + } + + /** + * Set the firstPublishDate property: first publish date content item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withFirstPublishDate(LocalDate firstPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withFirstPublishDate(firstPublishDate); + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); + } + + /** + * Set the lastPublishDate property: last publish date for the content item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withLastPublishDate(LocalDate lastPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withLastPublishDate(lastPublishDate); + return this; + } + + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.innerProperties() == null ? null : this.innerProperties().customVersion(); + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withCustomVersion(customVersion); + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.innerProperties() == null ? null : this.innerProperties().previewImages(); + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withPreviewImages(previewImages); + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + + /** + * Get the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + public String packageId() { + return this.innerProperties() == null ? null : this.innerProperties().packageId(); + } + + /** + * Set the packageId property: the package Id contains this template. + * + * @param packageId the packageId value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withPackageId(String packageId) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withPackageId(packageId); + return this; + } + + /** + * Get the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.innerProperties() == null ? null : this.innerProperties().packageKind(); + } + + /** + * Set the packageKind property: the packageKind of the package contains this template. + * + * @param packageKind the packageKind value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withPackageKind(PackageKind packageKind) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withPackageKind(packageKind); + return this; + } + + /** + * Get the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + public String packageName() { + return this.innerProperties() == null ? null : this.innerProperties().packageName(); + } + + /** + * Set the packageName property: the name of the package contains this template. + * + * @param packageName the packageName value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withPackageName(String packageName) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withPackageName(packageName); + return this; + } + + /** + * Get the mainTemplate property: The JSON string of the template. + * + * @return the mainTemplate value. + */ + public Object mainTemplate() { + return this.innerProperties() == null ? null : this.innerProperties().mainTemplate(); + } + + /** + * Set the mainTemplate property: The JSON string of the template. + * + * @param mainTemplate the mainTemplate value to set. + * @return the TemplateModelAutoGeneratedInner object itself. + */ + public TemplateModelAutoGeneratedInner withMainTemplate(Object mainTemplate) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplatePropertiesAutoGenerated(); + } + this.innerProperties().withMainTemplate(mainTemplate); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelInner.java new file mode 100644 index 0000000000000..bef12c0282316 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateModelInner.java @@ -0,0 +1,633 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Template resource definition. */ +@Fluent +public final class TemplateModelInner extends ResourceWithEtag { + /* + * template properties + */ + @JsonProperty(value = "properties") + private TemplateProperties innerProperties; + + /** Creates an instance of TemplateModelInner class. */ + public TemplateModelInner() { + } + + /** + * Get the innerProperties property: template properties. + * + * @return the innerProperties value. + */ + private TemplateProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TemplateModelInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + public String contentId() { + return this.innerProperties() == null ? null : this.innerProperties().contentId(); + } + + /** + * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @param contentId the contentId value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withContentId(String contentId) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withContentId(contentId); + return this; + } + + /** + * Get the parentId property: Full parent resource ID of the content item the template is for. This is the full + * resource ID including the scope (subscription and resource group). + * + * @return the parentId value. + */ + public String parentId() { + return this.innerProperties() == null ? null : this.innerProperties().parentId(); + } + + /** + * Set the parentId property: Full parent resource ID of the content item the template is for. This is the full + * resource ID including the scope (subscription and resource group). + * + * @param parentId the parentId value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withParentId(String parentId) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withParentId(parentId); + return this; + } + + /** + * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @param version the version value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the displayName property: The display name of the template. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name of the template. + * + * @param displayName the displayName value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + public Kind contentKind() { + return this.innerProperties() == null ? null : this.innerProperties().contentKind(); + } + + /** + * Set the contentKind property: The kind of content the template is for. + * + * @param contentKind the contentKind value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withContentKind(Kind contentKind) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withContentKind(contentKind); + return this; + } + + /** + * Get the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + public MetadataSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: Source of the content. This is where/how it was created. + * + * @param source the source value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withSource(MetadataSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the author property: The creator of the content item. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.innerProperties() == null ? null : this.innerProperties().author(); + } + + /** + * Set the author property: The creator of the content item. + * + * @param author the author value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withAuthor(MetadataAuthor author) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withAuthor(author); + return this; + } + + /** + * Get the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.innerProperties() == null ? null : this.innerProperties().support(); + } + + /** + * Set the support property: Support information for the template - type, name, contact information. + * + * @param support the support value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withSupport(MetadataSupport support) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withSupport(support); + return this; + } + + /** + * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.innerProperties() == null ? null : this.innerProperties().dependencies(); + } + + /** + * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @param dependencies the dependencies value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withDependencies(MetadataDependencies dependencies) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withDependencies(dependencies); + return this; + } + + /** + * Get the categories property: Categories for the item. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.innerProperties() == null ? null : this.innerProperties().categories(); + } + + /** + * Set the categories property: Categories for the item. + * + * @param categories the categories value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withCategories(MetadataCategories categories) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withCategories(categories); + return this; + } + + /** + * Get the providers property: Providers for the content item. + * + * @return the providers value. + */ + public List providers() { + return this.innerProperties() == null ? null : this.innerProperties().providers(); + } + + /** + * Set the providers property: Providers for the content item. + * + * @param providers the providers value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withProviders(List providers) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withProviders(providers); + return this; + } + + /** + * Get the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); + } + + /** + * Set the firstPublishDate property: first publish date content item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withFirstPublishDate(LocalDate firstPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withFirstPublishDate(firstPublishDate); + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); + } + + /** + * Set the lastPublishDate property: last publish date for the content item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withLastPublishDate(LocalDate lastPublishDate) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withLastPublishDate(lastPublishDate); + return this; + } + + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.innerProperties() == null ? null : this.innerProperties().customVersion(); + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withCustomVersion(customVersion); + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().contentSchemaVersion(); + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.innerProperties() == null ? null : this.innerProperties().icon(); + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withIcon(icon); + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTactics(); + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.innerProperties() == null ? null : this.innerProperties().threatAnalysisTechniques(); + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.innerProperties() == null ? null : this.innerProperties().previewImages(); + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPreviewImages(previewImages); + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.innerProperties() == null ? null : this.innerProperties().previewImagesDark(); + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + + /** + * Get the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + public String packageId() { + return this.innerProperties() == null ? null : this.innerProperties().packageId(); + } + + /** + * Set the packageId property: the package Id contains this template. + * + * @param packageId the packageId value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPackageId(String packageId) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPackageId(packageId); + return this; + } + + /** + * Get the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.innerProperties() == null ? null : this.innerProperties().packageKind(); + } + + /** + * Set the packageKind property: the packageKind of the package contains this template. + * + * @param packageKind the packageKind value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPackageKind(PackageKind packageKind) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPackageKind(packageKind); + return this; + } + + /** + * Get the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + public String packageName() { + return this.innerProperties() == null ? null : this.innerProperties().packageName(); + } + + /** + * Set the packageName property: the name of the package contains this template. + * + * @param packageName the packageName value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPackageName(String packageName) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPackageName(packageName); + return this; + } + + /** + * Get the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + public Object packagedContent() { + return this.innerProperties() == null ? null : this.innerProperties().packagedContent(); + } + + /** + * Set the packagedContent property: the json to deploy. + * + * @param packagedContent the packagedContent value to set. + * @return the TemplateModelInner object itself. + */ + public TemplateModelInner withPackagedContent(Object packagedContent) { + if (this.innerProperties() == null) { + this.innerProperties = new TemplateProperties(); + } + this.innerProperties().withPackagedContent(packagedContent); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateProperties.java new file mode 100644 index 0000000000000..971801ebe4907 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplateProperties.java @@ -0,0 +1,724 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Template property bag. */ +@Fluent +public final class TemplateProperties { + /* + * Static ID for the content. Used to identify dependencies and content from solutions or community. + * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name + */ + @JsonProperty(value = "contentId", required = true) + private String contentId; + + /* + * Full parent resource ID of the content item the template is for. This is the full resource ID including the + * scope (subscription and resource group) + */ + @JsonProperty(value = "parentId") + private String parentId; + + /* + * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM + * metadata best practices. Can also be any string, but then we cannot guarantee any version checks + */ + @JsonProperty(value = "version", required = true) + private String version; + + /* + * The display name of the template + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The kind of content the template is for. + */ + @JsonProperty(value = "contentKind", required = true) + private Kind contentKind; + + /* + * Source of the content. This is where/how it was created. + */ + @JsonProperty(value = "source", required = true) + private MetadataSource source; + + /* + * The creator of the content item. + */ + @JsonProperty(value = "author") + private MetadataAuthor author; + + /* + * Support information for the template - type, name, contact information + */ + @JsonProperty(value = "support") + private MetadataSupport support; + + /* + * Dependencies for the content item, what other content items it requires to work. Can describe more complex + * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or + * operator/criteria for complex formats. + */ + @JsonProperty(value = "dependencies") + private MetadataDependencies dependencies; + + /* + * Categories for the item + */ + @JsonProperty(value = "categories") + private MetadataCategories categories; + + /* + * Providers for the content item + */ + @JsonProperty(value = "providers") + private List providers; + + /* + * first publish date content item + */ + @JsonProperty(value = "firstPublishDate") + private LocalDate firstPublishDate; + + /* + * last publish date for the content item + */ + @JsonProperty(value = "lastPublishDate") + private LocalDate lastPublishDate; + + /* + * The custom version of the content. A optional free text + */ + @JsonProperty(value = "customVersion") + private String customVersion; + + /* + * Schema version of the content. Can be used to distinguish between different flow based on the schema version + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * the icon identifier. this id can later be fetched from the content metadata + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the tactics being used + */ + @JsonProperty(value = "threatAnalysisTechniques") + private List threatAnalysisTechniques; + + /* + * preview image file names. These will be taken from the solution artifacts + */ + @JsonProperty(value = "previewImages") + private List previewImages; + + /* + * preview image file names. These will be taken from the solution artifacts. used for dark theme support + */ + @JsonProperty(value = "previewImagesDark") + private List previewImagesDark; + + /* + * the package Id contains this template + */ + @JsonProperty(value = "packageId") + private String packageId; + + /* + * the packageKind of the package contains this template + */ + @JsonProperty(value = "packageKind") + private PackageKind packageKind; + + /* + * the name of the package contains this template + */ + @JsonProperty(value = "packageName") + private String packageName; + + /* + * the json to deploy + */ + @JsonProperty(value = "packagedContent") + private Object packagedContent; + + /** Creates an instance of TemplateProperties class. */ + public TemplateProperties() { + } + + /** + * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + public String contentId() { + return this.contentId; + } + + /** + * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @param contentId the contentId value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withContentId(String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Get the parentId property: Full parent resource ID of the content item the template is for. This is the full + * resource ID including the scope (subscription and resource group). + * + * @return the parentId value. + */ + public String parentId() { + return this.parentId; + } + + /** + * Set the parentId property: Full parent resource ID of the content item the template is for. This is the full + * resource ID including the scope (subscription and resource group). + * + * @param parentId the parentId value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withParentId(String parentId) { + this.parentId = parentId; + return this; + } + + /** + * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @param version the version value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the displayName property: The display name of the template. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name of the template. + * + * @param displayName the displayName value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + public Kind contentKind() { + return this.contentKind; + } + + /** + * Set the contentKind property: The kind of content the template is for. + * + * @param contentKind the contentKind value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withContentKind(Kind contentKind) { + this.contentKind = contentKind; + return this; + } + + /** + * Get the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + public MetadataSource source() { + return this.source; + } + + /** + * Set the source property: Source of the content. This is where/how it was created. + * + * @param source the source value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withSource(MetadataSource source) { + this.source = source; + return this; + } + + /** + * Get the author property: The creator of the content item. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.author; + } + + /** + * Set the author property: The creator of the content item. + * + * @param author the author value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withAuthor(MetadataAuthor author) { + this.author = author; + return this; + } + + /** + * Get the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.support; + } + + /** + * Set the support property: Support information for the template - type, name, contact information. + * + * @param support the support value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withSupport(MetadataSupport support) { + this.support = support; + return this; + } + + /** + * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.dependencies; + } + + /** + * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @param dependencies the dependencies value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withDependencies(MetadataDependencies dependencies) { + this.dependencies = dependencies; + return this; + } + + /** + * Get the categories property: Categories for the item. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.categories; + } + + /** + * Set the categories property: Categories for the item. + * + * @param categories the categories value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withCategories(MetadataCategories categories) { + this.categories = categories; + return this; + } + + /** + * Get the providers property: Providers for the content item. + * + * @return the providers value. + */ + public List providers() { + return this.providers; + } + + /** + * Set the providers property: Providers for the content item. + * + * @param providers the providers value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.firstPublishDate; + } + + /** + * Set the firstPublishDate property: first publish date content item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withFirstPublishDate(LocalDate firstPublishDate) { + this.firstPublishDate = firstPublishDate; + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.lastPublishDate; + } + + /** + * Set the lastPublishDate property: last publish date for the content item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withLastPublishDate(LocalDate lastPublishDate) { + this.lastPublishDate = lastPublishDate; + return this; + } + + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.customVersion; + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withCustomVersion(String customVersion) { + this.customVersion = customVersion; + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.threatAnalysisTechniques; + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withThreatAnalysisTechniques(List threatAnalysisTechniques) { + this.threatAnalysisTechniques = threatAnalysisTechniques; + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.previewImages; + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPreviewImages(List previewImages) { + this.previewImages = previewImages; + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.previewImagesDark; + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + + /** + * Get the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + public String packageId() { + return this.packageId; + } + + /** + * Set the packageId property: the package Id contains this template. + * + * @param packageId the packageId value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPackageId(String packageId) { + this.packageId = packageId; + return this; + } + + /** + * Get the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.packageKind; + } + + /** + * Set the packageKind property: the packageKind of the package contains this template. + * + * @param packageKind the packageKind value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPackageKind(PackageKind packageKind) { + this.packageKind = packageKind; + return this; + } + + /** + * Get the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + public String packageName() { + return this.packageName; + } + + /** + * Set the packageName property: the name of the package contains this template. + * + * @param packageName the packageName value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPackageName(String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Get the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + public Object packagedContent() { + return this.packagedContent; + } + + /** + * Set the packagedContent property: the json to deploy. + * + * @param packagedContent the packagedContent value to set. + * @return the TemplateProperties object itself. + */ + public TemplateProperties withPackagedContent(Object packagedContent) { + this.packagedContent = packagedContent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contentId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property contentId in model TemplateProperties")); + } + if (version() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property version in model TemplateProperties")); + } + if (displayName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property displayName in model TemplateProperties")); + } + if (contentKind() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property contentKind in model TemplateProperties")); + } + if (source() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property source in model TemplateProperties")); + } else { + source().validate(); + } + if (author() != null) { + author().validate(); + } + if (support() != null) { + support().validate(); + } + if (dependencies() != null) { + dependencies().validate(); + } + if (categories() != null) { + categories().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TemplateProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplatePropertiesAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplatePropertiesAutoGenerated.java new file mode 100644 index 0000000000000..236d57d4e8e03 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TemplatePropertiesAutoGenerated.java @@ -0,0 +1,706 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Template property bag. */ +@Fluent +public final class TemplatePropertiesAutoGenerated { + /* + * Static ID for the content. Used to identify dependencies and content from solutions or community. + * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name + */ + @JsonProperty(value = "contentId", required = true) + private String contentId; + + /* + * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM + * metadata best practices. Can also be any string, but then we cannot guarantee any version checks + */ + @JsonProperty(value = "version", required = true) + private String version; + + /* + * The display name of the template + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The kind of content the template is for. + */ + @JsonProperty(value = "contentKind", required = true) + private Kind contentKind; + + /* + * Source of the content. This is where/how it was created. + */ + @JsonProperty(value = "source", required = true) + private MetadataSource source; + + /* + * The creator of the content item. + */ + @JsonProperty(value = "author") + private MetadataAuthor author; + + /* + * Support information for the template - type, name, contact information + */ + @JsonProperty(value = "support") + private MetadataSupport support; + + /* + * Dependencies for the content item, what other content items it requires to work. Can describe more complex + * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or + * operator/criteria for complex formats. + */ + @JsonProperty(value = "dependencies") + private MetadataDependencies dependencies; + + /* + * Categories for the item + */ + @JsonProperty(value = "categories") + private MetadataCategories categories; + + /* + * Providers for the content item + */ + @JsonProperty(value = "providers") + private List providers; + + /* + * first publish date content item + */ + @JsonProperty(value = "firstPublishDate") + private LocalDate firstPublishDate; + + /* + * last publish date for the content item + */ + @JsonProperty(value = "lastPublishDate") + private LocalDate lastPublishDate; + + /* + * The custom version of the content. A optional free text + */ + @JsonProperty(value = "customVersion") + private String customVersion; + + /* + * Schema version of the content. Can be used to distinguish between different flow based on the schema version + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * the icon identifier. this id can later be fetched from the content metadata + */ + @JsonProperty(value = "icon") + private String icon; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the tactics being used + */ + @JsonProperty(value = "threatAnalysisTechniques") + private List threatAnalysisTechniques; + + /* + * preview image file names. These will be taken from the solution artifacts + */ + @JsonProperty(value = "previewImages") + private List previewImages; + + /* + * preview image file names. These will be taken from the solution artifacts. used for dark theme support + */ + @JsonProperty(value = "previewImagesDark") + private List previewImagesDark; + + /* + * the package Id contains this template + */ + @JsonProperty(value = "packageId", required = true) + private String packageId; + + /* + * the packageKind of the package contains this template + */ + @JsonProperty(value = "packageKind") + private PackageKind packageKind; + + /* + * the name of the package contains this template + */ + @JsonProperty(value = "packageName") + private String packageName; + + /* + * The JSON string of the template + */ + @JsonProperty(value = "mainTemplate") + private Object mainTemplate; + + /** Creates an instance of TemplatePropertiesAutoGenerated class. */ + public TemplatePropertiesAutoGenerated() { + } + + /** + * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + public String contentId() { + return this.contentId; + } + + /** + * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @param contentId the contentId value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withContentId(String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @param version the version value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the displayName property: The display name of the template. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name of the template. + * + * @param displayName the displayName value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + public Kind contentKind() { + return this.contentKind; + } + + /** + * Set the contentKind property: The kind of content the template is for. + * + * @param contentKind the contentKind value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withContentKind(Kind contentKind) { + this.contentKind = contentKind; + return this; + } + + /** + * Get the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + public MetadataSource source() { + return this.source; + } + + /** + * Set the source property: Source of the content. This is where/how it was created. + * + * @param source the source value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withSource(MetadataSource source) { + this.source = source; + return this; + } + + /** + * Get the author property: The creator of the content item. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.author; + } + + /** + * Set the author property: The creator of the content item. + * + * @param author the author value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withAuthor(MetadataAuthor author) { + this.author = author; + return this; + } + + /** + * Get the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.support; + } + + /** + * Set the support property: Support information for the template - type, name, contact information. + * + * @param support the support value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withSupport(MetadataSupport support) { + this.support = support; + return this; + } + + /** + * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.dependencies; + } + + /** + * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @param dependencies the dependencies value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withDependencies(MetadataDependencies dependencies) { + this.dependencies = dependencies; + return this; + } + + /** + * Get the categories property: Categories for the item. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.categories; + } + + /** + * Set the categories property: Categories for the item. + * + * @param categories the categories value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withCategories(MetadataCategories categories) { + this.categories = categories; + return this; + } + + /** + * Get the providers property: Providers for the content item. + * + * @return the providers value. + */ + public List providers() { + return this.providers; + } + + /** + * Set the providers property: Providers for the content item. + * + * @param providers the providers value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.firstPublishDate; + } + + /** + * Set the firstPublishDate property: first publish date content item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withFirstPublishDate(LocalDate firstPublishDate) { + this.firstPublishDate = firstPublishDate; + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.lastPublishDate; + } + + /** + * Set the lastPublishDate property: last publish date for the content item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withLastPublishDate(LocalDate lastPublishDate) { + this.lastPublishDate = lastPublishDate; + return this; + } + + /** + * Get the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + public String customVersion() { + return this.customVersion; + } + + /** + * Set the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion the customVersion value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withCustomVersion(String customVersion) { + this.customVersion = customVersion; + return this; + } + + /** + * Get the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + public List threatAnalysisTechniques() { + return this.threatAnalysisTechniques; + } + + /** + * Set the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalysisTechniques the threatAnalysisTechniques value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withThreatAnalysisTechniques(List threatAnalysisTechniques) { + this.threatAnalysisTechniques = threatAnalysisTechniques; + return this; + } + + /** + * Get the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + public List previewImages() { + return this.previewImages; + } + + /** + * Set the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @param previewImages the previewImages value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withPreviewImages(List previewImages) { + this.previewImages = previewImages; + return this; + } + + /** + * Get the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + public List previewImagesDark() { + return this.previewImagesDark; + } + + /** + * Set the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @param previewImagesDark the previewImagesDark value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + + /** + * Get the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + public String packageId() { + return this.packageId; + } + + /** + * Set the packageId property: the package Id contains this template. + * + * @param packageId the packageId value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withPackageId(String packageId) { + this.packageId = packageId; + return this; + } + + /** + * Get the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.packageKind; + } + + /** + * Set the packageKind property: the packageKind of the package contains this template. + * + * @param packageKind the packageKind value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withPackageKind(PackageKind packageKind) { + this.packageKind = packageKind; + return this; + } + + /** + * Get the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + public String packageName() { + return this.packageName; + } + + /** + * Set the packageName property: the name of the package contains this template. + * + * @param packageName the packageName value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withPackageName(String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Get the mainTemplate property: The JSON string of the template. + * + * @return the mainTemplate value. + */ + public Object mainTemplate() { + return this.mainTemplate; + } + + /** + * Set the mainTemplate property: The JSON string of the template. + * + * @param mainTemplate the mainTemplate value to set. + * @return the TemplatePropertiesAutoGenerated object itself. + */ + public TemplatePropertiesAutoGenerated withMainTemplate(Object mainTemplate) { + this.mainTemplate = mainTemplate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contentId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contentId in model TemplatePropertiesAutoGenerated")); + } + if (version() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property version in model TemplatePropertiesAutoGenerated")); + } + if (displayName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property displayName in model TemplatePropertiesAutoGenerated")); + } + if (contentKind() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contentKind in model TemplatePropertiesAutoGenerated")); + } + if (source() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property source in model TemplatePropertiesAutoGenerated")); + } else { + source().validate(); + } + if (author() != null) { + author().validate(); + } + if (support() != null) { + support().validate(); + } + if (dependencies() != null) { + dependencies().validate(); + } + if (categories() != null) { + categories().validate(); + } + if (packageId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property packageId in model TemplatePropertiesAutoGenerated")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TemplatePropertiesAutoGenerated.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java index 3118a288a38b0..70f785959f8e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java @@ -63,6 +63,10 @@ public final class ThreatIntelligenceAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of ThreatIntelligenceAlertRuleProperties class. */ + public ThreatIntelligenceAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java index 2cabad3ea7655..18b8059b20019 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRu @JsonProperty(value = "severity", required = true) private AlertSeverity severity; + /** Creates an instance of ThreatIntelligenceAlertRuleTemplateProperties class. */ + public ThreatIntelligenceAlertRuleTemplateProperties() { + } + /** * Get the severity property: The severity for alerts created by this alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java index 94e3ad449679e..a0475d7a80671 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java @@ -187,6 +187,10 @@ public final class ThreatIntelligenceIndicatorProperties extends EntityCommonPro @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extensions; + /** Creates an instance of ThreatIntelligenceIndicatorProperties class. */ + public ThreatIntelligenceIndicatorProperties() { + } + /** * Get the threatIntelligenceTags property: List of tags. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java index 66c6f53009c56..5930206a39554 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) @Fluent public class ThreatIntelligenceInformationInner extends ResourceWithEtag { + /** Creates an instance of ThreatIntelligenceInformationInner class. */ + public ThreatIntelligenceInformationInner() { + } + /** {@inheritDoc} */ @Override public ThreatIntelligenceInformationInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java index fccc6810b44c3..94a545978b2e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java @@ -19,6 +19,10 @@ public final class ThreatIntelligenceMetricsListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceMetricsListInner class. */ + public ThreatIntelligenceMetricsListInner() { + } + /** * Get the value property: Array of threat intelligence metric fields (type/threat type/source). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java index e65e280aade23..f7ded23fff1a6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Threat Intelligence TAXII data connector required properties. */ @Fluent public final class TiTaxiiCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of TiTaxiiCheckRequirementsProperties class. */ + public TiTaxiiCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public TiTaxiiCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java index 2faf94e2db69c..8687745a97129 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java @@ -69,6 +69,10 @@ public final class TiTaxiiDataConnectorProperties extends DataConnectorTenantId @JsonProperty(value = "dataTypes", required = true) private TiTaxiiDataConnectorDataTypes dataTypes; + /** Creates an instance of TiTaxiiDataConnectorProperties class. */ + public TiTaxiiDataConnectorProperties() { + } + /** * Get the workspaceId property: The workspace id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java new file mode 100644 index 0000000000000..756e23f6caa1c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The triggered analytics rule run. */ +@Fluent +public final class TriggeredAnalyticsRuleRunInner extends ResourceWithEtag { + /* + * The triggered analytics rule run Properties + */ + @JsonProperty(value = "properties", required = true) + private TriggeredAnalyticsRuleRunProperties innerProperties = new TriggeredAnalyticsRuleRunProperties(); + + /** Creates an instance of TriggeredAnalyticsRuleRunInner class. */ + public TriggeredAnalyticsRuleRunInner() { + } + + /** + * Get the innerProperties property: The triggered analytics rule run Properties. + * + * @return the innerProperties value. + */ + private TriggeredAnalyticsRuleRunProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TriggeredAnalyticsRuleRunInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().executionTimeUtc(); + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withExecutionTimeUtc(executionTimeUtc); + return this; + } + + /** + * Get the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.innerProperties() == null ? null : this.innerProperties().ruleId(); + } + + /** + * Set the ruleId property: The ruleId property. + * + * @param ruleId the ruleId value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withRuleId(String ruleId) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withRuleId(ruleId); + return this; + } + + /** + * Get the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + public String triggeredAnalyticsRuleRunId() { + return this.innerProperties() == null ? null : this.innerProperties().triggeredAnalyticsRuleRunId(); + } + + /** + * Set the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @param triggeredAnalyticsRuleRunId the triggeredAnalyticsRuleRunId value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withTriggeredAnalyticsRuleRunId(String triggeredAnalyticsRuleRunId) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withTriggeredAnalyticsRuleRunId(triggeredAnalyticsRuleRunId); + return this; + } + + /** + * Get the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: The triggered analytics rule run provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withProvisioningState(ProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Get the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + public Map ruleRunAdditionalData() { + return this.innerProperties() == null ? null : this.innerProperties().ruleRunAdditionalData(); + } + + /** + * Set the ruleRunAdditionalData property: Dictionary of <any>. + * + * @param ruleRunAdditionalData the ruleRunAdditionalData value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withRuleRunAdditionalData(Map ruleRunAdditionalData) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withRuleRunAdditionalData(ruleRunAdditionalData); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model TriggeredAnalyticsRuleRunInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java new file mode 100644 index 0000000000000..d572346519bcf --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The triggered analytics rule run Properties. */ +@Fluent +public final class TriggeredAnalyticsRuleRunProperties { + /* + * The executionTimeUtc property. + */ + @JsonProperty(value = "executionTimeUtc", required = true) + private OffsetDateTime executionTimeUtc; + + /* + * The ruleId property. + */ + @JsonProperty(value = "ruleId", required = true) + private String ruleId; + + /* + * The triggeredAnalyticsRuleRunId property. + */ + @JsonProperty(value = "triggeredAnalyticsRuleRunId", required = true) + private String triggeredAnalyticsRuleRunId; + + /* + * The triggered analytics rule run provisioning state + */ + @JsonProperty(value = "provisioningState", required = true) + private ProvisioningState provisioningState; + + /* + * Dictionary of + */ + @JsonProperty(value = "ruleRunAdditionalData") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map ruleRunAdditionalData; + + /** Creates an instance of TriggeredAnalyticsRuleRunProperties class. */ + public TriggeredAnalyticsRuleRunProperties() { + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.executionTimeUtc; + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + return this; + } + + /** + * Get the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.ruleId; + } + + /** + * Set the ruleId property: The ruleId property. + * + * @param ruleId the ruleId value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * Get the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + public String triggeredAnalyticsRuleRunId() { + return this.triggeredAnalyticsRuleRunId; + } + + /** + * Set the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @param triggeredAnalyticsRuleRunId the triggeredAnalyticsRuleRunId value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withTriggeredAnalyticsRuleRunId(String triggeredAnalyticsRuleRunId) { + this.triggeredAnalyticsRuleRunId = triggeredAnalyticsRuleRunId; + return this; + } + + /** + * Get the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The triggered analytics rule run provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + public Map ruleRunAdditionalData() { + return this.ruleRunAdditionalData; + } + + /** + * Set the ruleRunAdditionalData property: Dictionary of <any>. + * + * @param ruleRunAdditionalData the ruleRunAdditionalData value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withRuleRunAdditionalData(Map ruleRunAdditionalData) { + this.ruleRunAdditionalData = ruleRunAdditionalData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (executionTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property executionTimeUtc in model TriggeredAnalyticsRuleRunProperties")); + } + if (ruleId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ruleId in model TriggeredAnalyticsRuleRunProperties")); + } + if (triggeredAnalyticsRuleRunId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property triggeredAnalyticsRuleRunId in model" + + " TriggeredAnalyticsRuleRunProperties")); + } + if (provisioningState() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property provisioningState in model TriggeredAnalyticsRuleRunProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java index 9a9c6252b3951..0d21abf128165 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java @@ -18,6 +18,10 @@ public final class UebaProperties { @JsonProperty(value = "dataSources") private List dataSources; + /** Creates an instance of UebaProperties class. */ + public UebaProperties() { + } + /** * Get the dataSources property: The relevant data sources that enriched by ueba. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java index 833855a5cdd74..7ccc954ce3ddb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java @@ -17,6 +17,10 @@ public final class UrlEntityProperties extends EntityCommonProperties { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; + /** Creates an instance of UrlEntityProperties class. */ + public UrlEntityProperties() { + } + /** * Get the url property: A full URL the entity points to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java index 14c1ca299bc28..7f06069b0f5db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java @@ -22,6 +22,10 @@ public final class WatchlistInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistProperties innerProperties; + /** Creates an instance of WatchlistInner class. */ + public WatchlistInner() { + } + /** * Get the innerProperties property: Watchlist properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java index e7424ae995450..f298a0f775a1a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java @@ -20,6 +20,10 @@ public final class WatchlistItemInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistItemProperties innerProperties; + /** Creates an instance of WatchlistItemInner class. */ + public WatchlistItemInner() { + } + /** * Get the innerProperties property: Watchlist Item properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java index b33026a9990e3..ba191468ef506 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java @@ -77,6 +77,10 @@ public final class WatchlistItemProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map entityMapping; + /** Creates an instance of WatchlistItemProperties class. */ + public WatchlistItemProperties() { + } + /** * Get the watchlistItemType property: The type of the watchlist item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java index 97fa95571482c..8ba48690ce1f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java @@ -146,6 +146,10 @@ public final class WatchlistProperties { @JsonProperty(value = "uploadStatus") private String uploadStatus; + /** Creates an instance of WatchlistProperties class. */ + public WatchlistProperties() { + } + /** * Get the watchlistId property: The id (a Guid) of the watchlist. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationInner.java new file mode 100644 index 0000000000000..fd3b44b9c009a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationInner.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.AzureEntityResource; +import com.azure.resourcemanager.securityinsights.models.Mode; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workspace manager configuration. */ +@Fluent +public final class WorkspaceManagerConfigurationInner extends AzureEntityResource { + /* + * The workspace manager configuration object + */ + @JsonProperty(value = "properties") + private WorkspaceManagerConfigurationProperties innerProperties; + + /** Creates an instance of WorkspaceManagerConfigurationInner class. */ + public WorkspaceManagerConfigurationInner() { + } + + /** + * Get the innerProperties property: The workspace manager configuration object. + * + * @return the innerProperties value. + */ + private WorkspaceManagerConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the mode property: The current mode of the workspace manager configuration. + * + * @return the mode value. + */ + public Mode mode() { + return this.innerProperties() == null ? null : this.innerProperties().mode(); + } + + /** + * Set the mode property: The current mode of the workspace manager configuration. + * + * @param mode the mode value to set. + * @return the WorkspaceManagerConfigurationInner object itself. + */ + public WorkspaceManagerConfigurationInner withMode(Mode mode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceManagerConfigurationProperties(); + } + this.innerProperties().withMode(mode); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationProperties.java new file mode 100644 index 0000000000000..3977281952b4c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerConfigurationProperties.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Mode; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workspace manager configuration properties. */ +@Fluent +public final class WorkspaceManagerConfigurationProperties { + /* + * The current mode of the workspace manager configuration + */ + @JsonProperty(value = "mode", required = true) + private Mode mode; + + /** Creates an instance of WorkspaceManagerConfigurationProperties class. */ + public WorkspaceManagerConfigurationProperties() { + } + + /** + * Get the mode property: The current mode of the workspace manager configuration. + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: The current mode of the workspace manager configuration. + * + * @param mode the mode value to set. + * @return the WorkspaceManagerConfigurationProperties object itself. + */ + public WorkspaceManagerConfigurationProperties withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mode() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property mode in model WorkspaceManagerConfigurationProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerConfigurationProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberInner.java new file mode 100644 index 0000000000000..fa1830dcc4532 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.AzureEntityResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workspace manager member. */ +@Fluent +public final class WorkspaceManagerMemberInner extends AzureEntityResource { + /* + * The workspace manager member object + */ + @JsonProperty(value = "properties") + private WorkspaceManagerMemberProperties innerProperties; + + /** Creates an instance of WorkspaceManagerMemberInner class. */ + public WorkspaceManagerMemberInner() { + } + + /** + * Get the innerProperties property: The workspace manager member object. + * + * @return the innerProperties value. + */ + private WorkspaceManagerMemberProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @return the targetWorkspaceId value. + */ + public String targetWorkspaceId() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkspaceId(); + } + + /** + * Set the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @param targetWorkspaceId the targetWorkspaceId value to set. + * @return the WorkspaceManagerMemberInner object itself. + */ + public WorkspaceManagerMemberInner withTargetWorkspaceId(String targetWorkspaceId) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceManagerMemberProperties(); + } + this.innerProperties().withTargetWorkspaceId(targetWorkspaceId); + return this; + } + + /** + * Get the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * + * @return the targetWorkspaceTenantId value. + */ + public String targetWorkspaceTenantId() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkspaceTenantId(); + } + + /** + * Set the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * + * @param targetWorkspaceTenantId the targetWorkspaceTenantId value to set. + * @return the WorkspaceManagerMemberInner object itself. + */ + public WorkspaceManagerMemberInner withTargetWorkspaceTenantId(String targetWorkspaceTenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceManagerMemberProperties(); + } + this.innerProperties().withTargetWorkspaceTenantId(targetWorkspaceTenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberProperties.java new file mode 100644 index 0000000000000..2165dc34d1997 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WorkspaceManagerMemberProperties.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workspace manager member properties. */ +@Fluent +public final class WorkspaceManagerMemberProperties { + /* + * Fully qualified resource ID of the target Sentinel workspace joining the given Sentinel workspace manager + */ + @JsonProperty(value = "targetWorkspaceId", required = true) + private String targetWorkspaceId; + + /* + * Tenant id of the target Sentinel workspace joining the given Sentinel workspace manager + */ + @JsonProperty(value = "targetWorkspaceTenantId", required = true) + private String targetWorkspaceTenantId; + + /** Creates an instance of WorkspaceManagerMemberProperties class. */ + public WorkspaceManagerMemberProperties() { + } + + /** + * Get the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @return the targetWorkspaceId value. + */ + public String targetWorkspaceId() { + return this.targetWorkspaceId; + } + + /** + * Set the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @param targetWorkspaceId the targetWorkspaceId value to set. + * @return the WorkspaceManagerMemberProperties object itself. + */ + public WorkspaceManagerMemberProperties withTargetWorkspaceId(String targetWorkspaceId) { + this.targetWorkspaceId = targetWorkspaceId; + return this; + } + + /** + * Get the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * + * @return the targetWorkspaceTenantId value. + */ + public String targetWorkspaceTenantId() { + return this.targetWorkspaceTenantId; + } + + /** + * Set the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * + * @param targetWorkspaceTenantId the targetWorkspaceTenantId value to set. + * @return the WorkspaceManagerMemberProperties object itself. + */ + public WorkspaceManagerMemberProperties withTargetWorkspaceTenantId(String targetWorkspaceTenantId) { + this.targetWorkspaceTenantId = targetWorkspaceTenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetWorkspaceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property targetWorkspaceId in model WorkspaceManagerMemberProperties")); + } + if (targetWorkspaceTenantId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property targetWorkspaceTenantId in model WorkspaceManagerMemberProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerMemberProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java index 7b08804507b76..6adf98536afaa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java @@ -58,11 +58,10 @@ public final class ActionsClientImpl implements ActionsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsActi") - private interface ActionsService { + public interface ActionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAlertRule( @@ -77,9 +76,7 @@ Mono> listByAlertRule( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,9 +92,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -114,9 +109,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions" - + "/{actionId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/actions/{actionId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -477,14 +470,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - return getAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); } /** @@ -494,16 +489,14 @@ public ActionResponseInner get(String resourceGroupName, String workspaceName, S * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); + public ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + return getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE).getValue(); } /** @@ -667,15 +660,22 @@ private Mono createOrUpdateAsync( * @param ruleId Alert rule ID. * @param actionId Action ID. * @param action The action. + * @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 action for alert rule. + * @return action for alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, actionId, action).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String ruleId, + String actionId, + ActionRequest action, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action, context) + .block(); } /** @@ -686,22 +686,16 @@ public ActionResponseInner createOrUpdate( * @param ruleId Alert rule ID. * @param actionId Action ID. * @param action The action. - * @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 action for alert rule along with {@link Response}. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String ruleId, - String actionId, - ActionRequest action, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action, context) - .block(); + public ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, actionId, action, Context.NONE) + .getValue(); } /** @@ -843,13 +837,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - deleteAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); } /** @@ -859,16 +856,13 @@ public void delete(String resourceGroupName, String workspaceName, String ruleId * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java index 09f8ea57b3331..f4284ef8eb34b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java @@ -41,15 +41,6 @@ public PagedIterable listByAlertRule( return Utils.mapPage(inner, inner1 -> new ActionResponseImpl(inner1, this.manager())); } - public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); - if (inner != null) { - return new ActionResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); + if (inner != null) { + return new ActionResponseImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -74,6 +70,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + } + public ActionResponse getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java new file mode 100644 index 0000000000000..6aefb2a9d05b6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java @@ -0,0 +1,403 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AlertRuleOperationsClient. */ +public final class AlertRuleOperationsClientImpl implements AlertRuleOperationsClient { + /** The proxy service used to perform REST calls. */ + private final AlertRuleOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of AlertRuleOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AlertRuleOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(AlertRuleOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsAlertRuleOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsAler") + public interface AlertRuleOperationsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/triggerRuleRun") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> triggerRuleRun( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleId") String ruleId, + @BodyParam("application/json") AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRuleRunWithResponseAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + } + if (analyticsRuleRunTriggerParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter analyticsRuleRunTriggerParameter is required and cannot be null.")); + } else { + analyticsRuleRunTriggerParameter.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .triggerRuleRun( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleId, + analyticsRuleRunTriggerParameter, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRuleRunWithResponseAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + } + if (analyticsRuleRunTriggerParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter analyticsRuleRunTriggerParameter is required and cannot be null.")); + } else { + analyticsRuleRunTriggerParameter.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .triggerRuleRun( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleId, + analyticsRuleRunTriggerParameter, + accept, + context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTriggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + Mono>> mono = + triggerRuleRunWithResponseAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTriggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + triggerRuleRunWithResponseAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + return this + .beginTriggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter) + .getSyncPoller(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + return this + .beginTriggerRuleRunAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .getSyncPoller(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + return beginTriggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + return beginTriggerRuleRunAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + triggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter).block(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + triggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .block(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java new file mode 100644 index 0000000000000..012dc77049268 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; +import com.azure.resourcemanager.securityinsights.models.AlertRuleOperations; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; + +public final class AlertRuleOperationsImpl implements AlertRuleOperations { + private static final ClientLogger LOGGER = new ClientLogger(AlertRuleOperationsImpl.class); + + private final AlertRuleOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public AlertRuleOperationsImpl( + AlertRuleOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + this.serviceClient().triggerRuleRun(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter); + } + + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + this + .serviceClient() + .triggerRuleRun(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context); + } + + private AlertRuleOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java index d017573675b91..34c2f88024bb8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java @@ -55,11 +55,10 @@ public final class AlertRuleTemplatesClientImpl implements AlertRuleTemplatesCli */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRuleTemplatesService { + public interface AlertRuleTemplatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -73,9 +72,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates" - + "/{alertRuleTemplateId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRuleTemplates/{alertRuleTemplateId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -407,14 +404,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - return getAsync(resourceGroupName, workspaceName, alertRuleTemplateId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId, context).block(); } /** @@ -423,16 +422,14 @@ public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId, context).block(); + public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { + return getWithResponse(resourceGroupName, workspaceName, alertRuleTemplateId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java index e5bdc4bc9ffc0..a8a1e69eefb43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String wo return Utils.mapPage(inner, inner1 -> new AlertRuleTemplateImpl(inner1, this.manager())); } - public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); - if (inner != null) { - return new AlertRuleTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { Response inner = @@ -63,6 +54,15 @@ public Response getWithResponse( } } + public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { + AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); + if (inner != null) { + return new AlertRuleTemplateImpl(inner, this.manager()); + } else { + return null; + } + } + private AlertRuleTemplatesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java index e092a7beec6db..28d31d994f7ae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java @@ -58,11 +58,10 @@ public final class AlertRulesClientImpl implements AlertRulesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRulesService { + public interface AlertRulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -76,8 +75,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -92,8 +90,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -109,8 +106,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -437,14 +433,16 @@ private Mono getAsync(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId) { - return getAsync(resourceGroupName, workspaceName, ruleId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); } /** @@ -453,16 +451,14 @@ public AlertRuleInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); + public AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId) { + return getWithResponse(resourceGroupName, workspaceName, ruleId, Context.NONE).getValue(); } /** @@ -609,15 +605,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, alertRule).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule, context).block(); } /** @@ -627,16 +624,15 @@ public AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule, context).block(); + public AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, alertRule, Context.NONE).getValue(); } /** @@ -765,13 +761,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - deleteAsync(resourceGroupName, workspaceName, ruleId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); } /** @@ -780,16 +779,13 @@ public void delete(String resourceGroupName, String workspaceName, String ruleId * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String ruleId) { + deleteWithResponse(resourceGroupName, workspaceName, ruleId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java index 4f4d06aa4fa96..02bf47b985216 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceN return Utils.mapPage(inner, inner1 -> new AlertRuleImpl(inner1, this.manager())); } - public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { - AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); - if (inner != null) { - return new AlertRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, Context context) { Response inner = @@ -62,9 +53,8 @@ public Response getWithResponse( } } - public AlertRule createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { + AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); if (inner != null) { return new AlertRuleImpl(inner, this.manager()); } else { @@ -89,8 +79,14 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + public AlertRule createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { + AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + if (inner != null) { + return new AlertRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -98,6 +94,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + } + private AlertRulesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java index 68b5fbf010892..77d195b3f3323 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java @@ -58,11 +58,10 @@ public final class AutomationRulesClientImpl implements AutomationRulesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAuto") - private interface AutomationRulesService { + public interface AutomationRulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -77,8 +76,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -94,8 +92,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -110,8 +107,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -264,14 +260,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { - return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** @@ -280,16 +278,14 @@ public AutomationRuleInner get(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { + return getWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } /** @@ -421,7 +417,6 @@ private Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -429,10 +424,8 @@ private Mono> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert) { + String resourceGroupName, String workspaceName, String automationRuleId) { + final AutomationRuleInner automationRuleToUpsert = null; return createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -444,18 +437,23 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - final AutomationRuleInner automationRuleToUpsert = null; + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) + .block(); } /** @@ -472,32 +470,9 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId) { final AutomationRuleInner automationRuleToUpsert = null; - return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).block(); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) - .block(); + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, Context.NONE) + .getValue(); } /** @@ -629,14 +604,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** @@ -645,16 +622,14 @@ public Object delete(String resourceGroupName, String workspaceName, String auto * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java index 90cf494caf3d7..4933ef8b33fcd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java @@ -28,15 +28,6 @@ public AutomationRulesImpl( this.serviceManager = serviceManager; } - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { - AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); - if (inner != null) { - return new AutomationRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { + AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); + if (inner != null) { + return new AutomationRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -61,6 +57,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java index 0e1ed907707da..39461ba6207ec 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java @@ -52,11 +52,10 @@ public final class BookmarkOperationsClientImpl implements BookmarkOperationsCli */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkOperationsService { + public interface BookmarkOperationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> expand( @@ -221,15 +220,20 @@ private Mono expandAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, bookmarkId, parameters).block(); + public Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context) { + return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); } /** @@ -239,19 +243,14 @@ public BookmarkExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); + public BookmarkExpandResponseInner expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { + return expandWithResponse(resourceGroupName, workspaceName, bookmarkId, parameters, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java index 40b134363e7c8..ed23df352e998 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java @@ -28,17 +28,6 @@ public BookmarkOperationsImpl( this.serviceManager = serviceManager; } - public BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - BookmarkExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); - if (inner != null) { - return new BookmarkExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response expandWithResponse( String resourceGroupName, String workspaceName, @@ -58,6 +47,17 @@ public Response expandWithResponse( } } + public BookmarkExpandResponse expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { + BookmarkExpandResponseInner inner = + this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); + if (inner != null) { + return new BookmarkExpandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private BookmarkOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java index f2f214d54a937..d16b526265dc8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java @@ -58,11 +58,10 @@ public final class BookmarkRelationsClientImpl implements BookmarkRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkRelationsService { + public interface BookmarkRelationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,9 +80,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,9 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -118,9 +113,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -581,14 +574,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. + * @return a bookmark relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); } /** @@ -598,16 +593,14 @@ public RelationInner get(String resourceGroupName, String workspaceName, String * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. + * @return a bookmark relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); + public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + return getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE).getValue(); } /** @@ -781,19 +774,23 @@ private Mono createOrUpdateAsync( * @param bookmarkId Bookmark ID. * @param relationName Relation Name. * @param relation The relation model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return represents a relation between two resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation).block(); + RelationInner relation, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) + .block(); } /** @@ -804,23 +801,21 @@ public RelationInner createOrUpdate( * @param bookmarkId Bookmark ID. * @param relationName Relation Name. * @param relation The relation model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public RelationInner createOrUpdate( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) - .block(); + RelationInner relation) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, bookmarkId, relationName, relation, Context.NONE) + .getValue(); } /** @@ -963,13 +958,16 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); } /** @@ -979,16 +977,13 @@ public void delete(String resourceGroupName, String workspaceName, String bookma * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java index 0c90dbec02922..33419aa718106 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java @@ -49,15 +49,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); } - public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { Response inner = @@ -73,8 +64,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); + public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); + if (inner != null) { + return new RelationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -84,6 +80,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); } + public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); + } + public Relation getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java index 4dc36ed754b44..542df442d89eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java @@ -58,11 +58,10 @@ public final class BookmarksClientImpl implements BookmarksClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarksService { + public interface BookmarksService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -76,8 +75,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -92,8 +90,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -109,8 +106,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -437,14 +433,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId) { - return getAsync(resourceGroupName, workspaceName, bookmarkId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); } /** @@ -453,16 +451,14 @@ public BookmarkInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); + public BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId) { + return getWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE).getValue(); } /** @@ -611,15 +607,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, bookmark).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark, context).block(); } /** @@ -629,16 +626,16 @@ public BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark, context).block(); + public BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, bookmarkId, bookmark, Context.NONE) + .getValue(); } /** @@ -767,13 +764,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); } /** @@ -782,16 +782,13 @@ public void delete(String resourceGroupName, String workspaceName, String bookma * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { + deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java index e87053fd58141..bee3f246130b9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceNa return Utils.mapPage(inner, inner1 -> new BookmarkImpl(inner1, this.manager())); } - public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { - BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); - if (inner != null) { - return new BookmarkImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { + BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); + if (inner != null) { + return new BookmarkImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, context); } + public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { + this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + } + public Bookmark getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsClientImpl.java new file mode 100644 index 0000000000000..417f9986484c7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsClientImpl.java @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.azure.resourcemanager.securityinsights.models.PackageInstallationProperties; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContentPackageOperationsClient. */ +public final class ContentPackageOperationsClientImpl implements ContentPackageOperationsClient { + /** The proxy service used to perform REST calls. */ + private final ContentPackageOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ContentPackageOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContentPackageOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create(ContentPackageOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsContentPackageOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsCont") + public interface ContentPackageOperationsService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentPackages/{packageId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> install( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("packageId") String packageId, + @BodyParam("application/json") PackageInstallationProperties packageInstallationProperties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentPackages/{packageId}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> uninstall( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("packageId") String packageId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> installWithResponseAsync( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + if (packageInstallationProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packageInstallationProperties is required and cannot be null.")); + } else { + packageInstallationProperties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .install( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + packageInstallationProperties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> installWithResponseAsync( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + if (packageInstallationProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter packageInstallationProperties is required and cannot be null.")); + } else { + packageInstallationProperties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .install( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + packageInstallationProperties, + accept, + context); + } + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installAsync( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties) { + return installWithResponseAsync(resourceGroupName, workspaceName, packageId, packageInstallationProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response installWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties, + Context context) { + return installWithResponseAsync( + resourceGroupName, workspaceName, packageId, packageInstallationProperties, context) + .block(); + } + + /** + * Install a package to the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param packageInstallationProperties Package installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a Package in Azure Security Insights. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageModelInner install( + String resourceGroupName, + String workspaceName, + String packageId, + PackageInstallationProperties packageInstallationProperties) { + return installWithResponse( + resourceGroupName, workspaceName, packageId, packageInstallationProperties, Context.NONE) + .getValue(); + } + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> uninstallWithResponseAsync( + String resourceGroupName, String workspaceName, String packageId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .uninstall( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> uninstallWithResponseAsync( + String resourceGroupName, String workspaceName, String packageId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .uninstall( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + accept, + context); + } + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono uninstallAsync(String resourceGroupName, String workspaceName, String packageId) { + return uninstallWithResponseAsync(resourceGroupName, workspaceName, packageId).flatMap(ignored -> Mono.empty()); + } + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response uninstallWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context) { + return uninstallWithResponseAsync(resourceGroupName, workspaceName, packageId, context).block(); + } + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void uninstall(String resourceGroupName, String workspaceName, String packageId) { + uninstallWithResponse(resourceGroupName, workspaceName, packageId, Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsImpl.java new file mode 100644 index 0000000000000..bf10dcdbb28c7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackageOperationsImpl.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.models.ContentPackageOperations; + +public final class ContentPackageOperationsImpl implements ContentPackageOperations { + private static final ClientLogger LOGGER = new ClientLogger(ContentPackageOperationsImpl.class); + + private final ContentPackageOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ContentPackageOperationsImpl( + ContentPackageOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response uninstallWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context) { + return this.serviceClient().uninstallWithResponse(resourceGroupName, workspaceName, packageId, context); + } + + public void uninstall(String resourceGroupName, String workspaceName, String packageId) { + this.serviceClient().uninstall(resourceGroupName, workspaceName, packageId); + } + + private ContentPackageOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public PackageModelImpl define(String name) { + return new PackageModelImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesClientImpl.java new file mode 100644 index 0000000000000..ad528b345e339 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesClientImpl.java @@ -0,0 +1,655 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackagesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.azure.resourcemanager.securityinsights.models.PackageList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContentPackagesClient. */ +public final class ContentPackagesClientImpl implements ContentPackagesClient { + /** The proxy service used to perform REST calls. */ + private final ContentPackagesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ContentPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContentPackagesClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(ContentPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsContentPackages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsCont") + public interface ContentPackagesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentPackages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentPackages/{packageId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @PathParam("packageId") String packageId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 installed packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 installed packages as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed packages as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed packages as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed packages as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); + } + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed packages as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); + } + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 installed packages by its id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + packageId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an installed packages by its id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + packageId, + accept, + context); + } + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 an installed packages by its id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String packageId) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return getWithResponseAsync(resourceGroupName, workspaceName, packageId, filter, orderby, top, skipToken) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an installed packages by its id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return getWithResponseAsync( + resourceGroupName, workspaceName, packageId, filter, orderby, top, skipToken, context) + .block(); + } + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 an installed packages by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageModelInner get(String resourceGroupName, String workspaceName, String packageId) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return getWithResponse( + resourceGroupName, workspaceName, packageId, filter, orderby, top, skipToken, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list available packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list available packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesImpl.java new file mode 100644 index 0000000000000..72e0ad486181f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentPackagesImpl.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackagesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.azure.resourcemanager.securityinsights.models.ContentPackages; +import com.azure.resourcemanager.securityinsights.models.PackageModel; + +public final class ContentPackagesImpl implements ContentPackages { + private static final ClientLogger LOGGER = new ClientLogger(ContentPackagesImpl.class); + + private final ContentPackagesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ContentPackagesImpl( + ContentPackagesClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PackageModelImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new PackageModelImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, workspaceName, packageId, filter, orderby, top, skipToken, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PackageModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PackageModel get(String resourceGroupName, String workspaceName, String packageId) { + PackageModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, packageId); + if (inner != null) { + return new PackageModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContentPackagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsClientImpl.java new file mode 100644 index 0000000000000..a82311e326794 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsClientImpl.java @@ -0,0 +1,616 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.TemplateInstallationProperties; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContentTemplateOperationsClient. */ +public final class ContentTemplateOperationsClientImpl implements ContentTemplateOperationsClient { + /** The proxy service used to perform REST calls. */ + private final ContentTemplateOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ContentTemplateOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContentTemplateOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + ContentTemplateOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsContentTemplateOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsCont") + public interface ContentTemplateOperationsService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentTemplates/{templateId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> install( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("templateId") String templateId, + @BodyParam("application/json") TemplateInstallationProperties templateInstallationProperties, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentTemplates/{templateId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("templateId") String templateId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentTemplates/{templateId}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("templateId") String templateId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return template resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> installWithResponseAsync( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + if (templateInstallationProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter templateInstallationProperties is required and cannot be null.")); + } else { + templateInstallationProperties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .install( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + templateInstallationProperties, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @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 template resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> installWithResponseAsync( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + if (templateInstallationProperties == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter templateInstallationProperties is required and cannot be null.")); + } else { + templateInstallationProperties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .install( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + templateInstallationProperties, + accept, + context); + } + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return template resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installAsync( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties) { + return installWithResponseAsync(resourceGroupName, workspaceName, templateId, templateInstallationProperties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @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 template resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response installWithResponse( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties, + Context context) { + return installWithResponseAsync( + resourceGroupName, workspaceName, templateId, templateInstallationProperties, context) + .block(); + } + + /** + * Install a template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param templateInstallationProperties Template installation properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return template resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TemplateModelAutoGeneratedInner install( + String resourceGroupName, + String workspaceName, + String templateId, + TemplateInstallationProperties templateInstallationProperties) { + return installWithResponse( + resourceGroupName, workspaceName, templateId, templateInstallationProperties, Context.NONE) + .getValue(); + } + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template byt its identifier along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template byt its identifier along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context); + } + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template byt its identifier on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String templateId) { + return getWithResponseAsync(resourceGroupName, workspaceName, templateId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template byt its identifier along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, templateId, context).block(); + } + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template byt its identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TemplateModelAutoGeneratedInner get(String resourceGroupName, String workspaceName, String templateId) { + return getWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE).getValue(); + } + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context); + } + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String templateId) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, templateId).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, templateId, context).block(); + } + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String templateId) { + deleteWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsImpl.java new file mode 100644 index 0000000000000..8b95aca41ee64 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplateOperationsImpl.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.ContentTemplateOperations; +import com.azure.resourcemanager.securityinsights.models.TemplateModelAutoGenerated; + +public final class ContentTemplateOperationsImpl implements ContentTemplateOperations { + private static final ClientLogger LOGGER = new ClientLogger(ContentTemplateOperationsImpl.class); + + private final ContentTemplateOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ContentTemplateOperationsImpl( + ContentTemplateOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, templateId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TemplateModelAutoGeneratedImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TemplateModelAutoGenerated get(String resourceGroupName, String workspaceName, String templateId) { + TemplateModelAutoGeneratedInner inner = this.serviceClient().get(resourceGroupName, workspaceName, templateId); + if (inner != null) { + return new TemplateModelAutoGeneratedImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, templateId, context); + } + + public void delete(String resourceGroupName, String workspaceName, String templateId) { + this.serviceClient().delete(resourceGroupName, workspaceName, templateId); + } + + public TemplateModelAutoGenerated getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String templateId = Utils.getValueFromIdByName(id, "contentTemplates"); + if (templateId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'contentTemplates'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String templateId = Utils.getValueFromIdByName(id, "contentTemplates"); + if (templateId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'contentTemplates'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, templateId, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String templateId = Utils.getValueFromIdByName(id, "contentTemplates"); + if (templateId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'contentTemplates'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String templateId = Utils.getValueFromIdByName(id, "contentTemplates"); + if (templateId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'contentTemplates'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, templateId, context); + } + + private ContentTemplateOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public TemplateModelAutoGeneratedImpl define(String name) { + return new TemplateModelAutoGeneratedImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesClientImpl.java new file mode 100644 index 0000000000000..b7135d1c521eb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesClientImpl.java @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.TemplateListAutoGenerated; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContentTemplatesClient. */ +public final class ContentTemplatesClientImpl implements ContentTemplatesClient { + /** The proxy service used to perform REST calls. */ + private final ContentTemplatesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ContentTemplatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContentTemplatesClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(ContentTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsContentTemplates to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsCont") + public interface ContentTemplatesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentTemplates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 installed templates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed templates along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 installed templates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed templates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed templates as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed templates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); + } + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed templates as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of all the template along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of all the template along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesImpl.java new file mode 100644 index 0000000000000..50130f93fc7f4 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ContentTemplatesImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.ContentTemplates; +import com.azure.resourcemanager.securityinsights.models.TemplateModelAutoGenerated; + +public final class ContentTemplatesImpl implements ContentTemplates { + private static final ClientLogger LOGGER = new ClientLogger(ContentTemplatesImpl.class); + + private final ContentTemplatesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ContentTemplatesImpl( + ContentTemplatesClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new TemplateModelAutoGeneratedImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new TemplateModelAutoGeneratedImpl(inner1, this.manager())); + } + + private ContentTemplatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java index b19d22164e896..cf5e6b6902495 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java @@ -60,11 +60,10 @@ public final class DataConnectorsCheckRequirementsOperationsClientImpl */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsCheckRequirementsOperationsService { + public interface DataConnectorsCheckRequirementsOperationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> post( @@ -225,17 +224,20 @@ private Mono postAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @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 requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorRequirementsStateInner post( + public Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements).block(); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context) { + return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) + .block(); } /** @@ -244,19 +246,17 @@ public DataConnectorRequirementsStateInner post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse( + public DataConnectorRequirementsStateInner post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) - .block(); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { + return postWithResponse(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, Context.NONE) + .getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java index 1c97eca6aff9c..1fd098ffe948d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java @@ -28,19 +28,6 @@ public DataConnectorsCheckRequirementsOperationsImpl( this.serviceManager = serviceManager; } - public DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - DataConnectorRequirementsStateInner inner = - this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); - if (inner != null) { - return new DataConnectorRequirementsStateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response postWithResponse( String resourceGroupName, String workspaceName, @@ -61,6 +48,19 @@ public Response postWithResponse( } } + public DataConnectorRequirementsState post( + String resourceGroupName, + String workspaceName, + DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { + DataConnectorRequirementsStateInner inner = + this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); + if (inner != null) { + return new DataConnectorRequirementsStateImpl(inner, this.manager()); + } else { + return null; + } + } + private DataConnectorsCheckRequirementsOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java index 1a58d841aa80c..f154c1bed5948 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java @@ -60,11 +60,10 @@ public final class DataConnectorsClientImpl implements DataConnectorsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsService { + public interface DataConnectorsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -78,8 +77,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -94,8 +92,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -111,8 +108,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -127,9 +123,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/connect") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/connect") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> connect( @@ -145,9 +139,7 @@ Mono> connect( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/disconnect") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/disconnect") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> disconnect( @@ -477,14 +469,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. + * @return a data connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId) { - return getAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -493,16 +487,14 @@ public DataConnectorInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector along with {@link Response}. + * @return a data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId) { + return getWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE).getValue(); } /** @@ -655,15 +647,22 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param dataConnector The data connector. + * @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 data connector. + * @return data connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataConnectorId, dataConnector).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String dataConnectorId, + DataConnectorInner dataConnector, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) + .block(); } /** @@ -673,22 +672,17 @@ public DataConnectorInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param dataConnector The data connector. - * @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 data connector along with {@link Response}. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) - .block(); + public DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, dataConnectorId, dataConnector, Context.NONE) + .getValue(); } /** @@ -820,13 +814,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - deleteAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -835,16 +832,13 @@ public void delete(String resourceGroupName, String workspaceName, String dataCo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE); } /** @@ -997,14 +991,21 @@ private Mono connectAsync( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param connectBody The data connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - connectAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody).block(); + public Response connectWithResponse( + String resourceGroupName, + String workspaceName, + String dataConnectorId, + DataConnectorConnectBody connectBody, + Context context) { + return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) + .block(); } /** @@ -1014,21 +1015,14 @@ public void connect( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param connectBody The data connector. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) - .block(); + public void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { + connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, Context.NONE); } /** @@ -1160,13 +1154,16 @@ private Mono disconnectAsync(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - disconnectAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response disconnectWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -1175,16 +1172,13 @@ public void disconnect(String resourceGroupName, String workspaceName, String da * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { + disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java index 33b8c30d12472..008475aab81fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new DataConnectorImpl(inner1, this.manager())); } - public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { - DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); - if (inner != null) { - return new DataConnectorImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { Response inner = @@ -63,10 +54,8 @@ public Response getWithResponse( } } - public DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - DataConnectorInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { + DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); if (inner != null) { return new DataConnectorImpl(inner, this.manager()); } else { @@ -95,8 +84,15 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); + public DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + DataConnectorInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + if (inner != null) { + return new DataConnectorImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,9 +100,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); } - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); } public Response connectWithResponse( @@ -120,8 +115,9 @@ public Response connectWithResponse( .connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, context); } - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); + public void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { + this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); } public Response disconnectWithResponse( @@ -129,6 +125,10 @@ public Response disconnectWithResponse( return this.serviceClient().disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); } + public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { + this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); + } + private DataConnectorsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java index 918c289e473c6..8dec8c3c131bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java @@ -50,11 +50,10 @@ public final class DomainWhoisClientImpl implements DomainWhoisClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsDoma") - private interface DomainWhoisService { + public interface DomainWhoisService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/domain/whois/") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/domain/whois/") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -182,14 +181,16 @@ private Mono getAsync(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. + * @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 whois information for a single domain name. + * @return whois information for a single domain name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { - return getAsync(resourceGroupName, domain).block(); + public Response getWithResponse( + String resourceGroupName, String domain, Context context) { + return getWithResponseAsync(resourceGroupName, domain, context).block(); } /** @@ -197,15 +198,13 @@ public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @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 whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domain, Context context) { - return getWithResponseAsync(resourceGroupName, domain, context).block(); + public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { + return getWithResponse(resourceGroupName, domain, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java index be9939f6abc01..0dc778c7e8e61 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java @@ -27,15 +27,6 @@ public DomainWhoisImpl( this.serviceManager = serviceManager; } - public EnrichmentDomainWhois get(String resourceGroupName, String domain) { - EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); - if (inner != null) { - return new EnrichmentDomainWhoisImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String domain, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, domain, context); @@ -50,6 +41,15 @@ public Response getWithResponse(String resourceGroupName, } } + public EnrichmentDomainWhois get(String resourceGroupName, String domain) { + EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); + if (inner != null) { + return new EnrichmentDomainWhoisImpl(inner, this.manager()); + } else { + return null; + } + } + private DomainWhoisClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java index f9c1c922a5b44..5379d694c3b96 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java @@ -36,6 +36,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; import com.azure.resourcemanager.securityinsights.models.EntityList; +import com.azure.resourcemanager.securityinsights.models.EntityManualTriggerRequestBody; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in EntitiesClient. */ @@ -62,11 +63,26 @@ public final class EntitiesClientImpl implements EntitiesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesService { + public interface EntitiesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityIdentifier}/runPlaybook") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> runPlaybook( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("entityIdentifier") String entityIdentifier, + @BodyParam("application/json") EntityManualTriggerRequestBody requestBody, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -80,8 +96,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -96,8 +111,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> expand( @@ -113,8 +127,7 @@ Mono> expand( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> queries( @@ -130,8 +143,7 @@ Mono> queries( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getInsights( @@ -156,6 +168,187 @@ Mono> listNext( Context context); } + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @param requestBody Describes the request body for triggering a playbook on an entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (entityIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter entityIdentifier is required and cannot be null.")); + } + if (requestBody != null) { + requestBody.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .runPlaybook( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + entityIdentifier, + requestBody, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @param requestBody Describes the request body for triggering a playbook on an entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (entityIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter entityIdentifier is required and cannot be null.")); + } + if (requestBody != null) { + requestBody.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .runPlaybook( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + entityIdentifier, + requestBody, + accept, + context); + } + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String entityIdentifier) { + final EntityManualTriggerRequestBody requestBody = null; + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, entityIdentifier, requestBody) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @param requestBody Describes the request body for triggering a playbook on an entity. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody, + Context context) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, entityIdentifier, requestBody, context) + .block(); + } + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void runPlaybook(String resourceGroupName, String workspaceName, String entityIdentifier) { + final EntityManualTriggerRequestBody requestBody = null; + runPlaybookWithResponse(resourceGroupName, workspaceName, entityIdentifier, requestBody, Context.NONE); + } + /** * Gets all entities. * @@ -459,14 +652,16 @@ private Mono getAsync(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. + * @return an entity along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { - return getAsync(resourceGroupName, workspaceName, entityId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); } /** @@ -475,16 +670,14 @@ public EntityInner get(String resourceGroupName, String workspaceName, String en * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. + * @return an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); + public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { + return getWithResponse(resourceGroupName, workspaceName, entityId, Context.NONE).getValue(); } /** @@ -637,15 +830,20 @@ private Mono expandAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an expand operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityExpandParameters parameters, + Context context) { + return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -655,20 +853,15 @@ public EntityExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityExpandResponseInner expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { + return expandWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } /** @@ -813,15 +1006,16 @@ private Mono queriesAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param kind The Kind parameter for queries. + * @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 insights and Activities for an entity. + * @return insights and Activities for an entity along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesAsync(resourceGroupName, workspaceName, entityId, kind).block(); + public Response queriesWithResponse( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { + return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); } /** @@ -831,16 +1025,15 @@ public GetQueriesResponseInner queries( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param kind The Kind parameter for queries. - * @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 insights and Activities for an entity along with {@link Response}. + * @return insights and Activities for an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); + public GetQueriesResponseInner queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { + return queriesWithResponse(resourceGroupName, workspaceName, entityId, kind, Context.NONE).getValue(); } /** @@ -993,15 +1186,20 @@ private Mono getInsightsAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute insights on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return the Get Insights result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response getInsightsWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityGetInsightsParameters parameters, + Context context) { + return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -1011,20 +1209,15 @@ public EntityGetInsightsResponseInner getInsights( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. + * @return the Get Insights result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityGetInsightsResponseInner getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { + return getInsightsWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java index f2cffddbe5666..63a3ed8ae1a2d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java @@ -53,11 +53,10 @@ public final class EntitiesGetTimelinesClientImpl implements EntitiesGetTimeline */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesGetTimelinesService { + public interface EntitiesGetTimelinesService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -222,15 +221,20 @@ private Mono listAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -240,19 +244,14 @@ public EntityTimelineResponseInner list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityTimelineResponseInner list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { + return listWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java index 79b119a109c9f..6105bb0e4cf56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java @@ -28,17 +28,6 @@ public EntitiesGetTimelinesImpl( this.serviceManager = serviceManager; } - public EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - EntityTimelineResponseInner inner = - this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityTimelineResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, @@ -58,6 +47,17 @@ public Response listWithResponse( } } + public EntityTimelineResponse list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { + EntityTimelineResponseInner inner = + this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); + if (inner != null) { + return new EntityTimelineResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private EntitiesGetTimelinesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java index 6ce063fd52fef..5064ad797e3e1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java @@ -21,6 +21,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; +import com.azure.resourcemanager.securityinsights.models.EntityManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; public final class EntitiesImpl implements Entities { @@ -36,6 +37,21 @@ public EntitiesImpl( this.serviceManager = serviceManager; } + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody, + Context context) { + return this + .serviceClient() + .runPlaybookWithResponse(resourceGroupName, workspaceName, entityIdentifier, requestBody, context); + } + + public void runPlaybook(String resourceGroupName, String workspaceName, String entityIdentifier) { + this.serviceClient().runPlaybook(resourceGroupName, workspaceName, entityIdentifier); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager())); @@ -46,15 +62,6 @@ public PagedIterable list(String resourceGroupName, String workspaceName return Utils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager())); } - public Entity get(String resourceGroupName, String workspaceName, String entityId) { - EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); - if (inner != null) { - return new EntityImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityId, Context context) { Response inner = @@ -70,12 +77,10 @@ public Response getWithResponse( } } - public EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - EntityExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); + public Entity get(String resourceGroupName, String workspaceName, String entityId) { + EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); if (inner != null) { - return new EntityExpandResponseImpl(inner, this.manager()); + return new EntityImpl(inner, this.manager()); } else { return null; } @@ -100,11 +105,12 @@ public Response expandWithResponse( } } - public GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); + public EntityExpandResponse expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { + EntityExpandResponseInner inner = + this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); if (inner != null) { - return new GetQueriesResponseImpl(inner, this.manager()); + return new EntityExpandResponseImpl(inner, this.manager()); } else { return null; } @@ -125,12 +131,11 @@ public Response queriesWithResponse( } } - public EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - EntityGetInsightsResponseInner inner = - this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); + public GetQueriesResponse queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { + GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); if (inner != null) { - return new EntityGetInsightsResponseImpl(inner, this.manager()); + return new GetQueriesResponseImpl(inner, this.manager()); } else { return null; } @@ -157,6 +162,17 @@ public Response getInsightsWithResponse( } } + public EntityGetInsightsResponse getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { + EntityGetInsightsResponseInner inner = + this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); + if (inner != null) { + return new EntityGetInsightsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private EntitiesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java index d1fbb7073274d..3e106a4f37991 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java @@ -55,11 +55,10 @@ public final class EntitiesRelationsClientImpl implements EntitiesRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesRelationsService { + public interface EntitiesRelationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java index cff5f927a8326..c2272690269ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java @@ -60,11 +60,10 @@ public final class EntityQueriesClientImpl implements EntityQueriesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueriesService { + public interface EntityQueriesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,8 +93,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -112,8 +109,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -471,14 +467,16 @@ private Mono getAsync(String resourceGroupName, String workspa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { - return getAsync(resourceGroupName, workspaceName, entityQueryId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); } /** @@ -487,16 +485,14 @@ public EntityQueryInner get(String resourceGroupName, String workspaceName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); + public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { + return getWithResponse(resourceGroupName, workspaceName, entityQueryId, Context.NONE).getValue(); } /** @@ -647,15 +643,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. * @param entityQuery The entity query we want to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return specific entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String entityQueryId, + CustomEntityQuery entityQuery, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) + .block(); } /** @@ -665,21 +667,16 @@ public EntityQueryInner createOrUpdate( * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. + * @return specific entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) - .block(); + public EntityQueryInner createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, entityQueryId, entityQuery, Context.NONE) + .getValue(); } /** @@ -809,13 +806,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - deleteAsync(resourceGroupName, workspaceName, entityQueryId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String entityQueryId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); } /** @@ -824,16 +824,13 @@ public void delete(String resourceGroupName, String workspaceName, String entity * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { + deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java index 66f6d4fb5322b..a321db1a93e5b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java @@ -42,15 +42,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); } - public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { - EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context) { Response inner = @@ -66,10 +57,8 @@ public Response getWithResponse( } } - public EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - EntityQueryInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); + public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { + EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); if (inner != null) { return new EntityQueryImpl(inner, this.manager()); } else { @@ -98,8 +87,15 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); + public EntityQuery createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { + EntityQueryInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); + if (inner != null) { + return new EntityQueryImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -107,6 +103,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, context); } + public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { + this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); + } + private EntityQueriesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java index e60bfb3413bf6..12690e0806d93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant99; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; import reactor.core.publisher.Mono; @@ -57,16 +57,15 @@ public final class EntityQueryTemplatesClientImpl implements EntityQueryTemplate */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueryTemplatesService { + public interface EntityQueryTemplatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, - @QueryParam("kind") Constant88 kind, + @QueryParam("kind") Constant99 kind, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -76,9 +75,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates" - + "/{entityQueryTemplateId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates/{entityQueryTemplateId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -115,7 +112,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { + String resourceGroupName, String workspaceName, Constant99 kind) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -175,7 +172,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant99 kind, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -231,7 +228,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { + String resourceGroupName, String workspaceName, Constant99 kind) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -249,7 +246,7 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; + final Constant99 kind = null; return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -269,7 +266,7 @@ private PagedFlux listAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant99 kind, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -287,7 +284,7 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; + final Constant99 kind = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); } @@ -305,7 +302,7 @@ public PagedIterable list(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant99 kind, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); } @@ -439,14 +436,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getAsync(resourceGroupName, workspaceName, entityQueryTemplateId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); } /** @@ -455,16 +454,14 @@ public EntityQueryTemplateInner get(String resourceGroupName, String workspaceNa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); + public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { + return getWithResponse(resourceGroupName, workspaceName, entityQueryTemplateId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java index 040dcb3be9b11..a775efb254468 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java @@ -11,7 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant99; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; @@ -35,22 +35,12 @@ public PagedIterable list(String resourceGroupName, String } public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant99 kind, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, kind, context); return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); } - public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - EntityQueryTemplateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); - if (inner != null) { - return new EntityQueryTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { Response inner = @@ -66,6 +56,16 @@ public Response getWithResponse( } } + public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { + EntityQueryTemplateInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); + if (inner != null) { + return new EntityQueryTemplateImpl(inner, this.manager()); + } else { + return null; + } + } + private EntityQueryTemplatesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java index a30ef2467eab2..2a783f75a4d58 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java @@ -50,12 +50,10 @@ public final class EntityRelationsClientImpl implements EntityRelationsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityRelationsService { + public interface EntityRelationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations/{relationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getRelation( @@ -210,15 +208,16 @@ private Mono getRelationAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner getRelation( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationAsync(resourceGroupName, workspaceName, entityId, relationName).block(); + public Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { + return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); } /** @@ -228,15 +227,15 @@ public RelationInner getRelation( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); + public RelationInner getRelation( + String resourceGroupName, String workspaceName, String entityId, String relationName) { + return getRelationWithResponse(resourceGroupName, workspaceName, entityId, relationName, Context.NONE) + .getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java index 6521f11e7b259..b392b56e76b47 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java @@ -27,16 +27,6 @@ public EntityRelationsImpl( this.serviceManager = serviceManager; } - public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { - RelationInner inner = - this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getRelationWithResponse( String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { Response inner = @@ -54,6 +44,16 @@ public Response getRelationWithResponse( } } + public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { + RelationInner inner = + this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); + if (inner != null) { + return new RelationImpl(inner, this.manager()); + } else { + return null; + } + } + private EntityRelationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java index 4b6a389586649..815b11dc9b4d7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java @@ -63,11 +63,10 @@ public final class FileImportsClientImpl implements FileImportsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsFile") - private interface FileImportsService { + public interface FileImportsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -85,8 +84,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -101,8 +99,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -118,8 +115,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -533,14 +529,16 @@ private Mono getAsync(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { - return getAsync(resourceGroupName, workspaceName, fileImportId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); } /** @@ -549,16 +547,14 @@ public FileImportInner get(String resourceGroupName, String workspaceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); + public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { + return getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE).getValue(); } /** @@ -711,15 +707,20 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. + * @return represents a file import in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createAsync(resourceGroupName, workspaceName, fileImportId, fileImport).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String fileImportId, + FileImportInner fileImport, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); } /** @@ -729,20 +730,15 @@ public FileImportInner create( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. + * @return represents a file import in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); + public FileImportInner create( + String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { + return createWithResponse(resourceGroupName, workspaceName, fileImportId, fileImport, Context.NONE).getValue(); } /** @@ -914,7 +910,7 @@ private PollerFlux, FileImportInner> beginDeleteAsyn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FileImportInner> beginDelete( String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); } /** @@ -932,7 +928,7 @@ public SyncPoller, FileImportInner> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FileImportInner> beginDelete( String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java index 05175bc230d31..89cfb4e4061b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java @@ -46,15 +46,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); } - public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String fileImportId, Context context) { Response inner = @@ -70,6 +61,15 @@ public Response getWithResponse( } } + public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { + FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); + if (inner != null) { + return new FileImportImpl(inner, this.manager()); + } else { + return null; + } + } + public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId) { FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId); if (inner != null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java new file mode 100644 index 0000000000000..04e87e9d18664 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GetRecommendationsClient. */ +public final class GetRecommendationsClientImpl implements GetRecommendationsClient { + /** The proxy service used to perform REST calls. */ + private final GetRecommendationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of GetRecommendationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GetRecommendationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(GetRecommendationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsGetRecommendations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsGetR") + public interface GetRecommendationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String workspaceName) { + return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java new file mode 100644 index 0000000000000..771ab53563a35 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import com.azure.resourcemanager.securityinsights.models.GetRecommendations; +import com.azure.resourcemanager.securityinsights.models.RecommendationList; + +public final class GetRecommendationsImpl implements GetRecommendations { + private static final ClientLogger LOGGER = new ClientLogger(GetRecommendationsImpl.class); + + private final GetRecommendationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public GetRecommendationsImpl( + GetRecommendationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RecommendationListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RecommendationList list(String resourceGroupName, String workspaceName) { + RecommendationListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new RecommendationListImpl(inner, this.manager()); + } else { + return null; + } + } + + private GetRecommendationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java new file mode 100644 index 0000000000000..6c3ac2d5ea6c5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.GetTriggeredAnalyticsRuleRunsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRuns; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GetTriggeredAnalyticsRuleRunsClient. */ +public final class GetTriggeredAnalyticsRuleRunsClientImpl implements GetTriggeredAnalyticsRuleRunsClient { + /** The proxy service used to perform REST calls. */ + private final GetTriggeredAnalyticsRuleRunsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of GetTriggeredAnalyticsRuleRunsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GetTriggeredAnalyticsRuleRunsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + GetTriggeredAnalyticsRuleRunsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsGetTriggeredAnalyticsRuleRuns to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsGetT") + public interface GetTriggeredAnalyticsRuleRunsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run array along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run array along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsImpl.java new file mode 100644 index 0000000000000..102f17b8b4867 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.GetTriggeredAnalyticsRuleRunsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.GetTriggeredAnalyticsRuleRuns; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRun; + +public final class GetTriggeredAnalyticsRuleRunsImpl implements GetTriggeredAnalyticsRuleRuns { + private static final ClientLogger LOGGER = new ClientLogger(GetTriggeredAnalyticsRuleRunsImpl.class); + + private final GetTriggeredAnalyticsRuleRunsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public GetTriggeredAnalyticsRuleRunsImpl( + GetTriggeredAnalyticsRuleRunsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new TriggeredAnalyticsRuleRunImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, context); + return Utils.mapPage(inner, inner1 -> new TriggeredAnalyticsRuleRunImpl(inner1, this.manager())); + } + + private GetTriggeredAnalyticsRuleRunsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsClientImpl.java new file mode 100644 index 0000000000000..2d9d8277515ca --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsClientImpl.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.GetsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import java.util.UUID; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GetsClient. */ +public final class GetsClientImpl implements GetsClient { + /** The proxy service used to perform REST calls. */ + private final GetsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of GetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GetsClientImpl(SecurityInsightsImpl client) { + this.service = RestProxy.create(GetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsGets to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsGets") + public interface GetsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> singleRecommendation( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("recommendationId") UUID recommendationId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation 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 a recommendation by its id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> singleRecommendationWithResponseAsync( + String resourceGroupName, String workspaceName, UUID recommendationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .singleRecommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> singleRecommendationWithResponseAsync( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .singleRecommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + accept, + context); + } + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation 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 a recommendation by its id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono singleRecommendationAsync( + String resourceGroupName, String workspaceName, UUID recommendationId) { + return singleRecommendationWithResponseAsync(resourceGroupName, workspaceName, recommendationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context) { + return singleRecommendationWithResponseAsync(resourceGroupName, workspaceName, recommendationId, context) + .block(); + } + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation 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 a recommendation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationInner singleRecommendation( + String resourceGroupName, String workspaceName, UUID recommendationId) { + return singleRecommendationWithResponse(resourceGroupName, workspaceName, recommendationId, Context.NONE) + .getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsImpl.java new file mode 100644 index 0000000000000..8ae458723e1e3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.GetsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.Gets; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import java.util.UUID; + +public final class GetsImpl implements Gets { + private static final ClientLogger LOGGER = new ClientLogger(GetsImpl.class); + + private final GetsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public GetsImpl( + GetsClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context) { + Response inner = + this + .serviceClient() + .singleRecommendationWithResponse(resourceGroupName, workspaceName, recommendationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RecommendationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Recommendation singleRecommendation(String resourceGroupName, String workspaceName, UUID recommendationId) { + RecommendationInner inner = + this.serviceClient().singleRecommendation(resourceGroupName, workspaceName, recommendationId); + if (inner != null) { + return new RecommendationImpl(inner, this.manager()); + } else { + return null; + } + } + + private GetsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java index 1cb3b8ebe779e..329c60163a9db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentImpl.java @@ -36,6 +36,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String message() { + return this.innerModel().message(); + } + public OffsetDateTime createdTimeUtc() { return this.innerModel().createdTimeUtc(); } @@ -44,10 +48,6 @@ public OffsetDateTime lastModifiedTimeUtc() { return this.innerModel().lastModifiedTimeUtc(); } - public String message() { - return this.innerModel().message(); - } - public ClientInfo author() { return this.innerModel().author(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java index 5c20f86fb9926..45b7afa353b03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java @@ -58,11 +58,10 @@ public final class IncidentCommentsClientImpl implements IncidentCommentsClient */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentCommentsService { + public interface IncidentCommentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,9 +80,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,9 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -118,9 +113,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments" - + "/{incidentCommentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/comments/{incidentCommentId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -584,15 +577,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - return getAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context).block(); } /** @@ -602,16 +596,16 @@ public IncidentCommentInner get( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context).block(); + public IncidentCommentInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE) + .getValue(); } /** @@ -788,19 +782,22 @@ private Mono createOrUpdateAsync( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. + * @return represents an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment) + IncidentCommentInner incidentComment, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, context) .block(); } @@ -812,23 +809,21 @@ public IncidentCommentInner createOrUpdate( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. + * @return represents an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public IncidentCommentInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, context) - .block(); + IncidentCommentInner incidentComment) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, Context.NONE) + .getValue(); } /** @@ -973,13 +968,17 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) + .block(); } /** @@ -989,17 +988,13 @@ public void delete(String resourceGroupName, String workspaceName, String incide * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE); } /** @@ -1010,7 +1005,7 @@ 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 list of incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1047,7 +1042,7 @@ private Mono> listNextSinglePageAsync(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 list of incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body 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/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java index 8092ca8833a54..61cc928437c56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java @@ -50,17 +50,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentCommentImpl(inner1, this.manager())); } - public IncidentComment get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - IncidentCommentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); - if (inner != null) { - return new IncidentCommentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { Response inner = @@ -78,8 +67,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + public IncidentComment get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + IncidentCommentInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); + if (inner != null) { + return new IncidentCommentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -89,6 +85,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); } + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + } + public IncidentComment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java index d9c3946392275..dfa37a882e47b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java @@ -21,7 +21,6 @@ import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; import com.azure.resourcemanager.securityinsights.models.IncidentStatus; import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -51,40 +50,36 @@ public SystemData systemData() { return this.innerModel().systemData(); } - public IncidentAdditionalData additionalData() { - return this.innerModel().additionalData(); - } - - public IncidentClassification classification() { - return this.innerModel().classification(); + public String title() { + return this.innerModel().title(); } - public String classificationComment() { - return this.innerModel().classificationComment(); + public String description() { + return this.innerModel().description(); } - public IncidentClassificationReason classificationReason() { - return this.innerModel().classificationReason(); + public IncidentSeverity severity() { + return this.innerModel().severity(); } - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); + public IncidentStatus status() { + return this.innerModel().status(); } - public String description() { - return this.innerModel().description(); + public IncidentClassification classification() { + return this.innerModel().classification(); } - public OffsetDateTime firstActivityTimeUtc() { - return this.innerModel().firstActivityTimeUtc(); + public IncidentClassificationReason classificationReason() { + return this.innerModel().classificationReason(); } - public String incidentUrl() { - return this.innerModel().incidentUrl(); + public String classificationComment() { + return this.innerModel().classificationComment(); } - public Integer incidentNumber() { - return this.innerModel().incidentNumber(); + public IncidentOwnerInfo owner() { + return this.innerModel().owner(); } public List labels() { @@ -96,12 +91,8 @@ public List labels() { } } - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); + public OffsetDateTime firstActivityTimeUtc() { + return this.innerModel().firstActivityTimeUtc(); } public OffsetDateTime lastActivityTimeUtc() { @@ -112,8 +103,16 @@ public OffsetDateTime lastModifiedTimeUtc() { return this.innerModel().lastModifiedTimeUtc(); } - public IncidentOwnerInfo owner() { - return this.innerModel().owner(); + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); + } + + public Integer incidentNumber() { + return this.innerModel().incidentNumber(); + } + + public IncidentAdditionalData additionalData() { + return this.innerModel().additionalData(); } public List relatedAnalyticRuleIds() { @@ -125,12 +124,16 @@ public List relatedAnalyticRuleIds() { } } - public IncidentSeverity severity() { - return this.innerModel().severity(); + public String incidentUrl() { + return this.innerModel().incidentUrl(); } - public IncidentStatus status() { - return this.innerModel().status(); + public String providerName() { + return this.innerModel().providerName(); + } + + public String providerIncidentId() { + return this.innerModel().providerIncidentId(); } public TeamInformation teamInformation() { @@ -142,10 +145,6 @@ public TeamInformation teamInformation() { } } - public String title() { - return this.innerModel().title(); - } - public String resourceGroupName() { return resourceGroupName; } @@ -251,26 +250,22 @@ public Incident refresh(Context context) { return this; } - public TeamInformation createTeam(TeamProperties teamProperties) { - return serviceManager.incidents().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - } - - public Response createTeamWithResponse(TeamProperties teamProperties, Context context) { + public Response createTeamWithResponse(TeamInformationInner teamProperties, Context context) { return serviceManager .incidents() .createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, context); } - public IncidentAlertList listAlerts() { - return serviceManager.incidents().listAlerts(resourceGroupName, workspaceName, incidentId); + public TeamInformation createTeam(TeamInformationInner teamProperties) { + return serviceManager.incidents().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); } public Response listAlertsWithResponse(Context context) { return serviceManager.incidents().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public IncidentBookmarkList listBookmarks() { - return serviceManager.incidents().listBookmarks(resourceGroupName, workspaceName, incidentId); + public IncidentAlertList listAlerts() { + return serviceManager.incidents().listAlerts(resourceGroupName, workspaceName, incidentId); } public Response listBookmarksWithResponse(Context context) { @@ -279,8 +274,8 @@ public Response listBookmarksWithResponse(Context context) .listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public IncidentEntitiesResponse listEntities() { - return serviceManager.incidents().listEntities(resourceGroupName, workspaceName, incidentId); + public IncidentBookmarkList listBookmarks() { + return serviceManager.incidents().listBookmarks(resourceGroupName, workspaceName, incidentId); } public Response listEntitiesWithResponse(Context context) { @@ -289,68 +284,72 @@ public Response listEntitiesWithResponse(Context conte .listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); } + public IncidentEntitiesResponse listEntities() { + return serviceManager.incidents().listEntities(resourceGroupName, workspaceName, incidentId); + } + public IncidentImpl withEtag(String etag) { this.innerModel().withEtag(etag); return this; } - public IncidentImpl withClassification(IncidentClassification classification) { - this.innerModel().withClassification(classification); + public IncidentImpl withTitle(String title) { + this.innerModel().withTitle(title); return this; } - public IncidentImpl withClassificationComment(String classificationComment) { - this.innerModel().withClassificationComment(classificationComment); + public IncidentImpl withDescription(String description) { + this.innerModel().withDescription(description); return this; } - public IncidentImpl withClassificationReason(IncidentClassificationReason classificationReason) { - this.innerModel().withClassificationReason(classificationReason); + public IncidentImpl withSeverity(IncidentSeverity severity) { + this.innerModel().withSeverity(severity); return this; } - public IncidentImpl withDescription(String description) { - this.innerModel().withDescription(description); + public IncidentImpl withStatus(IncidentStatus status) { + this.innerModel().withStatus(status); return this; } - public IncidentImpl withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.innerModel().withFirstActivityTimeUtc(firstActivityTimeUtc); + public IncidentImpl withClassification(IncidentClassification classification) { + this.innerModel().withClassification(classification); return this; } - public IncidentImpl withLabels(List labels) { - this.innerModel().withLabels(labels); + public IncidentImpl withClassificationReason(IncidentClassificationReason classificationReason) { + this.innerModel().withClassificationReason(classificationReason); return this; } - public IncidentImpl withProviderName(String providerName) { - this.innerModel().withProviderName(providerName); + public IncidentImpl withClassificationComment(String classificationComment) { + this.innerModel().withClassificationComment(classificationComment); return this; } - public IncidentImpl withProviderIncidentId(String providerIncidentId) { - this.innerModel().withProviderIncidentId(providerIncidentId); + public IncidentImpl withOwner(IncidentOwnerInfo owner) { + this.innerModel().withOwner(owner); return this; } - public IncidentImpl withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - this.innerModel().withLastActivityTimeUtc(lastActivityTimeUtc); + public IncidentImpl withLabels(List labels) { + this.innerModel().withLabels(labels); return this; } - public IncidentImpl withOwner(IncidentOwnerInfo owner) { - this.innerModel().withOwner(owner); + public IncidentImpl withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + this.innerModel().withFirstActivityTimeUtc(firstActivityTimeUtc); return this; } - public IncidentImpl withSeverity(IncidentSeverity severity) { - this.innerModel().withSeverity(severity); + public IncidentImpl withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { + this.innerModel().withLastActivityTimeUtc(lastActivityTimeUtc); return this; } - public IncidentImpl withStatus(IncidentStatus status) { - this.innerModel().withStatus(status); + public IncidentImpl withProviderName(String providerName) { + this.innerModel().withProviderName(providerName); return this; } @@ -358,9 +357,4 @@ public IncidentImpl withTeamInformation(TeamInformationInner teamInformation) { this.innerModel().withTeamInformation(teamInformation); return this; } - - public IncidentImpl withTitle(String title) { - this.innerModel().withTitle(title); - return this; - } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java index 408f9e893f0fb..1156f270ffe6f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java @@ -31,40 +31,36 @@ public final class IncidentPropertiesImpl implements IncidentProperties { this.serviceManager = serviceManager; } - public IncidentAdditionalData additionalData() { - return this.innerModel().additionalData(); - } - - public IncidentClassification classification() { - return this.innerModel().classification(); + public String title() { + return this.innerModel().title(); } - public String classificationComment() { - return this.innerModel().classificationComment(); + public String description() { + return this.innerModel().description(); } - public IncidentClassificationReason classificationReason() { - return this.innerModel().classificationReason(); + public IncidentSeverity severity() { + return this.innerModel().severity(); } - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); + public IncidentStatus status() { + return this.innerModel().status(); } - public String description() { - return this.innerModel().description(); + public IncidentClassification classification() { + return this.innerModel().classification(); } - public OffsetDateTime firstActivityTimeUtc() { - return this.innerModel().firstActivityTimeUtc(); + public IncidentClassificationReason classificationReason() { + return this.innerModel().classificationReason(); } - public String incidentUrl() { - return this.innerModel().incidentUrl(); + public String classificationComment() { + return this.innerModel().classificationComment(); } - public Integer incidentNumber() { - return this.innerModel().incidentNumber(); + public IncidentOwnerInfo owner() { + return this.innerModel().owner(); } public List labels() { @@ -76,12 +72,8 @@ public List labels() { } } - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); + public OffsetDateTime firstActivityTimeUtc() { + return this.innerModel().firstActivityTimeUtc(); } public OffsetDateTime lastActivityTimeUtc() { @@ -92,8 +84,16 @@ public OffsetDateTime lastModifiedTimeUtc() { return this.innerModel().lastModifiedTimeUtc(); } - public IncidentOwnerInfo owner() { - return this.innerModel().owner(); + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); + } + + public Integer incidentNumber() { + return this.innerModel().incidentNumber(); + } + + public IncidentAdditionalData additionalData() { + return this.innerModel().additionalData(); } public List relatedAnalyticRuleIds() { @@ -105,12 +105,16 @@ public List relatedAnalyticRuleIds() { } } - public IncidentSeverity severity() { - return this.innerModel().severity(); + public String incidentUrl() { + return this.innerModel().incidentUrl(); } - public IncidentStatus status() { - return this.innerModel().status(); + public String providerName() { + return this.innerModel().providerName(); + } + + public String providerIncidentId() { + return this.innerModel().providerIncidentId(); } public TeamInformation teamInformation() { @@ -122,10 +126,6 @@ public TeamInformation teamInformation() { } } - public String title() { - return this.innerModel().title(); - } - public IncidentPropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java index 2087692a0fbfe..482a26756686f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java @@ -58,11 +58,10 @@ public final class IncidentRelationsClientImpl implements IncidentRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentRelationsService { + public interface IncidentRelationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,9 +80,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,9 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -118,9 +113,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations" - + "/{relationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/relations/{relationName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -581,14 +574,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. + * @return an incident relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - return getAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); } /** @@ -598,16 +593,14 @@ public RelationInner get(String resourceGroupName, String workspaceName, String * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response}. + * @return an incident relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); + public RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE).getValue(); } /** @@ -781,19 +774,23 @@ private Mono createOrUpdateAsync( * @param incidentId Incident ID. * @param relationName Relation Name. * @param relation The relation model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return represents a relation between two resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, relationName, relation).block(); + RelationInner relation, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, relationName, relation, context) + .block(); } /** @@ -804,23 +801,21 @@ public RelationInner createOrUpdate( * @param incidentId Incident ID. * @param relationName Relation Name. * @param relation The relation model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public RelationInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, relationName, relation, context) - .block(); + RelationInner relation) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, relationName, relation, Context.NONE) + .getValue(); } /** @@ -963,13 +958,16 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); } /** @@ -979,16 +977,13 @@ public void delete(String resourceGroupName, String workspaceName, String incide * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java index ae14e641b851e..a2457b44bd2f9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java @@ -49,15 +49,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); } - public Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { Response inner = @@ -73,14 +64,8 @@ public Response getWithResponse( } } - public Relation createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - RelationInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, incidentId, relationName, relation); + public Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId, relationName); if (inner != null) { return new RelationImpl(inner, this.manager()); } else { @@ -111,8 +96,19 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, relationName); + public Relation createOrUpdate( + String resourceGroupName, + String workspaceName, + String incidentId, + String relationName, + RelationInner relation) { + RelationInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, incidentId, relationName, relation); + if (inner != null) { + return new RelationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -122,6 +118,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); } + public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, relationName); + } + private IncidentRelationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTaskImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTaskImpl.java new file mode 100644 index 0000000000000..4a8a98ea3f41f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTaskImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.azure.resourcemanager.securityinsights.models.ClientInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentTask; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; +import java.time.OffsetDateTime; + +public final class IncidentTaskImpl implements IncidentTask, IncidentTask.Definition, IncidentTask.Update { + private IncidentTaskInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String title() { + return this.innerModel().title(); + } + + public String description() { + return this.innerModel().description(); + } + + public IncidentTaskStatus status() { + return this.innerModel().status(); + } + + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); + } + + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerModel().lastModifiedTimeUtc(); + } + + public ClientInfo createdBy() { + return this.innerModel().createdBy(); + } + + public ClientInfo lastModifiedBy() { + return this.innerModel().lastModifiedBy(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public IncidentTaskInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String incidentId; + + private String incidentTaskId; + + public IncidentTaskImpl withExistingIncident(String resourceGroupName, String workspaceName, String incidentId) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.incidentId = incidentId; + return this; + } + + public IncidentTask create() { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentTaskId, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public IncidentTask create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentTaskId, this.innerModel(), context) + .getValue(); + return this; + } + + IncidentTaskImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = new IncidentTaskInner(); + this.serviceManager = serviceManager; + this.incidentTaskId = name; + } + + public IncidentTaskImpl update() { + return this; + } + + public IncidentTask apply() { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentTaskId, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public IncidentTask apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentTaskId, this.innerModel(), context) + .getValue(); + return this; + } + + IncidentTaskImpl( + IncidentTaskInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.incidentId = Utils.getValueFromIdByName(innerObject.id(), "incidents"); + this.incidentTaskId = Utils.getValueFromIdByName(innerObject.id(), "tasks"); + } + + public IncidentTask refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE) + .getValue(); + return this; + } + + public IncidentTask refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getIncidentTasks() + .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context) + .getValue(); + return this; + } + + public IncidentTaskImpl withTitle(String title) { + this.innerModel().withTitle(title); + return this; + } + + public IncidentTaskImpl withStatus(IncidentTaskStatus status) { + this.innerModel().withStatus(status); + return this; + } + + public IncidentTaskImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } + + public IncidentTaskImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public IncidentTaskImpl withCreatedBy(ClientInfo createdBy) { + this.innerModel().withCreatedBy(createdBy); + return this; + } + + public IncidentTaskImpl withLastModifiedBy(ClientInfo lastModifiedBy) { + this.innerModel().withLastModifiedBy(lastModifiedBy); + return this; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksClientImpl.java new file mode 100644 index 0000000000000..c23be3f4a4199 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksClientImpl.java @@ -0,0 +1,955 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.IncidentTasksClient; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in IncidentTasksClient. */ +public final class IncidentTasksClientImpl implements IncidentTasksClient { + /** The proxy service used to perform REST calls. */ + private final IncidentTasksService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of IncidentTasksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + IncidentTasksClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(IncidentTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsIncidentTasks to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsInci") + public interface IncidentTasksService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/tasks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("incidentId") String incidentId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/tasks/{incidentTaskId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("incidentId") String incidentId, + @PathParam("incidentTaskId") String incidentTaskId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/tasks/{incidentTaskId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("incidentId") String incidentId, + @PathParam("incidentTaskId") String incidentTaskId, + @BodyParam("application/json") IncidentTaskInner incidentTask, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/tasks/{incidentTaskId}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("incidentId") String incidentId, + @PathParam("incidentTaskId") String incidentTaskId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident tasks along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String incidentId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident tasks as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String incidentId) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, incidentId, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, incidentId)); + } + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, incidentId, context)); + } + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 an incident task along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + accept, + context); + } + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 an incident task on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentTaskId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentTaskId, context).block(); + } + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 an incident task. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IncidentTaskInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE).getValue(); + } + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + if (incidentTask == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTask is required and cannot be null.")); + } else { + incidentTask.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + incidentTask, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + if (incidentTask == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTask is required and cannot be null.")); + } else { + incidentTask.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + incidentTask, + accept, + context); + } + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, incidentTaskId, incidentTask) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, incidentTaskId, incidentTask, context) + .block(); + } + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IncidentTaskInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentTaskId, incidentTask, Context.NONE) + .getValue(); + } + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (incidentId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); + } + if (incidentTaskId == null) { + return Mono.error(new IllegalArgumentException("Parameter incidentTaskId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + incidentId, + incidentTaskId, + accept, + context); + } + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentTaskId) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentTaskId, context).block(); + } + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java new file mode 100644 index 0000000000000..4206f7e4f7fa8 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.IncidentTasksClient; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.azure.resourcemanager.securityinsights.models.IncidentTask; +import com.azure.resourcemanager.securityinsights.models.IncidentTasks; + +public final class IncidentTasksImpl implements IncidentTasks { + private static final ClientLogger LOGGER = new ClientLogger(IncidentTasksImpl.class); + + private final IncidentTasksClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public IncidentTasksImpl( + IncidentTasksClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, incidentId); + return Utils.mapPage(inner, inner1 -> new IncidentTaskImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, incidentId, context); + return Utils.mapPage(inner, inner1 -> new IncidentTaskImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IncidentTaskImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public IncidentTask get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + IncidentTaskInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentTaskId); + if (inner != null) { + return new IncidentTaskImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentTaskId); + } + + public IncidentTask getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + private IncidentTasksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public IncidentTaskImpl define(String name) { + return new IncidentTaskImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java index a07638efa7789..d9d355d92740b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java @@ -37,7 +37,6 @@ import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.IncidentList; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ @@ -65,12 +64,10 @@ public final class IncidentsClientImpl implements IncidentsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentsService { + public interface IncidentsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}" - + "/runPlaybook") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}/runPlaybook") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> runPlaybook( @@ -86,8 +83,7 @@ Mono> runPlaybook( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -105,8 +101,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -121,8 +116,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -138,8 +132,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -154,8 +147,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createTeam( @@ -165,14 +157,13 @@ Mono> createTeam( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("incidentId") String incidentId, - @BodyParam("application/json") TeamProperties teamProperties, + @BodyParam("application/json") TeamInformationInner teamProperties, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/alerts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/alerts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAlerts( @@ -187,8 +178,7 @@ Mono> listAlerts( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/bookmarks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/bookmarks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBookmarks( @@ -203,8 +193,7 @@ Mono> listBookmarks( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/entities") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/entities") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listEntities( @@ -357,18 +346,14 @@ private Mono> runPlaybookWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return any object on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody) { + private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { + final ManualTriggerRequestBody requestBody = null; return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -379,16 +364,22 @@ private Mono runPlaybookAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { - final ManualTriggerRequestBody requestBody = null; - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) + .block(); } /** @@ -405,31 +396,8 @@ private Mono runPlaybookAsync(String resourceGroupName, String workspace @ServiceMethod(returns = ReturnType.SINGLE) public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { final ManualTriggerRequestBody requestBody = null; - return runPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody).block(); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context) { - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) - .block(); + return runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, Context.NONE) + .getValue(); } /** @@ -822,14 +790,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. + * @return an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { - return getAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -838,16 +808,14 @@ public IncidentInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -860,8 +828,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -922,8 +889,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -980,7 +946,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -996,15 +962,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incident).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); } /** @@ -1014,16 +981,16 @@ public IncidentInner createOrUpdate( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); + public IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, incidentId, incident, Context.NONE) + .getValue(); } /** @@ -1152,13 +1119,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1167,16 +1137,13 @@ public void delete(String resourceGroupName, String workspaceName, String incide * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE); } /** @@ -1193,7 +1160,7 @@ public Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createTeamWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1257,7 +1224,7 @@ private Mono> createTeamWithResponseAsync( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1315,7 +1282,7 @@ private Mono> createTeamWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createTeamAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1327,15 +1294,21 @@ private Mono createTeamAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param teamProperties Team properties. + * @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 describes team information. + * @return describes team information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamAsync(resourceGroupName, workspaceName, incidentId, teamProperties).block(); + public Response createTeamWithResponse( + String resourceGroupName, + String workspaceName, + String incidentId, + TeamInformationInner teamProperties, + Context context) { + return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) + .block(); } /** @@ -1345,21 +1318,16 @@ public TeamInformationInner createTeam( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param teamProperties Team properties. - * @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 describes team information along with {@link Response}. + * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) - .block(); + public TeamInformationInner createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { + return createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, Context.NONE) + .getValue(); } /** @@ -1490,14 +1458,16 @@ private Mono listAlertsAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all incident alerts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - return listAlertsAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1506,16 +1476,14 @@ public IncidentAlertListInner listAlerts(String resourceGroupName, String worksp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all incident alerts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { + return listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -1646,14 +1614,16 @@ private Mono listBookmarksAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all incident bookmarks along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - return listBookmarksAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listBookmarksWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1662,16 +1632,14 @@ public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all incident bookmarks. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { + return listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -1802,15 +1770,16 @@ private Mono listEntitiesAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all incident related entities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentEntitiesResponseInner listEntities( - String resourceGroupName, String workspaceName, String incidentId) { - return listEntitiesAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listEntitiesWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1819,16 +1788,15 @@ public IncidentEntitiesResponseInner listEntities( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. + * @return all incident related entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentEntitiesResponseInner listEntities( + String resourceGroupName, String workspaceName, String incidentId) { + return listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java index a49e1a802a76c..d932926aa3e88 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java @@ -22,7 +22,6 @@ import com.azure.resourcemanager.securityinsights.models.Incidents; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; public final class IncidentsImpl implements Incidents { private static final ClientLogger LOGGER = new ClientLogger(IncidentsImpl.class); @@ -38,10 +37,6 @@ public IncidentsImpl( this.serviceManager = serviceManager; } - public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { - return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); - } - public Response runPlaybookWithResponse( String resourceGroupName, String workspaceName, @@ -53,6 +48,10 @@ public Response runPlaybookWithResponse( .runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context); } + public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { + return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); @@ -71,15 +70,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); } - public Incident get(String resourceGroupName, String workspaceName, String incidentId) { - IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context) { Response inner = @@ -95,8 +85,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); + public Incident get(String resourceGroupName, String workspaceName, String incidentId) { + IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); + if (inner != null) { + return new IncidentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,22 +99,15 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - TeamInformationInner inner = - this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); } public Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context) { Response inner = this @@ -136,10 +124,12 @@ public Response createTeamWithResponse( } } - public IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - IncidentAlertListInner inner = this.serviceClient().listAlerts(resourceGroupName, workspaceName, incidentId); + public TeamInformation createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { + TeamInformationInner inner = + this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); if (inner != null) { - return new IncidentAlertListImpl(inner, this.manager()); + return new TeamInformationImpl(inner, this.manager()); } else { return null; } @@ -160,11 +150,10 @@ public Response listAlertsWithResponse( } } - public IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - IncidentBookmarkListInner inner = - this.serviceClient().listBookmarks(resourceGroupName, workspaceName, incidentId); + public IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId) { + IncidentAlertListInner inner = this.serviceClient().listAlerts(resourceGroupName, workspaceName, incidentId); if (inner != null) { - return new IncidentBookmarkListImpl(inner, this.manager()); + return new IncidentAlertListImpl(inner, this.manager()); } else { return null; } @@ -185,11 +174,11 @@ public Response listBookmarksWithResponse( } } - public IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId) { - IncidentEntitiesResponseInner inner = - this.serviceClient().listEntities(resourceGroupName, workspaceName, incidentId); + public IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { + IncidentBookmarkListInner inner = + this.serviceClient().listBookmarks(resourceGroupName, workspaceName, incidentId); if (inner != null) { - return new IncidentEntitiesResponseImpl(inner, this.manager()); + return new IncidentBookmarkListImpl(inner, this.manager()); } else { return null; } @@ -210,6 +199,16 @@ public Response listEntitiesWithResponse( } } + public IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId) { + IncidentEntitiesResponseInner inner = + this.serviceClient().listEntities(resourceGroupName, workspaceName, incidentId); + if (inner != null) { + return new IncidentEntitiesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Incident getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java index cfcbc8e039f65..cd73fa54ff9ce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java @@ -50,11 +50,10 @@ public final class IpGeodatasClientImpl implements IpGeodatasClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsIpGe") - private interface IpGeodatasService { + public interface IpGeodatasService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/ip/geodata/") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -180,14 +179,16 @@ private Mono getAsync(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @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 geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { - return getAsync(resourceGroupName, ipAddress).block(); + public Response getWithResponse( + String resourceGroupName, String ipAddress, Context context) { + return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); } /** @@ -195,15 +196,13 @@ public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ipAddress, Context context) { - return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); + public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { + return getWithResponse(resourceGroupName, ipAddress, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java index 7afbd00545ef2..0a8c91b333606 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java @@ -27,15 +27,6 @@ public IpGeodatasImpl( this.serviceManager = serviceManager; } - public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { - EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); - if (inner != null) { - return new EnrichmentIpGeodataImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String ipAddress, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, ipAddress, context); @@ -50,6 +41,15 @@ public Response getWithResponse(String resourceGroupName, S } } + public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { + EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); + if (inner != null) { + return new EnrichmentIpGeodataImpl(inner, this.manager()); + } else { + return null; + } + } + private IpGeodatasClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java index 268664bb18db8..01a01319fe168 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java @@ -7,10 +7,9 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataModel; import com.azure.resourcemanager.securityinsights.models.MetadataPatch; import com.azure.resourcemanager.securityinsights.models.MetadataSource; @@ -56,7 +55,7 @@ public String version() { return this.innerModel().version(); } - public Kind kind() { + public String kind() { return this.innerModel().kind(); } @@ -72,7 +71,7 @@ public MetadataSupport support() { return this.innerModel().support(); } - public MetadataDependencies dependencies() { + public MetadataDependenciesAutoGenerated dependencies() { return this.innerModel().dependencies(); } @@ -292,7 +291,7 @@ public MetadataModelImpl withVersion(String version) { } } - public MetadataModelImpl withKind(Kind kind) { + public MetadataModelImpl withKind(String kind) { if (isInCreateMode()) { this.innerModel().withKind(kind); return this; @@ -332,7 +331,7 @@ public MetadataModelImpl withSupport(MetadataSupport support) { } } - public MetadataModelImpl withDependencies(MetadataDependencies dependencies) { + public MetadataModelImpl withDependencies(MetadataDependenciesAutoGenerated dependencies) { if (isInCreateMode()) { this.innerModel().withDependencies(dependencies); return this; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java index c99b2cc76eaf1..7b7fdbc8a4e87 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java @@ -60,11 +60,10 @@ public final class MetadatasClientImpl implements MetadatasClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsMeta") - private interface MetadatasService { + public interface MetadatasService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -82,8 +81,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -98,8 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -114,8 +111,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -131,8 +127,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -541,14 +536,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. + * @return a Metadata along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { - return getAsync(resourceGroupName, workspaceName, metadataName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); } /** @@ -557,16 +554,14 @@ public MetadataModelInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. + * @return a Metadata. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); + public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { + return getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE).getValue(); } /** @@ -695,13 +690,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - deleteAsync(resourceGroupName, workspaceName, metadataName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); } /** @@ -710,16 +708,13 @@ public void delete(String resourceGroupName, String workspaceName, String metada * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String metadataName) { + deleteWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE); } /** @@ -870,15 +865,20 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadata Metadata resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. + * @return metadata resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createAsync(resourceGroupName, workspaceName, metadataName, metadata).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String metadataName, + MetadataModelInner metadata, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); } /** @@ -888,20 +888,15 @@ public MetadataModelInner create( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadata Metadata resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. + * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); + public MetadataModelInner create( + String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { + return createWithResponse(resourceGroupName, workspaceName, metadataName, metadata, Context.NONE).getValue(); } /** @@ -1052,15 +1047,20 @@ private Mono updateAsync( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadataPatch Partial metadata request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. + * @return metadata resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateAsync(resourceGroupName, workspaceName, metadataName, metadataPatch).block(); + public Response updateWithResponse( + String resourceGroupName, + String workspaceName, + String metadataName, + MetadataPatch metadataPatch, + Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); } /** @@ -1070,20 +1070,16 @@ public MetadataModelInner update( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. + * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); + public MetadataModelInner update( + String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { + return updateWithResponse(resourceGroupName, workspaceName, metadataName, metadataPatch, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java index fb795703dad24..3cc27196f79a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java @@ -46,15 +46,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); } - public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { - MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); - if (inner != null) { - return new MetadataModelImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context) { Response inner = @@ -70,8 +61,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); + public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { + MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); + if (inner != null) { + return new MetadataModelImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -79,6 +75,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); } + public void delete(String resourceGroupName, String workspaceName, String metadataName) { + this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); + } + public MetadataModel getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java index fd9d8a21ca81d..ca67bb31acb21 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java @@ -56,11 +56,10 @@ public final class OfficeConsentsClientImpl implements OfficeConsentsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsOffi") - private interface OfficeConsentsService { + public interface OfficeConsentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -74,8 +73,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -90,8 +88,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -419,14 +416,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { - return getAsync(resourceGroupName, workspaceName, consentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); } /** @@ -435,16 +434,14 @@ public OfficeConsentInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); + public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { + return getWithResponse(resourceGroupName, workspaceName, consentId, Context.NONE).getValue(); } /** @@ -573,13 +570,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String consentId) { - deleteAsync(resourceGroupName, workspaceName, consentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); } /** @@ -588,16 +588,13 @@ public void delete(String resourceGroupName, String workspaceName, String consen * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String consentId) { + deleteWithResponse(resourceGroupName, workspaceName, consentId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java index 3f6213360a58d..7bc64bd42e962 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new OfficeConsentImpl(inner1, this.manager())); } - public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { - OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); - if (inner != null) { - return new OfficeConsentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String consentId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String consentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, consentId); + public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { + OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); + if (inner != null) { + return new OfficeConsentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, consentId, context); } + public void delete(String resourceGroupName, String workspaceName, String consentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, consentId); + } + private OfficeConsentsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java index 42c9980bb42d5..bb5c8b75a44d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsOper") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.SecurityInsights/operations") @ExpectedResponses({200}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelAutoGeneratedImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelAutoGeneratedImpl.java new file mode 100644 index 0000000000000..d88e3dadd5cce --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelAutoGeneratedImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.PackageModelAutoGenerated; +import java.time.LocalDate; +import java.util.Collections; +import java.util.List; + +public final class PackageModelAutoGeneratedImpl implements PackageModelAutoGenerated { + private PackageModelAutoGeneratedInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + PackageModelAutoGeneratedImpl( + PackageModelAutoGeneratedInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String packageId() { + return this.innerModel().packageId(); + } + + public PackageKind packageKind() { + return this.innerModel().packageKind(); + } + + public String installedVersion() { + return this.innerModel().installedVersion(); + } + + public String contentSchemaVersion() { + return this.innerModel().contentSchemaVersion(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public Flag isNew() { + return this.innerModel().isNew(); + } + + public Flag isPreview() { + return this.innerModel().isPreview(); + } + + public Flag isFeatured() { + return this.innerModel().isFeatured(); + } + + public String version() { + return this.innerModel().version(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String description() { + return this.innerModel().description(); + } + + public String publisherDisplayName() { + return this.innerModel().publisherDisplayName(); + } + + public MetadataSource source() { + return this.innerModel().source(); + } + + public MetadataAuthor author() { + return this.innerModel().author(); + } + + public MetadataSupport support() { + return this.innerModel().support(); + } + + public MetadataDependencies dependencies() { + return this.innerModel().dependencies(); + } + + public List providers() { + List inner = this.innerModel().providers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LocalDate firstPublishDate() { + return this.innerModel().firstPublishDate(); + } + + public LocalDate lastPublishDate() { + return this.innerModel().lastPublishDate(); + } + + public MetadataCategories categories() { + return this.innerModel().categories(); + } + + public List threatAnalysisTactics() { + List inner = this.innerModel().threatAnalysisTactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threatAnalyticsTechniques() { + List inner = this.innerModel().threatAnalyticsTechniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String icon() { + return this.innerModel().icon(); + } + + public Object packagedContent() { + return this.innerModel().packagedContent(); + } + + public PackageModelAutoGeneratedInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelImpl.java new file mode 100644 index 0000000000000..4c97ce630c6a7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/PackageModelImpl.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.azure.resourcemanager.securityinsights.models.Flag; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageInstallationProperties; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.PackageModel; +import com.azure.resourcemanager.securityinsights.models.PackageProperties; +import java.time.LocalDate; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PackageModelImpl implements PackageModel, PackageModel.Definition, PackageModel.Update { + private PackageModelInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String packageId() { + return this.innerModel().packageId(); + } + + public PackageKind packageKind() { + return this.innerModel().packageKind(); + } + + public String contentSchemaVersion() { + return this.innerModel().contentSchemaVersion(); + } + + public Flag isNew() { + return this.innerModel().isNew(); + } + + public Flag isPreview() { + return this.innerModel().isPreview(); + } + + public Flag isFeatured() { + return this.innerModel().isFeatured(); + } + + public String version() { + return this.innerModel().version(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String description() { + return this.innerModel().description(); + } + + public String publisherDisplayName() { + return this.innerModel().publisherDisplayName(); + } + + public MetadataSource source() { + return this.innerModel().source(); + } + + public MetadataAuthor author() { + return this.innerModel().author(); + } + + public MetadataSupport support() { + return this.innerModel().support(); + } + + public MetadataDependencies dependencies() { + return this.innerModel().dependencies(); + } + + public List providers() { + List inner = this.innerModel().providers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LocalDate firstPublishDate() { + return this.innerModel().firstPublishDate(); + } + + public LocalDate lastPublishDate() { + return this.innerModel().lastPublishDate(); + } + + public MetadataCategories categories() { + return this.innerModel().categories(); + } + + public List threatAnalysisTactics() { + List inner = this.innerModel().threatAnalysisTactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threatAnalyticsTechniques() { + List inner = this.innerModel().threatAnalyticsTechniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String icon() { + return this.innerModel().icon(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PackageModelInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String packageId; + + private PackageInstallationProperties createPackageInstallationProperties; + + private PackageInstallationProperties updatePackageInstallationProperties; + + public PackageModelImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public PackageModel create() { + this.innerObject = + serviceManager + .serviceClient() + .getContentPackageOperations() + .installWithResponse( + resourceGroupName, workspaceName, packageId, createPackageInstallationProperties, Context.NONE) + .getValue(); + return this; + } + + public PackageModel create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContentPackageOperations() + .installWithResponse( + resourceGroupName, workspaceName, packageId, createPackageInstallationProperties, context) + .getValue(); + return this; + } + + PackageModelImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = new PackageModelInner(); + this.serviceManager = serviceManager; + this.packageId = name; + this.createPackageInstallationProperties = new PackageInstallationProperties(); + } + + public PackageModelImpl update() { + this.updatePackageInstallationProperties = new PackageInstallationProperties(); + return this; + } + + public PackageModel apply() { + this.innerObject = + serviceManager + .serviceClient() + .getContentPackageOperations() + .installWithResponse( + resourceGroupName, workspaceName, packageId, updatePackageInstallationProperties, Context.NONE) + .getValue(); + return this; + } + + public PackageModel apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContentPackageOperations() + .installWithResponse( + resourceGroupName, workspaceName, packageId, updatePackageInstallationProperties, context) + .getValue(); + return this; + } + + PackageModelImpl( + PackageModelInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.packageId = Utils.getValueFromIdByName(innerObject.id(), "contentPackages"); + } + + public PackageModelImpl withTags(Map tags) { + if (isInCreateMode()) { + this.createPackageInstallationProperties.withTags(tags); + return this; + } else { + this.updatePackageInstallationProperties.withTags(tags); + return this; + } + } + + public PackageModelImpl withProperties(PackageProperties properties) { + if (isInCreateMode()) { + this.createPackageInstallationProperties.withProperties(properties); + return this; + } else { + this.updatePackageInstallationProperties.withProperties(properties); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsClientImpl.java new file mode 100644 index 0000000000000..283feddd95395 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsClientImpl.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ProductPackageOperationsClient. */ +public final class ProductPackageOperationsClientImpl implements ProductPackageOperationsClient { + /** The proxy service used to perform REST calls. */ + private final ProductPackageOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ProductPackageOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProductPackageOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create(ProductPackageOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsProductPackageOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsProd") + public interface ProductPackageOperationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentProductPackages/{packageId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("packageId") String packageId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 a package by its identifier from the catalog along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String packageId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a package by its identifier from the catalog along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String packageId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (packageId == null) { + return Mono.error(new IllegalArgumentException("Parameter packageId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + packageId, + accept, + context); + } + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 a package by its identifier from the catalog on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String packageId) { + return getWithResponseAsync(resourceGroupName, workspaceName, packageId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a package by its identifier from the catalog along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, packageId, context).block(); + } + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 a package by its identifier from the catalog. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageModelAutoGeneratedInner get(String resourceGroupName, String workspaceName, String packageId) { + return getWithResponse(resourceGroupName, workspaceName, packageId, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsImpl.java new file mode 100644 index 0000000000000..f5b0dab42e55c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackageOperationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.PackageModelAutoGenerated; +import com.azure.resourcemanager.securityinsights.models.ProductPackageOperations; + +public final class ProductPackageOperationsImpl implements ProductPackageOperations { + private static final ClientLogger LOGGER = new ClientLogger(ProductPackageOperationsImpl.class); + + private final ProductPackageOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ProductPackageOperationsImpl( + ProductPackageOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, packageId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PackageModelAutoGeneratedImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PackageModelAutoGenerated get(String resourceGroupName, String workspaceName, String packageId) { + PackageModelAutoGeneratedInner inner = this.serviceClient().get(resourceGroupName, workspaceName, packageId); + if (inner != null) { + return new PackageModelAutoGeneratedImpl(inner, this.manager()); + } else { + return null; + } + } + + private ProductPackageOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesClientImpl.java new file mode 100644 index 0000000000000..075e491699959 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesClientImpl.java @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackagesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.PackageListAutoGenerated; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ProductPackagesClient. */ +public final class ProductPackagesClientImpl implements ProductPackagesClient { + /** The proxy service used to perform REST calls. */ + private final ProductPackagesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ProductPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProductPackagesClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(ProductPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsProductPackages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsProd") + public interface ProductPackagesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentProductPackages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 packages from the catalog along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all packages from the catalog along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 packages from the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all packages from the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all packages from the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all packages from the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); + } + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all packages from the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list available packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list available packages along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesImpl.java new file mode 100644 index 0000000000000..72fb462b1abc8 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductPackagesImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackagesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.models.PackageModelAutoGenerated; +import com.azure.resourcemanager.securityinsights.models.ProductPackages; + +public final class ProductPackagesImpl implements ProductPackages { + private static final ClientLogger LOGGER = new ClientLogger(ProductPackagesImpl.class); + + private final ProductPackagesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ProductPackagesImpl( + ProductPackagesClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new PackageModelAutoGeneratedImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new PackageModelAutoGeneratedImpl(inner1, this.manager())); + } + + private ProductPackagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java index 5a8f6c3d0f229..a97cb094f81bc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java @@ -54,11 +54,10 @@ public final class ProductSettingsClientImpl implements ProductSettingsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsProd") - private interface ProductSettingsService { + public interface ProductSettingsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -72,8 +71,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -88,8 +86,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -104,8 +101,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -233,14 +229,16 @@ private Mono listAsync(String resourceGroupName, String worksp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. + * @return list of all the settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -248,16 +246,14 @@ public SettingListInner list(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. + * @return list of all the settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SettingListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -387,14 +383,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. + * @return a setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { - return getAsync(resourceGroupName, workspaceName, settingsName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); } /** @@ -403,16 +401,14 @@ public SettingsInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. + * @return a setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); + public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { + return getWithResponse(resourceGroupName, workspaceName, settingsName, Context.NONE).getValue(); } /** @@ -541,13 +537,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - deleteAsync(resourceGroupName, workspaceName, settingsName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); } /** @@ -556,16 +555,13 @@ public void delete(String resourceGroupName, String workspaceName, String settin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String settingsName) { + deleteWithResponse(resourceGroupName, workspaceName, settingsName, Context.NONE); } /** @@ -712,15 +708,16 @@ private Mono updateAsync( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. + * @return the Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateAsync(resourceGroupName, workspaceName, settingsName, settings).block(); + public Response updateWithResponse( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); } /** @@ -730,15 +727,14 @@ public SettingsInner update( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. + * @return the Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); + public SettingsInner update( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { + return updateWithResponse(resourceGroupName, workspaceName, settingsName, settings, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java index 5596bd0f4aa9a..7f8993cab1380 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java @@ -29,15 +29,6 @@ public ProductSettingsImpl( this.serviceManager = serviceManager; } - public SettingList list(String resourceGroupName, String workspaceName) { - SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SettingListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse(String resourceGroupName, String workspaceName, Context context) { Response inner = this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); @@ -52,10 +43,10 @@ public Response listWithResponse(String resourceGroupName, String w } } - public Settings get(String resourceGroupName, String workspaceName, String settingsName) { - SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); + public SettingList list(String resourceGroupName, String workspaceName) { + SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); if (inner != null) { - return new SettingsImpl(inner, this.manager()); + return new SettingListImpl(inner, this.manager()); } else { return null; } @@ -76,8 +67,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); + public Settings get(String resourceGroupName, String workspaceName, String settingsName) { + SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -85,14 +81,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsName, context); } - public Settings update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String settingsName) { + this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); } public Response updateWithResponse( @@ -110,6 +100,16 @@ public Response updateWithResponse( } } + public Settings update( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { + SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } + } + private ProductSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsClientImpl.java new file mode 100644 index 0000000000000..4bdf081fd6dcb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsClientImpl.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ProductTemplateOperationsClient. */ +public final class ProductTemplateOperationsClientImpl implements ProductTemplateOperationsClient { + /** The proxy service used to perform REST calls. */ + private final ProductTemplateOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ProductTemplateOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProductTemplateOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + ProductTemplateOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsProductTemplateOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsProd") + public interface ProductTemplateOperationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentproducttemplates/{templateId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("templateId") String templateId, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template by its identifier along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template by its identifier along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String templateId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (templateId == null) { + return Mono.error(new IllegalArgumentException("Parameter templateId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + templateId, + accept, + context); + } + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template by its identifier on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String templateId) { + return getWithResponseAsync(resourceGroupName, workspaceName, templateId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template by its identifier along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, templateId, context).block(); + } + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template by its identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TemplateModelInner get(String resourceGroupName, String workspaceName, String templateId) { + return getWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsImpl.java new file mode 100644 index 0000000000000..a6ceee49e4d04 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplateOperationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import com.azure.resourcemanager.securityinsights.models.ProductTemplateOperations; +import com.azure.resourcemanager.securityinsights.models.TemplateModel; + +public final class ProductTemplateOperationsImpl implements ProductTemplateOperations { + private static final ClientLogger LOGGER = new ClientLogger(ProductTemplateOperationsImpl.class); + + private final ProductTemplateOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ProductTemplateOperationsImpl( + ProductTemplateOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, templateId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TemplateModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TemplateModel get(String resourceGroupName, String workspaceName, String templateId) { + TemplateModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, templateId); + if (inner != null) { + return new TemplateModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private ProductTemplateOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesClientImpl.java new file mode 100644 index 0000000000000..ed83adf921b65 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesClientImpl.java @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import com.azure.resourcemanager.securityinsights.models.TemplateList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ProductTemplatesClient. */ +public final class ProductTemplatesClientImpl implements ProductTemplatesClient { + /** The proxy service used to perform REST calls. */ + private final ProductTemplatesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of ProductTemplatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProductTemplatesClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(ProductTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsProductTemplates to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsProd") + public interface ProductTemplatesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentProductTemplates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$filter") String filter, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 templates in the catalog along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all templates in the catalog along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + filter, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 templates in the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all templates in the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all templates in the catalog as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all templates in the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String filter = null; + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); + } + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all templates in the catalog as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of all the template along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of all the template along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesImpl.java new file mode 100644 index 0000000000000..335d41744893a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductTemplatesImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import com.azure.resourcemanager.securityinsights.models.ProductTemplates; +import com.azure.resourcemanager.securityinsights.models.TemplateModel; + +public final class ProductTemplatesImpl implements ProductTemplates { + private static final ClientLogger LOGGER = new ClientLogger(ProductTemplatesImpl.class); + + private final ProductTemplatesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public ProductTemplatesImpl( + ProductTemplatesClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new TemplateModelImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new TemplateModelImpl(inner1, this.manager())); + } + + private ProductTemplatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java new file mode 100644 index 0000000000000..ec7e368239e02 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.Category; +import com.azure.resourcemanager.securityinsights.models.Content; +import com.azure.resourcemanager.securityinsights.models.Context; +import com.azure.resourcemanager.securityinsights.models.Instructions; +import com.azure.resourcemanager.securityinsights.models.Priority; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendedAction; +import com.azure.resourcemanager.securityinsights.models.State; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public final class RecommendationImpl implements Recommendation { + private RecommendationInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + RecommendationImpl( + RecommendationInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public UUID id() { + return this.innerModel().id(); + } + + public Instructions instructions() { + return this.innerModel().instructions(); + } + + public Content content() { + return this.innerModel().content(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public Map additionalProperties() { + Map inner = this.innerModel().additionalProperties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String title() { + return this.innerModel().title(); + } + + public String description() { + return this.innerModel().description(); + } + + public String recommendationTypeTitle() { + return this.innerModel().recommendationTypeTitle(); + } + + public String recommendationTypeId() { + return this.innerModel().recommendationTypeId(); + } + + public Category category() { + return this.innerModel().category(); + } + + public Context context() { + return this.innerModel().context(); + } + + public UUID workspaceId() { + return this.innerModel().workspaceId(); + } + + public List actions() { + List inner = this.innerModel().actions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public State state() { + return this.innerModel().state(); + } + + public Priority priority() { + return this.innerModel().priority(); + } + + public OffsetDateTime lastEvaluatedTimeUtc() { + return this.innerModel().lastEvaluatedTimeUtc(); + } + + public OffsetDateTime hideUntilTimeUtc() { + return this.innerModel().hideUntilTimeUtc(); + } + + public OffsetDateTime displayUntilTimeUtc() { + return this.innerModel().displayUntilTimeUtc(); + } + + public Boolean visible() { + return this.innerModel().visible(); + } + + public RecommendationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java new file mode 100644 index 0000000000000..cb87d379992fb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendationList; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class RecommendationListImpl implements RecommendationList { + private RecommendationListInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + RecommendationListImpl( + RecommendationListInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new RecommendationImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public RecommendationListInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java index 86963e3bc62a9..800a425d022aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java @@ -23,12 +23,17 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.ContentPackagesClient; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.ContentTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; @@ -39,14 +44,22 @@ import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetTriggeredAnalyticsRuleRunsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; +import com.azure.resourcemanager.securityinsights.fluent.IncidentTasksClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackageOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.ProductPackagesClient; import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplateOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.ProductTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; import com.azure.resourcemanager.securityinsights.fluent.SecurityMLAnalyticsSettingsClient; import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; @@ -55,8 +68,12 @@ import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerConfigurationsClient; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerMembersClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -189,6 +206,18 @@ public AutomationRulesClient getAutomationRules() { return this.automationRules; } + /** The EntitiesClient object to access its operations. */ + private final EntitiesClient entities; + + /** + * Gets the EntitiesClient object to access its operations. + * + * @return the EntitiesClient object. + */ + public EntitiesClient getEntities() { + return this.entities; + } + /** The IncidentsClient object to access its operations. */ private final IncidentsClient incidents; @@ -237,6 +266,102 @@ public BookmarkOperationsClient getBookmarkOperations() { return this.bookmarkOperations; } + /** The ContentPackagesClient object to access its operations. */ + private final ContentPackagesClient contentPackages; + + /** + * Gets the ContentPackagesClient object to access its operations. + * + * @return the ContentPackagesClient object. + */ + public ContentPackagesClient getContentPackages() { + return this.contentPackages; + } + + /** The ContentPackageOperationsClient object to access its operations. */ + private final ContentPackageOperationsClient contentPackageOperations; + + /** + * Gets the ContentPackageOperationsClient object to access its operations. + * + * @return the ContentPackageOperationsClient object. + */ + public ContentPackageOperationsClient getContentPackageOperations() { + return this.contentPackageOperations; + } + + /** The ProductPackagesClient object to access its operations. */ + private final ProductPackagesClient productPackages; + + /** + * Gets the ProductPackagesClient object to access its operations. + * + * @return the ProductPackagesClient object. + */ + public ProductPackagesClient getProductPackages() { + return this.productPackages; + } + + /** The ProductPackageOperationsClient object to access its operations. */ + private final ProductPackageOperationsClient productPackageOperations; + + /** + * Gets the ProductPackageOperationsClient object to access its operations. + * + * @return the ProductPackageOperationsClient object. + */ + public ProductPackageOperationsClient getProductPackageOperations() { + return this.productPackageOperations; + } + + /** The ProductTemplatesClient object to access its operations. */ + private final ProductTemplatesClient productTemplates; + + /** + * Gets the ProductTemplatesClient object to access its operations. + * + * @return the ProductTemplatesClient object. + */ + public ProductTemplatesClient getProductTemplates() { + return this.productTemplates; + } + + /** The ProductTemplateOperationsClient object to access its operations. */ + private final ProductTemplateOperationsClient productTemplateOperations; + + /** + * Gets the ProductTemplateOperationsClient object to access its operations. + * + * @return the ProductTemplateOperationsClient object. + */ + public ProductTemplateOperationsClient getProductTemplateOperations() { + return this.productTemplateOperations; + } + + /** The ContentTemplatesClient object to access its operations. */ + private final ContentTemplatesClient contentTemplates; + + /** + * Gets the ContentTemplatesClient object to access its operations. + * + * @return the ContentTemplatesClient object. + */ + public ContentTemplatesClient getContentTemplates() { + return this.contentTemplates; + } + + /** The ContentTemplateOperationsClient object to access its operations. */ + private final ContentTemplateOperationsClient contentTemplateOperations; + + /** + * Gets the ContentTemplateOperationsClient object to access its operations. + * + * @return the ContentTemplateOperationsClient object. + */ + public ContentTemplateOperationsClient getContentTemplateOperations() { + return this.contentTemplateOperations; + } + /** The IpGeodatasClient object to access its operations. */ private final IpGeodatasClient ipGeodatas; @@ -261,18 +386,6 @@ public DomainWhoisClient getDomainWhois() { return this.domainWhois; } - /** The EntitiesClient object to access its operations. */ - private final EntitiesClient entities; - - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - public EntitiesClient getEntities() { - return this.entities; - } - /** The EntitiesGetTimelinesClient object to access its operations. */ private final EntitiesGetTimelinesClient entitiesGetTimelines; @@ -369,6 +482,18 @@ public IncidentRelationsClient getIncidentRelations() { return this.incidentRelations; } + /** The IncidentTasksClient object to access its operations. */ + private final IncidentTasksClient incidentTasks; + + /** + * Gets the IncidentTasksClient object to access its operations. + * + * @return the IncidentTasksClient object. + */ + public IncidentTasksClient getIncidentTasks() { + return this.incidentTasks; + } + /** The MetadatasClient object to access its operations. */ private final MetadatasClient metadatas; @@ -405,6 +530,42 @@ public SentinelOnboardingStatesClient getSentinelOnboardingStates() { return this.sentinelOnboardingStates; } + /** The GetRecommendationsClient object to access its operations. */ + private final GetRecommendationsClient getRecommendations; + + /** + * Gets the GetRecommendationsClient object to access its operations. + * + * @return the GetRecommendationsClient object. + */ + public GetRecommendationsClient getGetRecommendations() { + return this.getRecommendations; + } + + /** The GetsClient object to access its operations. */ + private final GetsClient gets; + + /** + * Gets the GetsClient object to access its operations. + * + * @return the GetsClient object. + */ + public GetsClient getGets() { + return this.gets; + } + + /** The UpdatesClient object to access its operations. */ + private final UpdatesClient updates; + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + public UpdatesClient getUpdates() { + return this.updates; + } + /** The SecurityMLAnalyticsSettingsClient object to access its operations. */ private final SecurityMLAnalyticsSettingsClient securityMLAnalyticsSettings; @@ -489,6 +650,42 @@ public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMe return this.threatIntelligenceIndicatorMetrics; } + /** The TriggeredAnalyticsRuleRunOperationsClient object to access its operations. */ + private final TriggeredAnalyticsRuleRunOperationsClient triggeredAnalyticsRuleRunOperations; + + /** + * Gets the TriggeredAnalyticsRuleRunOperationsClient object to access its operations. + * + * @return the TriggeredAnalyticsRuleRunOperationsClient object. + */ + public TriggeredAnalyticsRuleRunOperationsClient getTriggeredAnalyticsRuleRunOperations() { + return this.triggeredAnalyticsRuleRunOperations; + } + + /** The GetTriggeredAnalyticsRuleRunsClient object to access its operations. */ + private final GetTriggeredAnalyticsRuleRunsClient getTriggeredAnalyticsRuleRuns; + + /** + * Gets the GetTriggeredAnalyticsRuleRunsClient object to access its operations. + * + * @return the GetTriggeredAnalyticsRuleRunsClient object. + */ + public GetTriggeredAnalyticsRuleRunsClient getGetTriggeredAnalyticsRuleRuns() { + return this.getTriggeredAnalyticsRuleRuns; + } + + /** The AlertRuleOperationsClient object to access its operations. */ + private final AlertRuleOperationsClient alertRuleOperations; + + /** + * Gets the AlertRuleOperationsClient object to access its operations. + * + * @return the AlertRuleOperationsClient object. + */ + public AlertRuleOperationsClient getAlertRuleOperations() { + return this.alertRuleOperations; + } + /** The WatchlistsClient object to access its operations. */ private final WatchlistsClient watchlists; @@ -513,6 +710,30 @@ public WatchlistItemsClient getWatchlistItems() { return this.watchlistItems; } + /** The WorkspaceManagerConfigurationsClient object to access its operations. */ + private final WorkspaceManagerConfigurationsClient workspaceManagerConfigurations; + + /** + * Gets the WorkspaceManagerConfigurationsClient object to access its operations. + * + * @return the WorkspaceManagerConfigurationsClient object. + */ + public WorkspaceManagerConfigurationsClient getWorkspaceManagerConfigurations() { + return this.workspaceManagerConfigurations; + } + + /** The WorkspaceManagerMembersClient object to access its operations. */ + private final WorkspaceManagerMembersClient workspaceManagerMembers; + + /** + * Gets the WorkspaceManagerMembersClient object to access its operations. + * + * @return the WorkspaceManagerMembersClient object. + */ + public WorkspaceManagerMembersClient getWorkspaceManagerMembers() { + return this.workspaceManagerMembers; + } + /** The DataConnectorsClient object to access its operations. */ private final DataConnectorsClient dataConnectors; @@ -571,18 +792,26 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; + this.apiVersion = "2023-04-01-preview"; this.alertRules = new AlertRulesClientImpl(this); this.actions = new ActionsClientImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this); this.automationRules = new AutomationRulesClientImpl(this); + this.entities = new EntitiesClientImpl(this); this.incidents = new IncidentsClientImpl(this); this.bookmarks = new BookmarksClientImpl(this); this.bookmarkRelations = new BookmarkRelationsClientImpl(this); this.bookmarkOperations = new BookmarkOperationsClientImpl(this); + this.contentPackages = new ContentPackagesClientImpl(this); + this.contentPackageOperations = new ContentPackageOperationsClientImpl(this); + this.productPackages = new ProductPackagesClientImpl(this); + this.productPackageOperations = new ProductPackageOperationsClientImpl(this); + this.productTemplates = new ProductTemplatesClientImpl(this); + this.productTemplateOperations = new ProductTemplateOperationsClientImpl(this); + this.contentTemplates = new ContentTemplatesClientImpl(this); + this.contentTemplateOperations = new ContentTemplateOperationsClientImpl(this); this.ipGeodatas = new IpGeodatasClientImpl(this); this.domainWhois = new DomainWhoisClientImpl(this); - this.entities = new EntitiesClientImpl(this); this.entitiesGetTimelines = new EntitiesGetTimelinesClientImpl(this); this.entitiesRelations = new EntitiesRelationsClientImpl(this); this.entityRelations = new EntityRelationsClientImpl(this); @@ -591,9 +820,13 @@ public OperationsClient getOperations() { this.fileImports = new FileImportsClientImpl(this); this.incidentComments = new IncidentCommentsClientImpl(this); this.incidentRelations = new IncidentRelationsClientImpl(this); + this.incidentTasks = new IncidentTasksClientImpl(this); this.metadatas = new MetadatasClientImpl(this); this.officeConsents = new OfficeConsentsClientImpl(this); this.sentinelOnboardingStates = new SentinelOnboardingStatesClientImpl(this); + this.getRecommendations = new GetRecommendationsClientImpl(this); + this.gets = new GetsClientImpl(this); + this.updates = new UpdatesClientImpl(this); this.securityMLAnalyticsSettings = new SecurityMLAnalyticsSettingsClientImpl(this); this.productSettings = new ProductSettingsClientImpl(this); this.sourceControls = new SourceControlsClientImpl(this); @@ -601,8 +834,13 @@ public OperationsClient getOperations() { this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); + this.triggeredAnalyticsRuleRunOperations = new TriggeredAnalyticsRuleRunOperationsClientImpl(this); + this.getTriggeredAnalyticsRuleRuns = new GetTriggeredAnalyticsRuleRunsClientImpl(this); + this.alertRuleOperations = new AlertRuleOperationsClientImpl(this); this.watchlists = new WatchlistsClientImpl(this); this.watchlistItems = new WatchlistItemsClientImpl(this); + this.workspaceManagerConfigurations = new WorkspaceManagerConfigurationsClientImpl(this); + this.workspaceManagerMembers = new WorkspaceManagerMembersClientImpl(this); this.dataConnectors = new DataConnectorsClientImpl(this); this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsClientImpl(this); this.operations = new OperationsClientImpl(this); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java index 2cd5970544403..26e9f9cecd23f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java @@ -60,11 +60,10 @@ public final class SecurityMLAnalyticsSettingsClientImpl implements SecurityMLAn */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSecu") - private interface SecurityMLAnalyticsSettingsService { + public interface SecurityMLAnalyticsSettingsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -78,9 +77,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,9 +92,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -113,9 +108,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings" - + "/{settingsResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/{settingsResourceName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -450,15 +443,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner get( - String resourceGroupName, String workspaceName, String settingsResourceName) { - return getAsync(resourceGroupName, workspaceName, settingsResourceName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); } /** @@ -467,16 +461,15 @@ public SecurityMLAnalyticsSettingInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); + public SecurityMLAnalyticsSettingInner get( + String resourceGroupName, String workspaceName, String settingsResourceName) { + return getWithResponse(resourceGroupName, workspaceName, settingsResourceName, Context.NONE).getValue(); } /** @@ -642,18 +635,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @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 security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - return createOrUpdateAsync(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting) + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context) .block(); } @@ -664,22 +660,20 @@ public SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context) - .block(); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, Context.NONE) + .getValue(); } /** @@ -811,13 +805,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - deleteAsync(resourceGroupName, workspaceName, settingsResourceName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); } /** @@ -826,16 +823,13 @@ public void delete(String resourceGroupName, String workspaceName, String settin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { + deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java index f0d4218f31a30..3404cd1a75ebd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java @@ -41,16 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SecurityMLAnalyticsSettingImpl(inner1, this.manager())); } - public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { - SecurityMLAnalyticsSettingInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); - if (inner != null) { - return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { Response inner = @@ -66,15 +56,9 @@ public Response getWithResponse( } } - public SecurityMLAnalyticsSetting createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { SecurityMLAnalyticsSettingInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); if (inner != null) { return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); } else { @@ -104,8 +88,20 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + public SecurityMLAnalyticsSetting createOrUpdate( + String resourceGroupName, + String workspaceName, + String settingsResourceName, + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + SecurityMLAnalyticsSettingInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + if (inner != null) { + return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -113,6 +109,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, context); } + public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { + this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + } + private SecurityMLAnalyticsSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java index 9035d0d85eefc..c43f67ee9392e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java @@ -55,12 +55,10 @@ public final class SentinelOnboardingStatesClientImpl implements SentinelOnboard */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSent") - private interface SentinelOnboardingStatesService { + public interface SentinelOnboardingStatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -75,9 +73,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -93,9 +89,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates" - + "/{sentinelOnboardingStateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates/{sentinelOnboardingStateName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -110,8 +104,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/onboardingStates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -258,15 +251,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @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 sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - return getAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); } /** @@ -275,16 +269,15 @@ public SentinelOnboardingStateInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); + public SentinelOnboardingStateInner get( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + return getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE).getValue(); } /** @@ -420,7 +413,6 @@ private Mono> createWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -428,10 +420,8 @@ private Mono> createWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter) { + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; return createWithResponseAsync( resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -443,18 +433,27 @@ private Mono createAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state on successful completion of {@link Mono}. + * @return sentinel onboarding state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String sentinelOnboardingStateName, + SentinelOnboardingStateInner sentinelOnboardingStateParameter, + Context context) { return createWithResponseAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + resourceGroupName, + workspaceName, + sentinelOnboardingStateName, + sentinelOnboardingStateParameter, + context) + .block(); } /** @@ -472,38 +471,13 @@ private Mono createAsync( public SentinelOnboardingStateInner create( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; - return createAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .block(); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter, - Context context) { - return createWithResponseAsync( + return createWithResponse( resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter, - context) - .block(); + Context.NONE) + .getValue(); } /** @@ -639,13 +613,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - deleteAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); } /** @@ -654,16 +631,13 @@ public void delete(String resourceGroupName, String workspaceName, String sentin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE); } /** @@ -780,14 +754,16 @@ private Mono listAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -795,15 +771,13 @@ public SentinelOnboardingStatesListInner list(String resourceGroupName, String w * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java index 805ce3714bf1e..807a52a88f80c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java @@ -29,17 +29,6 @@ public SentinelOnboardingStatesImpl( this.serviceManager = serviceManager; } - public SentinelOnboardingState get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - SentinelOnboardingStateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); - if (inner != null) { - return new SentinelOnboardingStateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { Response inner = @@ -57,8 +46,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); + public SentinelOnboardingState get( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + SentinelOnboardingStateInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); + if (inner != null) { + return new SentinelOnboardingStateImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -68,13 +64,8 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); } - public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { - SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SentinelOnboardingStatesListImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); } public Response listWithResponse( @@ -92,6 +83,15 @@ public Response listWithResponse( } } + public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { + SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new SentinelOnboardingStatesListImpl(inner, this.manager()); + } else { + return null; + } + } + public SentinelOnboardingState getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java index 7d0d20b95466e..616f08401332d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java @@ -58,11 +58,10 @@ public final class SourceControlsClientImpl implements SourceControlsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsService { + public interface SourceControlsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRepositories( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java index 154c48e0138ad..04e777ca8e970 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java @@ -59,11 +59,10 @@ public final class SourceControlsOperationsClientImpl implements SourceControlsO */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsOperationsService { + public interface SourceControlsOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -77,8 +76,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -93,8 +91,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -109,8 +106,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -443,14 +439,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. + * @return a source control byt its identifier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { - return getAsync(resourceGroupName, workspaceName, sourceControlId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); } /** @@ -459,16 +457,14 @@ public SourceControlInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. + * @return a source control byt its identifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); + public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { + return getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE).getValue(); } /** @@ -600,13 +596,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - deleteAsync(resourceGroupName, workspaceName, sourceControlId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); } /** @@ -615,16 +614,13 @@ public void delete(String resourceGroupName, String workspaceName, String source * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { + deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE); } /** @@ -779,15 +775,21 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. * @param sourceControl The SourceControl. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. + * @return represents a SourceControl in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String sourceControlId, + SourceControlInner sourceControl, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) + .block(); } /** @@ -797,21 +799,16 @@ public SourceControlInner create( * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response}. + * @return represents a SourceControl in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) - .block(); + public SourceControlInner create( + String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { + return createWithResponse(resourceGroupName, workspaceName, sourceControlId, sourceControl, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java index 467e637cf289d..0e8b7d4b94c98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); } - public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); + public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { + SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); + if (inner != null) { + return new SourceControlImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); } + public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { + this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); + } + public SourceControl getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelAutoGeneratedImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelAutoGeneratedImpl.java new file mode 100644 index 0000000000000..0f9ee7a3a036d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelAutoGeneratedImpl.java @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplatePropertiesAutoGenerated; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.TemplateInstallationProperties; +import com.azure.resourcemanager.securityinsights.models.TemplateModelAutoGenerated; +import java.time.LocalDate; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class TemplateModelAutoGeneratedImpl + implements TemplateModelAutoGenerated, TemplateModelAutoGenerated.Definition, TemplateModelAutoGenerated.Update { + private TemplateModelAutoGeneratedInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String contentId() { + return this.innerModel().contentId(); + } + + public String version() { + return this.innerModel().version(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public Kind contentKind() { + return this.innerModel().contentKind(); + } + + public MetadataSource source() { + return this.innerModel().source(); + } + + public MetadataAuthor author() { + return this.innerModel().author(); + } + + public MetadataSupport support() { + return this.innerModel().support(); + } + + public MetadataDependencies dependencies() { + return this.innerModel().dependencies(); + } + + public MetadataCategories categories() { + return this.innerModel().categories(); + } + + public List providers() { + List inner = this.innerModel().providers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LocalDate firstPublishDate() { + return this.innerModel().firstPublishDate(); + } + + public LocalDate lastPublishDate() { + return this.innerModel().lastPublishDate(); + } + + public String customVersion() { + return this.innerModel().customVersion(); + } + + public String contentSchemaVersion() { + return this.innerModel().contentSchemaVersion(); + } + + public String icon() { + return this.innerModel().icon(); + } + + public List threatAnalysisTactics() { + List inner = this.innerModel().threatAnalysisTactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threatAnalysisTechniques() { + List inner = this.innerModel().threatAnalysisTechniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImages() { + List inner = this.innerModel().previewImages(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImagesDark() { + List inner = this.innerModel().previewImagesDark(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String packageId() { + return this.innerModel().packageId(); + } + + public PackageKind packageKind() { + return this.innerModel().packageKind(); + } + + public String packageName() { + return this.innerModel().packageName(); + } + + public Object mainTemplate() { + return this.innerModel().mainTemplate(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public TemplateModelAutoGeneratedInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String templateId; + + private TemplateInstallationProperties createTemplateInstallationProperties; + + private TemplateInstallationProperties updateTemplateInstallationProperties; + + public TemplateModelAutoGeneratedImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public TemplateModelAutoGenerated create() { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .installWithResponse( + resourceGroupName, workspaceName, templateId, createTemplateInstallationProperties, Context.NONE) + .getValue(); + return this; + } + + public TemplateModelAutoGenerated create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .installWithResponse( + resourceGroupName, workspaceName, templateId, createTemplateInstallationProperties, context) + .getValue(); + return this; + } + + TemplateModelAutoGeneratedImpl( + String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = new TemplateModelAutoGeneratedInner(); + this.serviceManager = serviceManager; + this.templateId = name; + this.createTemplateInstallationProperties = new TemplateInstallationProperties(); + } + + public TemplateModelAutoGeneratedImpl update() { + this.updateTemplateInstallationProperties = new TemplateInstallationProperties(); + return this; + } + + public TemplateModelAutoGenerated apply() { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .installWithResponse( + resourceGroupName, workspaceName, templateId, updateTemplateInstallationProperties, Context.NONE) + .getValue(); + return this; + } + + public TemplateModelAutoGenerated apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .installWithResponse( + resourceGroupName, workspaceName, templateId, updateTemplateInstallationProperties, context) + .getValue(); + return this; + } + + TemplateModelAutoGeneratedImpl( + TemplateModelAutoGeneratedInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.templateId = Utils.getValueFromIdByName(innerObject.id(), "contentTemplates"); + } + + public TemplateModelAutoGenerated refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .getWithResponse(resourceGroupName, workspaceName, templateId, Context.NONE) + .getValue(); + return this; + } + + public TemplateModelAutoGenerated refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContentTemplateOperations() + .getWithResponse(resourceGroupName, workspaceName, templateId, context) + .getValue(); + return this; + } + + public TemplateModelAutoGeneratedImpl withTags(Map tags) { + if (isInCreateMode()) { + this.createTemplateInstallationProperties.withTags(tags); + return this; + } else { + this.updateTemplateInstallationProperties.withTags(tags); + return this; + } + } + + public TemplateModelAutoGeneratedImpl withProperties(TemplatePropertiesAutoGenerated properties) { + if (isInCreateMode()) { + this.createTemplateInstallationProperties.withProperties(properties); + return this; + } else { + this.updateTemplateInstallationProperties.withProperties(properties); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelImpl.java new file mode 100644 index 0000000000000..b312e745e863d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TemplateModelImpl.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataCategories; +import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.TemplateModel; +import java.time.LocalDate; +import java.util.Collections; +import java.util.List; + +public final class TemplateModelImpl implements TemplateModel { + private TemplateModelInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + TemplateModelImpl( + TemplateModelInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String contentId() { + return this.innerModel().contentId(); + } + + public String parentId() { + return this.innerModel().parentId(); + } + + public String version() { + return this.innerModel().version(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public Kind contentKind() { + return this.innerModel().contentKind(); + } + + public MetadataSource source() { + return this.innerModel().source(); + } + + public MetadataAuthor author() { + return this.innerModel().author(); + } + + public MetadataSupport support() { + return this.innerModel().support(); + } + + public MetadataDependencies dependencies() { + return this.innerModel().dependencies(); + } + + public MetadataCategories categories() { + return this.innerModel().categories(); + } + + public List providers() { + List inner = this.innerModel().providers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LocalDate firstPublishDate() { + return this.innerModel().firstPublishDate(); + } + + public LocalDate lastPublishDate() { + return this.innerModel().lastPublishDate(); + } + + public String customVersion() { + return this.innerModel().customVersion(); + } + + public String contentSchemaVersion() { + return this.innerModel().contentSchemaVersion(); + } + + public String icon() { + return this.innerModel().icon(); + } + + public List threatAnalysisTactics() { + List inner = this.innerModel().threatAnalysisTactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threatAnalysisTechniques() { + List inner = this.innerModel().threatAnalysisTechniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImages() { + List inner = this.innerModel().previewImages(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List previewImagesDark() { + List inner = this.innerModel().previewImagesDark(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String packageId() { + return this.innerModel().packageId(); + } + + public PackageKind packageKind() { + return this.innerModel().packageKind(); + } + + public String packageName() { + return this.innerModel().packageName(); + } + + public Object packagedContent() { + return this.innerModel().packagedContent(); + } + + public TemplateModelInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java index 246f25d1030c8..f83797d092d8d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java @@ -56,11 +56,10 @@ public final class ThreatIntelligenceIndicatorMetricsClientImpl implements Threa */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorMetricsService { + public interface ThreatIntelligenceIndicatorMetricsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/metrics") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/metrics") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -190,14 +189,17 @@ private Mono listAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -205,16 +207,13 @@ public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java index a89b3041bc583..b47abd6de5d07 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java @@ -27,15 +27,6 @@ public ThreatIntelligenceIndicatorMetricsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { - ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response listWithResponse( } } + public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { + ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorMetricsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java index c25005bfa019e..1dd7396723f3c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java @@ -64,12 +64,10 @@ public final class ThreatIntelligenceIndicatorsClientImpl implements ThreatIntel */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsService { + public interface ThreatIntelligenceIndicatorsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main" - + "/createIndicator") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/createIndicator") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createIndicator( @@ -84,9 +82,7 @@ Mono> createIndicator( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -101,9 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -119,9 +113,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -136,9 +128,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main" - + "/queryIndicators") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/queryIndicators") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> queryIndicators( @@ -153,9 +143,7 @@ Mono> queryIndicators( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}/appendTags") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/appendTags") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> appendTags( @@ -171,9 +159,7 @@ Mono> appendTags( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators" - + "/{name}/replaceTags") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/replaceTags") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> replaceTags( @@ -341,15 +327,20 @@ private Mono createIndicatorAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createIndicatorAsync(resourceGroupName, workspaceName, threatIntelligenceProperties).block(); + public Response createIndicatorWithResponse( + String resourceGroupName, + String workspaceName, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, + Context context) { + return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) + .block(); } /** @@ -358,20 +349,16 @@ public ThreatIntelligenceInformationInner createIndicator( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) - .block(); + public ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + return createIndicatorWithResponse(resourceGroupName, workspaceName, threatIntelligenceProperties, Context.NONE) + .getValue(); } /** @@ -504,14 +491,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @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 threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -520,16 +509,14 @@ public ThreatIntelligenceInformationInner get(String resourceGroupName, String w * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @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 threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -694,18 +681,21 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner create( + public Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties).block(); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) + .block(); } /** @@ -715,21 +705,19 @@ public ThreatIntelligenceInformationInner create( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( + public ThreatIntelligenceInformationInner create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) - .block(); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + return createWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceProperties, Context.NONE) + .getValue(); } /** @@ -857,13 +845,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -872,16 +863,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -1271,17 +1259,22 @@ private Mono appendTagsAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void appendTags( + public Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - appendTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags).block(); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context) { + return appendTagsWithResponseAsync( + resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context) + .block(); } /** @@ -1291,22 +1284,17 @@ public void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response appendTagsWithResponse( + public void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context) { - return appendTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context) - .block(); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { + appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, Context.NONE); } /** @@ -1471,18 +1459,22 @@ private Mono replaceTagsAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @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 threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner replaceTags( + public Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - return replaceTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags).block(); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context) { + return replaceTagsWithResponseAsync( + resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) + .block(); } /** @@ -1492,22 +1484,20 @@ public ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response replaceTagsWithResponse( + public ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context) { - return replaceTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) - .block(); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { + return replaceTagsWithResponse( + resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java index ad629fc04fc95..e1dbd4b46918b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java @@ -31,17 +31,6 @@ public ThreatIntelligenceIndicatorsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, @@ -62,8 +51,10 @@ public Response createIndicatorWithResponse( } } - public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { - ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -86,13 +77,8 @@ public Response getWithResponse( } } - public ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { + ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -121,8 +107,18 @@ public Response createWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -130,6 +126,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + public PagedIterable queryIndicators( String resourceGroupName, String workspaceName, @@ -151,14 +151,6 @@ public PagedIterable queryIndicators( return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); } - public void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); - } - public Response appendTagsWithResponse( String resourceGroupName, String workspaceName, @@ -170,18 +162,12 @@ public Response appendTagsWithResponse( .appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context); } - public ThreatIntelligenceInformation replaceTags( + public void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } + ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { + this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); } public Response replaceTagsWithResponse( @@ -206,6 +192,20 @@ public Response replaceTagsWithResponse( } } + public ThreatIntelligenceInformation replaceTags( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java index ac5099ba79a9b..aeb7bbcfc6d82 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java @@ -63,11 +63,10 @@ public final class ThreatIntelligenceIndicatorsOperationsClientImpl */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsOperationsService { + public interface ThreatIntelligenceIndicatorsOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java new file mode 100644 index 0000000000000..dccff35bd5079 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRun; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class TriggeredAnalyticsRuleRunImpl implements TriggeredAnalyticsRuleRun { + private TriggeredAnalyticsRuleRunInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + TriggeredAnalyticsRuleRunImpl( + TriggeredAnalyticsRuleRunInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public OffsetDateTime executionTimeUtc() { + return this.innerModel().executionTimeUtc(); + } + + public String ruleId() { + return this.innerModel().ruleId(); + } + + public String triggeredAnalyticsRuleRunId() { + return this.innerModel().triggeredAnalyticsRuleRunId(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Map ruleRunAdditionalData() { + Map inner = this.innerModel().ruleRunAdditionalData(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public TriggeredAnalyticsRuleRunInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java new file mode 100644 index 0000000000000..4ecfc7ce37e0c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TriggeredAnalyticsRuleRunOperationsClient. + */ +public final class TriggeredAnalyticsRuleRunOperationsClientImpl implements TriggeredAnalyticsRuleRunOperationsClient { + /** The proxy service used to perform REST calls. */ + private final TriggeredAnalyticsRuleRunOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of TriggeredAnalyticsRuleRunOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TriggeredAnalyticsRuleRunOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + TriggeredAnalyticsRuleRunOperationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsTriggeredAnalyticsRuleRunOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsTrig") + public interface TriggeredAnalyticsRuleRunOperationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns/{ruleRunId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleRunId") String ruleRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleRunId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleRunId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleRunId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleRunId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleRunId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleRunId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleRunId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String ruleRunId) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleRunId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleRunId, context).block(); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredAnalyticsRuleRunInner get(String resourceGroupName, String workspaceName, String ruleRunId) { + return getWithResponse(resourceGroupName, workspaceName, ruleRunId, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java new file mode 100644 index 0000000000000..5787d08093375 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRun; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRunOperations; + +public final class TriggeredAnalyticsRuleRunOperationsImpl implements TriggeredAnalyticsRuleRunOperations { + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunOperationsImpl.class); + + private final TriggeredAnalyticsRuleRunOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public TriggeredAnalyticsRuleRunOperationsImpl( + TriggeredAnalyticsRuleRunOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleRunId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredAnalyticsRuleRunImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TriggeredAnalyticsRuleRun get(String resourceGroupName, String workspaceName, String ruleRunId) { + TriggeredAnalyticsRuleRunInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleRunId); + if (inner != null) { + return new TriggeredAnalyticsRuleRunImpl(inner, this.manager()); + } else { + return null; + } + } + + private TriggeredAnalyticsRuleRunOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java new file mode 100644 index 0000000000000..4f9e9662d2b83 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import java.nio.ByteBuffer; +import java.util.List; +import java.util.UUID; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in UpdatesClient. */ +public final class UpdatesClientImpl implements UpdatesClient { + /** The proxy service used to perform REST calls. */ + private final UpdatesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of UpdatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdatesClientImpl(SecurityInsightsImpl client) { + this.service = RestProxy.create(UpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsUpdates to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsUpda") + public interface UpdatesService { + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId}") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> recommendation( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("recommendationId") UUID recommendationId, + @BodyParam("application/json") List recommendationPatch, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> recommendationWithResponseAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + if (recommendationPatch == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationPatch is required and cannot be null.")); + } else { + recommendationPatch.forEach(e -> e.validate()); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .recommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + recommendationPatch, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> recommendationWithResponseAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + if (recommendationPatch == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationPatch is required and cannot be null.")); + } else { + recommendationPatch.forEach(e -> e.validate()); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .recommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + recommendationPatch, + accept, + context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RecommendationInner> beginRecommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + Mono>> mono = + recommendationWithResponseAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RecommendationInner.class, + RecommendationInner.class, + this.client.getContext()); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RecommendationInner> beginRecommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + recommendationWithResponseAsync( + resourceGroupName, workspaceName, recommendationId, recommendationPatch, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RecommendationInner.class, RecommendationInner.class, context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return this + .beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch) + .getSyncPoller(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return this + .beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .getSyncPoller(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return beginRecommendationAsync( + resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return recommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch).block(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return recommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .block(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java new file mode 100644 index 0000000000000..c15ee75975029 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.Updates; +import java.util.List; +import java.util.UUID; + +public final class UpdatesImpl implements Updates { + private static final ClientLogger LOGGER = new ClientLogger(UpdatesImpl.class); + + private final UpdatesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public UpdatesImpl( + UpdatesClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + RecommendationInner inner = + this + .serviceClient() + .recommendation(resourceGroupName, workspaceName, recommendationId, recommendationPatch); + if (inner != null) { + return new RecommendationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + RecommendationInner inner = + this + .serviceClient() + .recommendation(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context); + if (inner != null) { + return new RecommendationImpl(inner, this.manager()); + } else { + return null; + } + } + + private UpdatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java index 0257b61bfb203..82f485b3a7987 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java @@ -58,12 +58,10 @@ public final class WatchlistItemsClientImpl implements WatchlistItemsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistItemsService { + public interface WatchlistItemsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,9 +77,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -97,9 +93,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -115,9 +109,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}" - + "/watchlistItems/{watchlistItemId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}/watchlistItems/{watchlistItemId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -525,15 +517,20 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); } /** @@ -543,20 +540,16 @@ public WatchlistItemInner get( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); + public WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE) + .getValue(); } /** @@ -705,13 +698,21 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response deleteWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) + .block(); } /** @@ -721,21 +722,13 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE); } /** @@ -912,19 +905,22 @@ private Mono createOrUpdateAsync( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem) + WatchlistItemInner watchlistItem, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) .block(); } @@ -936,23 +932,21 @@ public WatchlistItemInner createOrUpdate( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) - .block(); + WatchlistItemInner watchlistItem) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java index fc1cb65f09173..68ce318460108 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java @@ -41,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } - public WatchlistItem get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - WatchlistItemInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - if (inner != null) { - return new WatchlistItemImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, @@ -73,8 +62,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + public WatchlistItem get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + WatchlistItemInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + if (inner != null) { + return new WatchlistItemImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -88,6 +84,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + } + public WatchlistItem getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java index 56e2704b12520..818457374e236 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java @@ -60,11 +60,10 @@ public final class WatchlistsClientImpl implements WatchlistsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistsService { + public interface WatchlistsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -95,8 +93,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono delete( @@ -111,8 +108,7 @@ Mono delete( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono createOrUpdate( @@ -484,14 +480,16 @@ private Mono getAsync(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** @@ -500,16 +498,14 @@ public WatchlistInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE).getValue(); } /** @@ -639,13 +635,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** @@ -654,16 +653,13 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } /** @@ -830,15 +826,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist).block(); + public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) + .block(); } /** @@ -852,21 +854,16 @@ public WatchlistInner createOrUpdate( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) - .block(); + public WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlist, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java index 139a0477f33ff..abfae871fc716 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java @@ -41,15 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } - public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { - WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); - if (inner != null) { - return new WatchlistImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { + WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); + if (inner != null) { + return new WatchlistImpl(inner, this.manager()); + } else { + return null; + } } public WatchlistsDeleteResponse deleteWithResponse( @@ -74,6 +70,10 @@ public WatchlistsDeleteResponse deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + } + public Watchlist getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationImpl.java new file mode 100644 index 0000000000000..2cf75068f9969 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; +import com.azure.resourcemanager.securityinsights.models.Mode; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerConfiguration; + +public final class WorkspaceManagerConfigurationImpl + implements WorkspaceManagerConfiguration, + WorkspaceManagerConfiguration.Definition, + WorkspaceManagerConfiguration.Update { + private WorkspaceManagerConfigurationInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Mode mode() { + return this.innerModel().mode(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public WorkspaceManagerConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String workspaceManagerConfigurationName; + + public WorkspaceManagerConfigurationImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public WorkspaceManagerConfiguration create() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + this.innerModel(), + Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerConfiguration create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerConfigurationName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkspaceManagerConfigurationImpl( + String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = new WorkspaceManagerConfigurationInner(); + this.serviceManager = serviceManager; + this.workspaceManagerConfigurationName = name; + } + + public WorkspaceManagerConfigurationImpl update() { + return this; + } + + public WorkspaceManagerConfiguration apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + this.innerModel(), + Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerConfiguration apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerConfigurationName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkspaceManagerConfigurationImpl( + WorkspaceManagerConfigurationInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.workspaceManagerConfigurationName = + Utils.getValueFromIdByName(innerObject.id(), "workspaceManagerConfigurations"); + } + + public WorkspaceManagerConfiguration refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerConfiguration refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerConfigurations() + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context) + .getValue(); + return this; + } + + public WorkspaceManagerConfigurationImpl withMode(Mode mode) { + this.innerModel().withMode(mode); + return this; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsClientImpl.java new file mode 100644 index 0000000000000..a8d5a940a588a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsClientImpl.java @@ -0,0 +1,1015 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerConfigurationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerConfigurationList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in WorkspaceManagerConfigurationsClient. */ +public final class WorkspaceManagerConfigurationsClientImpl implements WorkspaceManagerConfigurationsClient { + /** The proxy service used to perform REST calls. */ + private final WorkspaceManagerConfigurationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of WorkspaceManagerConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkspaceManagerConfigurationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + WorkspaceManagerConfigurationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsWorkspaceManagerConfigurations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsWork") + public interface WorkspaceManagerConfigurationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerConfigurations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerConfigurations/{workspaceManagerConfigurationName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerConfigurationName") String workspaceManagerConfigurationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerConfigurations/{workspaceManagerConfigurationName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerConfigurationName") String workspaceManagerConfigurationName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerConfigurations/{workspaceManagerConfigurationName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerConfigurationName") String workspaceManagerConfigurationName, + @BodyParam("application/json") WorkspaceManagerConfigurationInner workspaceManagerConfiguration, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager configurations for a Sentinel workspace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager configurations for a Sentinel workspace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, orderby, top, skipToken)); + } + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, orderby, top, skipToken, context)); + } + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + accept, + context); + } + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + return getWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerConfigurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context) + .block(); + } + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceManagerConfigurationInner get( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + return getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, Context.NONE) + .getValue(); + } + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + accept, + context); + } + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerConfigurationName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context) + .block(); + } + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, Context.NONE); + } + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + if (workspaceManagerConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfiguration is required and cannot be null.")); + } else { + workspaceManagerConfiguration.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + workspaceManagerConfiguration, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerConfigurationName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfigurationName is required and cannot be null.")); + } + if (workspaceManagerConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerConfiguration is required and cannot be null.")); + } else { + workspaceManagerConfiguration.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + workspaceManagerConfiguration, + accept, + context); + } + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, workspaceManagerConfigurationName, workspaceManagerConfiguration) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + workspaceManagerConfiguration, + context) + .block(); + } + + /** + * Creates or updates a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param workspaceManagerConfiguration The workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceManagerConfigurationInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String workspaceManagerConfigurationName, + WorkspaceManagerConfigurationInner workspaceManagerConfiguration) { + return createOrUpdateWithResponse( + resourceGroupName, + workspaceName, + workspaceManagerConfigurationName, + workspaceManagerConfiguration, + Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list all the workspace manager configurations for the workspace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list all the workspace manager configurations for the workspace along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsImpl.java new file mode 100644 index 0000000000000..c7451a49da4da --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerConfigurationsImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerConfigurationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerConfiguration; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerConfigurations; + +public final class WorkspaceManagerConfigurationsImpl implements WorkspaceManagerConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerConfigurationsImpl.class); + + private final WorkspaceManagerConfigurationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public WorkspaceManagerConfigurationsImpl( + WorkspaceManagerConfigurationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new WorkspaceManagerConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new WorkspaceManagerConfigurationImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkspaceManagerConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkspaceManagerConfiguration get( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + WorkspaceManagerConfigurationInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, workspaceManagerConfigurationName); + if (inner != null) { + return new WorkspaceManagerConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context); + } + + public void delete(String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName) { + this.serviceClient().delete(resourceGroupName, workspaceName, workspaceManagerConfigurationName); + } + + public WorkspaceManagerConfiguration getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerConfigurationName = Utils.getValueFromIdByName(id, "workspaceManagerConfigurations"); + if (workspaceManagerConfigurationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'workspaceManagerConfigurations'.", + id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerConfigurationName = Utils.getValueFromIdByName(id, "workspaceManagerConfigurations"); + if (workspaceManagerConfigurationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'workspaceManagerConfigurations'.", + id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerConfigurationName = Utils.getValueFromIdByName(id, "workspaceManagerConfigurations"); + if (workspaceManagerConfigurationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'workspaceManagerConfigurations'.", + id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerConfigurationName = Utils.getValueFromIdByName(id, "workspaceManagerConfigurations"); + if (workspaceManagerConfigurationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment" + + " 'workspaceManagerConfigurations'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerConfigurationName, context); + } + + private WorkspaceManagerConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public WorkspaceManagerConfigurationImpl define(String name) { + return new WorkspaceManagerConfigurationImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMemberImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMemberImpl.java new file mode 100644 index 0000000000000..09194679275ad --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMemberImpl.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerMember; + +public final class WorkspaceManagerMemberImpl + implements WorkspaceManagerMember, WorkspaceManagerMember.Definition, WorkspaceManagerMember.Update { + private WorkspaceManagerMemberInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String targetWorkspaceId() { + return this.innerModel().targetWorkspaceId(); + } + + public String targetWorkspaceTenantId() { + return this.innerModel().targetWorkspaceTenantId(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public WorkspaceManagerMemberInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String workspaceManagerMemberName; + + public WorkspaceManagerMemberImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public WorkspaceManagerMember create() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerMemberName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerMember create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerMemberName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkspaceManagerMemberImpl( + String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = new WorkspaceManagerMemberInner(); + this.serviceManager = serviceManager; + this.workspaceManagerMemberName = name; + } + + public WorkspaceManagerMemberImpl update() { + return this; + } + + public WorkspaceManagerMember apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerMemberName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerMember apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerMemberName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkspaceManagerMemberImpl( + WorkspaceManagerMemberInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.workspaceManagerMemberName = Utils.getValueFromIdByName(innerObject.id(), "workspaceManagerMembers"); + } + + public WorkspaceManagerMember refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, Context.NONE) + .getValue(); + return this; + } + + public WorkspaceManagerMember refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWorkspaceManagerMembers() + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, context) + .getValue(); + return this; + } + + public WorkspaceManagerMemberImpl withTargetWorkspaceId(String targetWorkspaceId) { + this.innerModel().withTargetWorkspaceId(targetWorkspaceId); + return this; + } + + public WorkspaceManagerMemberImpl withTargetWorkspaceTenantId(String targetWorkspaceTenantId) { + this.innerModel().withTargetWorkspaceTenantId(targetWorkspaceTenantId); + return this; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersClientImpl.java new file mode 100644 index 0000000000000..87bbae3cc035d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersClientImpl.java @@ -0,0 +1,997 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerMembersClient; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerMembersList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in WorkspaceManagerMembersClient. */ +public final class WorkspaceManagerMembersClientImpl implements WorkspaceManagerMembersClient { + /** The proxy service used to perform REST calls. */ + private final WorkspaceManagerMembersService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of WorkspaceManagerMembersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkspaceManagerMembersClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create(WorkspaceManagerMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsWorkspaceManagerMembers to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsWork") + public interface WorkspaceManagerMembersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerMembers/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("$orderby") String orderby, + @QueryParam("$top") Integer top, + @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerMembers/{workspaceManagerMemberName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerMemberName") String workspaceManagerMemberName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerMembers/{workspaceManagerMemberName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerMemberName") String workspaceManagerMemberName, + @BodyParam("application/json") WorkspaceManagerMemberInner workspaceManagerMember, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/workspaceManagerMembers/{workspaceManagerMemberName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("workspaceManagerMemberName") String workspaceManagerMemberName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager members that exist for the given Sentinel workspace manager along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + orderby, + top, + skipToken, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager members that exist for the given Sentinel workspace manager along with {@link + * PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + orderby, + top, + skipToken, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, orderby, top, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String orderby = null; + final Integer top = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, orderby, top, skipToken)); + } + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, orderby, top, skipToken, context)); + } + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager member along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager member along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + accept, + context); + } + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager member on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + return getWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerMemberName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager member along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerMemberName, context).block(); + } + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspace manager member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceManagerMemberInner get( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + return getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, Context.NONE).getValue(); + } + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + if (workspaceManagerMember == null) { + return Mono + .error( + new IllegalArgumentException("Parameter workspaceManagerMember is required and cannot be null.")); + } else { + workspaceManagerMember.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + workspaceManagerMember, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + if (workspaceManagerMember == null) { + return Mono + .error( + new IllegalArgumentException("Parameter workspaceManagerMember is required and cannot be null.")); + } else { + workspaceManagerMember.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + workspaceManagerMember, + accept, + context); + } + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, workspaceManagerMemberName, workspaceManagerMember) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, workspaceManagerMemberName, workspaceManagerMember, context) + .block(); + } + + /** + * Creates or updates a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param workspaceManagerMember The workspace manager member object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the workspace manager member. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceManagerMemberInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String workspaceManagerMemberName, + WorkspaceManagerMemberInner workspaceManagerMember) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, workspaceManagerMemberName, workspaceManagerMember, Context.NONE) + .getValue(); + } + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (workspaceManagerMemberName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter workspaceManagerMemberName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + workspaceManagerMemberName, + accept, + context); + } + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerMemberName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, workspaceManagerMemberName, context).block(); + } + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of workspace manager members along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of workspace manager members along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersImpl.java new file mode 100644 index 0000000000000..d4c119d0009a3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WorkspaceManagerMembersImpl.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.WorkspaceManagerMembersClient; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerMember; +import com.azure.resourcemanager.securityinsights.models.WorkspaceManagerMembers; + +public final class WorkspaceManagerMembersImpl implements WorkspaceManagerMembers { + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerMembersImpl.class); + + private final WorkspaceManagerMembersClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public WorkspaceManagerMembersImpl( + WorkspaceManagerMembersClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new WorkspaceManagerMemberImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + String workspaceName, + String orderby, + Integer top, + String skipToken, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, orderby, top, skipToken, context); + return Utils.mapPage(inner, inner1 -> new WorkspaceManagerMemberImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkspaceManagerMemberImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkspaceManagerMember get( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + WorkspaceManagerMemberInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, workspaceManagerMemberName); + if (inner != null) { + return new WorkspaceManagerMemberImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, context); + } + + public void delete(String resourceGroupName, String workspaceName, String workspaceManagerMemberName) { + this.serviceClient().delete(resourceGroupName, workspaceName, workspaceManagerMemberName); + } + + public WorkspaceManagerMember getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerMemberName = Utils.getValueFromIdByName(id, "workspaceManagerMembers"); + if (workspaceManagerMemberName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workspaceManagerMembers'.", + id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerMemberName = Utils.getValueFromIdByName(id, "workspaceManagerMembers"); + if (workspaceManagerMemberName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workspaceManagerMembers'.", + id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerMemberName = Utils.getValueFromIdByName(id, "workspaceManagerMembers"); + if (workspaceManagerMemberName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workspaceManagerMembers'.", + id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String workspaceManagerMemberName = Utils.getValueFromIdByName(id, "workspaceManagerMembers"); + if (workspaceManagerMemberName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'workspaceManagerMembers'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, workspaceManagerMemberName, context); + } + + private WorkspaceManagerMembersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public WorkspaceManagerMemberImpl define(String name) { + return new WorkspaceManagerMemberImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java index bf95fed22e284..b55b94b611b01 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java @@ -10,19 +10,24 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents AAD (Azure Active Directory) requirements check request. */ +/** Represents AADIP (Azure Active Directory Identity Protection) requirements check request. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AzureActiveDirectory") @Fluent public final class AadCheckRequirements extends DataConnectorsCheckRequirements { /* - * AAD (Azure Active Directory) requirements check properties. + * AADIP (Azure Active Directory Identity Protection) requirements check properties. */ @JsonProperty(value = "properties") private AadCheckRequirementsProperties innerProperties; + /** Creates an instance of AadCheckRequirements class. */ + public AadCheckRequirements() { + } + /** - * Get the innerProperties property: AAD (Azure Active Directory) requirements check properties. + * Get the innerProperties property: AADIP (Azure Active Directory Identity Protection) requirements check + * properties. * * @return the innerProperties value. */ @@ -30,6 +35,29 @@ private AadCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the AadCheckRequirements object itself. + */ + public AadCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new AadCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java index 2c2d4b0f24aae..7d42616f423ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java @@ -11,19 +11,23 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Represents AAD (Azure Active Directory) data connector. */ +/** Represents AADIP (Azure Active Directory Identity Protection) data connector. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AzureActiveDirectory") @Fluent public final class AadDataConnector extends DataConnectorInner { /* - * AAD (Azure Active Directory) data connector properties. + * AADIP (Azure Active Directory Identity Protection) data connector properties. */ @JsonProperty(value = "properties") private AadDataConnectorProperties innerProperties; + /** Creates an instance of AadDataConnector class. */ + public AadDataConnector() { + } + /** - * Get the innerProperties property: AAD (Azure Active Directory) data connector properties. + * Get the innerProperties property: AADIP (Azure Active Directory Identity Protection) data connector properties. * * @return the innerProperties value. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java index 45cdb56dc88a0..ca68fdbd135cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java @@ -21,6 +21,10 @@ public final class AatpCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private AatpCheckRequirementsProperties innerProperties; + /** Creates an instance of AatpCheckRequirements class. */ + public AatpCheckRequirements() { + } + /** * Get the innerProperties property: AATP (Azure Advanced Threat Protection) requirements check properties. * @@ -30,6 +34,29 @@ private AatpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the AatpCheckRequirements object itself. + */ + public AatpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new AatpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java index 25261e2030c44..4f8ff9e2cac3e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java @@ -22,6 +22,10 @@ public final class AatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AatpDataConnectorProperties innerProperties; + /** Creates an instance of AatpDataConnector class. */ + public AatpDataConnector() { + } + /** * Get the innerProperties property: AATP (Azure Advanced Threat Protection) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java index d662cdb888ec1..16a379b3ba68e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.AccountEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an account entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Account") -@Fluent +@Immutable public final class AccountEntity extends EntityInner { /* * Account entity properties @@ -24,6 +24,10 @@ public final class AccountEntity extends EntityInner { @JsonProperty(value = "properties") private AccountEntityProperties innerProperties; + /** Creates an instance of AccountEntity class. */ + public AccountEntity() { + } + /** * Get the innerProperties property: Account entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java index 385e767940bd0..17fc2338ded89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java @@ -18,6 +18,10 @@ public class ActionPropertiesBase { @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; + /** Creates an instance of ActionPropertiesBase class. */ + public ActionPropertiesBase() { + } + /** * Get the logicAppResourceId property: Logic App Resource Id, * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java index ccc8692cff412..036949c4ad3cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java @@ -17,6 +17,10 @@ public final class ActionRequest extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionRequestProperties innerProperties; + /** Creates an instance of ActionRequest class. */ + public ActionRequest() { + } + /** * Get the innerProperties property: Action properties for put request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java index 9e8ad565443d0..7d13023902928 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java @@ -16,6 +16,18 @@ public final class ActionType extends ExpandableStringEnum { /** Static value RunPlaybook for ActionType. */ public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); + /** Static value AddIncidentTask for ActionType. */ + public static final ActionType ADD_INCIDENT_TASK = fromString("AddIncidentTask"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java index 97de0d03303b9..45591fc7f1eea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java @@ -45,12 +45,14 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ - ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Gets the action of alert rule. @@ -59,14 +61,12 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Delete the action of alert rule. @@ -75,11 +75,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Delete the action of alert rule. @@ -88,14 +91,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Gets the action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java index 4f7ecdd353b97..f9dd5b49803f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java @@ -25,6 +25,10 @@ public final class ActionsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ActionsList class. */ + public ActionsList() { + } + /** * Get the nextLink property: URL to fetch the next set of actions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java index e010a8c88c2a2..92fb2f214a517 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java @@ -24,6 +24,10 @@ public final class ActivityCustomEntityQuery extends CustomEntityQuery { @JsonProperty(value = "properties") private ActivityEntityQueriesProperties innerProperties; + /** Creates an instance of ActivityCustomEntityQuery class. */ + public ActivityCustomEntityQuery() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java index 610d4eff8d46c..98716b887d1ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java @@ -16,6 +16,10 @@ public final class ActivityEntityQueriesPropertiesQueryDefinitions { @JsonProperty(value = "query") private String query; + /** Creates an instance of ActivityEntityQueriesPropertiesQueryDefinitions class. */ + public ActivityEntityQueriesPropertiesQueryDefinitions() { + } + /** * Get the query property: The Activity query to run on a given entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java index 7aadce92dcd42..7fa20beb01319 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java @@ -25,6 +25,10 @@ public final class ActivityEntityQuery extends EntityQueryInner { @JsonProperty(value = "properties") private ActivityEntityQueriesProperties innerProperties; + /** Creates an instance of ActivityEntityQuery class. */ + public ActivityEntityQuery() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java index 9066b404574c7..d0329a5167b18 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java @@ -24,6 +24,10 @@ public final class ActivityEntityQueryTemplate extends EntityQueryTemplateInner @JsonProperty(value = "properties") private ActivityEntityQueryTemplateProperties innerProperties; + /** Creates an instance of ActivityEntityQueryTemplate class. */ + public ActivityEntityQueryTemplate() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java index 9a85f95ebfa31..002b707261d0d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java @@ -22,6 +22,10 @@ public final class ActivityEntityQueryTemplatePropertiesQueryDefinitions { @JsonProperty(value = "summarizeBy") private String summarizeBy; + /** Creates an instance of ActivityEntityQueryTemplatePropertiesQueryDefinitions class. */ + public ActivityEntityQueryTemplatePropertiesQueryDefinitions() { + } + /** * Get the query property: The Activity query to run on a given entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java index 1e6b52c71395b..1462017662ef5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java @@ -58,6 +58,10 @@ public final class ActivityTimelineItem extends EntityTimelineItem { @JsonProperty(value = "title", required = true) private String title; + /** Creates an instance of ActivityTimelineItem class. */ + public ActivityTimelineItem() { + } + /** * Get the queryId property: The activity query id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java new file mode 100644 index 0000000000000..a0260185a5675 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AddIncidentTaskActionProperties model. */ +@Fluent +public final class AddIncidentTaskActionProperties { + /* + * The title of the task. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * The description of the task. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of AddIncidentTaskActionProperties class. */ + public AddIncidentTaskActionProperties() { + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the AddIncidentTaskActionProperties object itself. + */ + public AddIncidentTaskActionProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the AddIncidentTaskActionProperties object itself. + */ + public AddIncidentTaskActionProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property title in model AddIncidentTaskActionProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddIncidentTaskActionProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java index eff4838eabd8a..ea2e48ddf3bfc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java @@ -16,6 +16,15 @@ public final class AlertDetail extends ExpandableStringEnum { /** Static value Severity for AlertDetail. */ public static final AlertDetail SEVERITY = fromString("Severity"); + /** + * Creates a new instance of AlertDetail value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertDetail() { + } + /** * Creates or finds a AlertDetail from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java index 6abe8f54b47d1..0a9021a4f1ab7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Settings for how to dynamically override alert static details. */ @Fluent @@ -34,6 +35,16 @@ public final class AlertDetailsOverride { @JsonProperty(value = "alertSeverityColumnName") private String alertSeverityColumnName; + /* + * List of additional dynamic properties to override + */ + @JsonProperty(value = "alertDynamicProperties") + private List alertDynamicProperties; + + /** Creates an instance of AlertDetailsOverride class. */ + public AlertDetailsOverride() { + } + /** * Get the alertDisplayNameFormat property: the format containing columns name(s) to override the alert name. * @@ -114,11 +125,34 @@ public AlertDetailsOverride withAlertSeverityColumnName(String alertSeverityColu return this; } + /** + * Get the alertDynamicProperties property: List of additional dynamic properties to override. + * + * @return the alertDynamicProperties value. + */ + public List alertDynamicProperties() { + return this.alertDynamicProperties; + } + + /** + * Set the alertDynamicProperties property: List of additional dynamic properties to override. + * + * @param alertDynamicProperties the alertDynamicProperties value to set. + * @return the AlertDetailsOverride object itself. + */ + public AlertDetailsOverride withAlertDynamicProperties(List alertDynamicProperties) { + this.alertDynamicProperties = alertDynamicProperties; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (alertDynamicProperties() != null) { + alertDynamicProperties().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java new file mode 100644 index 0000000000000..bce00567c6ded --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The V3 alert property. */ +public final class AlertProperty extends ExpandableStringEnum { + /** Static value AlertLink for AlertProperty. */ + public static final AlertProperty ALERT_LINK = fromString("AlertLink"); + + /** Static value ConfidenceLevel for AlertProperty. */ + public static final AlertProperty CONFIDENCE_LEVEL = fromString("ConfidenceLevel"); + + /** Static value ConfidenceScore for AlertProperty. */ + public static final AlertProperty CONFIDENCE_SCORE = fromString("ConfidenceScore"); + + /** Static value ExtendedLinks for AlertProperty. */ + public static final AlertProperty EXTENDED_LINKS = fromString("ExtendedLinks"); + + /** Static value ProductName for AlertProperty. */ + public static final AlertProperty PRODUCT_NAME = fromString("ProductName"); + + /** Static value ProviderName for AlertProperty. */ + public static final AlertProperty PROVIDER_NAME = fromString("ProviderName"); + + /** Static value ProductComponentName for AlertProperty. */ + public static final AlertProperty PRODUCT_COMPONENT_NAME = fromString("ProductComponentName"); + + /** Static value RemediationSteps for AlertProperty. */ + public static final AlertProperty REMEDIATION_STEPS = fromString("RemediationSteps"); + + /** Static value Techniques for AlertProperty. */ + public static final AlertProperty TECHNIQUES = fromString("Techniques"); + + /** + * Creates a new instance of AlertProperty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertProperty() { + } + + /** + * Creates or finds a AlertProperty from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlertProperty. + */ + @JsonCreator + public static AlertProperty fromString(String name) { + return fromString(name, AlertProperty.class); + } + + /** + * Gets known AlertProperty values. + * + * @return known AlertProperty values. + */ + public static Collection values() { + return values(AlertProperty.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java new file mode 100644 index 0000000000000..788c1080cb296 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A single alert property mapping to override. */ +@Fluent +public final class AlertPropertyMapping { + /* + * The V3 alert property + */ + @JsonProperty(value = "alertProperty") + private AlertProperty alertProperty; + + /* + * the column name to use to override this property + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of AlertPropertyMapping class. */ + public AlertPropertyMapping() { + } + + /** + * Get the alertProperty property: The V3 alert property. + * + * @return the alertProperty value. + */ + public AlertProperty alertProperty() { + return this.alertProperty; + } + + /** + * Set the alertProperty property: The V3 alert property. + * + * @param alertProperty the alertProperty value to set. + * @return the AlertPropertyMapping object itself. + */ + public AlertPropertyMapping withAlertProperty(AlertProperty alertProperty) { + this.alertProperty = alertProperty; + return this; + } + + /** + * Get the value property: the column name to use to override this property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: the column name to use to override this property. + * + * @param value the value value to set. + * @return the AlertPropertyMapping object itself. + */ + public AlertPropertyMapping withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java index fb0c0d7f86b20..7c20aa4a0ca85 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java @@ -29,6 +29,15 @@ public final class AlertRuleKind extends ExpandableStringEnum { /** Static value NRT for AlertRuleKind. */ public static final AlertRuleKind NRT = fromString("NRT"); + /** + * Creates a new instance of AlertRuleKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertRuleKind() { + } + /** * Creates or finds a AlertRuleKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java new file mode 100644 index 0000000000000..f201efae54f85 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.Context; + +/** Resource collection API of AlertRuleOperations. */ +public interface AlertRuleOperations { + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @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. + */ + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java index a8705467713ba..483e3438ebf5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java @@ -23,6 +23,10 @@ public final class AlertRuleTemplateDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of AlertRuleTemplateDataSource class. */ + public AlertRuleTemplateDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java index 9ec04325df71e..48d8d3074b684 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java @@ -54,6 +54,10 @@ public class AlertRuleTemplatePropertiesBase { @JsonProperty(value = "status") private TemplateStatus status; + /** Creates an instance of AlertRuleTemplatePropertiesBase class. */ + public AlertRuleTemplatePropertiesBase() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java index 7ab1567de6d34..632078b48312f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java @@ -23,6 +23,10 @@ public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePrope @JsonProperty(value = "techniques") private List techniques; + /** Creates an instance of AlertRuleTemplateWithMitreProperties class. */ + public AlertRuleTemplateWithMitreProperties() { + } + /** * Get the tactics property: The tactics of the alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java index 6c1e23964aae5..f1d562c1c4873 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java @@ -41,12 +41,14 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ - AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -54,12 +56,10 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java index 8292bf9e38523..b6aa4aa014af3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java @@ -25,6 +25,10 @@ public final class AlertRuleTemplatesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRuleTemplatesList class. */ + public AlertRuleTemplatesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rule templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java index 4ce770f0de661..22b64b10d08d8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java @@ -42,12 +42,13 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ - AlertRule get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -55,13 +56,12 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRule get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -70,12 +70,14 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ - AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -84,14 +86,12 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -99,11 +99,13 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -111,11 +113,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java index c758bd659a27d..8867147572886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java @@ -25,6 +25,10 @@ public final class AlertRulesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRulesList class. */ + public AlertRulesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java index 4c140f2d9b58f..99ce3377a2898 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java @@ -22,6 +22,15 @@ public final class AlertSeverity extends ExpandableStringEnum { /** Static value Informational for AlertSeverity. */ public static final AlertSeverity INFORMATIONAL = fromString("Informational"); + /** + * Creates a new instance of AlertSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertSeverity() { + } + /** * Creates or finds a AlertSeverity from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java index db728892d6f14..114b2eb8140ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java @@ -25,6 +25,15 @@ public final class AlertStatus extends ExpandableStringEnum { /** Static value InProgress for AlertStatus. */ public static final AlertStatus IN_PROGRESS = fromString("InProgress"); + /** + * Creates a new instance of AlertStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertStatus() { + } + /** * Creates or finds a AlertStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java index 2b9ea1a543786..55703ca25bb59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java @@ -17,6 +17,10 @@ public class AlertsDataTypeOfDataConnector { @JsonProperty(value = "alerts", required = true) private DataConnectorDataTypeCommon alerts; + /** Creates an instance of AlertsDataTypeOfDataConnector class. */ + public AlertsDataTypeOfDataConnector() { + } + /** * Get the alerts property: Alerts data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java new file mode 100644 index 0000000000000..3b5ee8c3df73e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.AnalyticsRuleRunTriggerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Analytics Rule Run Trigger request. */ +@Fluent +public final class AnalyticsRuleRunTrigger { + /* + * The analytics Rule Run Trigger request + */ + @JsonProperty(value = "properties", required = true) + private AnalyticsRuleRunTriggerProperties innerProperties = new AnalyticsRuleRunTriggerProperties(); + + /** Creates an instance of AnalyticsRuleRunTrigger class. */ + public AnalyticsRuleRunTrigger() { + } + + /** + * Get the innerProperties property: The analytics Rule Run Trigger request. + * + * @return the innerProperties value. + */ + private AnalyticsRuleRunTriggerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().executionTimeUtc(); + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the AnalyticsRuleRunTrigger object itself. + */ + public AnalyticsRuleRunTrigger withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new AnalyticsRuleRunTriggerProperties(); + } + this.innerProperties().withExecutionTimeUtc(executionTimeUtc); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AnalyticsRuleRunTrigger")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AnalyticsRuleRunTrigger.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java index a06d6aea90181..226c2ae74340c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java @@ -22,6 +22,10 @@ public final class Anomalies extends SettingsInner { @JsonProperty(value = "properties") private AnomaliesSettingsProperties innerProperties; + /** Creates an instance of Anomalies class. */ + public Anomalies() { + } + /** * Get the innerProperties property: Anomalies properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java index 3a67f21d0c143..73454b1a181d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java @@ -26,6 +26,10 @@ public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalytic @JsonProperty(value = "properties") private AnomalySecurityMLAnalyticsSettingsProperties innerProperties; + /** Creates an instance of AnomalySecurityMLAnalyticsSettings class. */ + public AnomalySecurityMLAnalyticsSettings() { + } + /** * Get the innerProperties property: Anomaly Security ML Analytics Settings properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java index 28ec81da3af04..770c6cef09f90 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java @@ -83,6 +83,10 @@ public final class AnomalyTimelineItem extends EntityTimelineItem { @JsonProperty(value = "reasons") private List reasons; + /** Creates an instance of AnomalyTimelineItem class. */ + public AnomalyTimelineItem() { + } + /** * Get the azureResourceId property: The anomaly azure resource id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java index a6c58a1e05958..cfacebd058b59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java @@ -22,6 +22,15 @@ public final class AntispamMailDirection extends ExpandableStringEnum { /** Static value InhibitResponseFunction for AttackTactic. */ public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); + /** + * Creates a new instance of AttackTactic value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AttackTactic() { + } + /** * Creates or finds a AttackTactic from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java index 3ff1bf1a59fef..90a252037f566 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java @@ -18,6 +18,7 @@ defaultImpl = AutomationRuleAction.class) @JsonTypeName("AutomationRuleAction") @JsonSubTypes({ + @JsonSubTypes.Type(name = "AddIncidentTask", value = AutomationRuleAddIncidentTaskAction.class), @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class), @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class) }) @@ -29,6 +30,10 @@ public class AutomationRuleAction { @JsonProperty(value = "order", required = true) private int order; + /** Creates an instance of AutomationRuleAction class. */ + public AutomationRuleAction() { + } + /** * Get the order property: The order property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java new file mode 100644 index 0000000000000..9ba42bea1da9e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Describes an automation rule action to add a task to an incident. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("AddIncidentTask") +@Fluent +public final class AutomationRuleAddIncidentTaskAction extends AutomationRuleAction { + /* + * The actionConfiguration property. + */ + @JsonProperty(value = "actionConfiguration") + private AddIncidentTaskActionProperties actionConfiguration; + + /** Creates an instance of AutomationRuleAddIncidentTaskAction class. */ + public AutomationRuleAddIncidentTaskAction() { + } + + /** + * Get the actionConfiguration property: The actionConfiguration property. + * + * @return the actionConfiguration value. + */ + public AddIncidentTaskActionProperties actionConfiguration() { + return this.actionConfiguration; + } + + /** + * Set the actionConfiguration property: The actionConfiguration property. + * + * @param actionConfiguration the actionConfiguration value to set. + * @return the AutomationRuleAddIncidentTaskAction object itself. + */ + public AutomationRuleAddIncidentTaskAction withActionConfiguration( + AddIncidentTaskActionProperties actionConfiguration) { + this.actionConfiguration = actionConfiguration; + return this; + } + + /** {@inheritDoc} */ + @Override + public AutomationRuleAddIncidentTaskAction withOrder(int order) { + super.withOrder(order); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (actionConfiguration() != null) { + actionConfiguration().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java index 0eee30498e7ca..fb6b532aa049a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java @@ -23,6 +23,10 @@ public final class AutomationRuleBooleanCondition { @JsonProperty(value = "innerConditions") private List innerConditions; + /** Creates an instance of AutomationRuleBooleanCondition class. */ + public AutomationRuleBooleanCondition() { + } + /** * Get the operator property: The operator property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java index a703cfcce4e48..efd203cab1253 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java @@ -17,6 +17,15 @@ public final class AutomationRuleBooleanConditionSupportedOperator /** Static value Or for AutomationRuleBooleanConditionSupportedOperator. */ public static final AutomationRuleBooleanConditionSupportedOperator OR = fromString("Or"); + /** + * Creates a new instance of AutomationRuleBooleanConditionSupportedOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRuleBooleanConditionSupportedOperator() { + } + /** * Creates or finds a AutomationRuleBooleanConditionSupportedOperator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java index fbd2b4bcaef28..d735c7a02b80f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java @@ -25,6 +25,10 @@ }) @Immutable public class AutomationRuleCondition { + /** Creates an instance of AutomationRuleCondition class. */ + public AutomationRuleCondition() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java index 0f56b3772f369..7671608ffc48e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAc @JsonProperty(value = "actionConfiguration") private IncidentPropertiesAction actionConfiguration; + /** Creates an instance of AutomationRuleModifyPropertiesAction class. */ + public AutomationRuleModifyPropertiesAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java index 6b0b8389178c2..39d781c8e0341 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedArrayType /** Static value Comments for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType COMMENTS = fromString("Comments"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedArrayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedArrayType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedArrayType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java index 1d0e540202903..a1376bb28fb20 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java @@ -14,6 +14,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedChangeTyp /** Static value Added for AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedChangeType ADDED = fromString("Added"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedChangeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedChangeType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedChangeType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java index 33ee0d2d5aee9..36b6f40f659b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java @@ -22,6 +22,10 @@ public final class AutomationRulePropertyArrayChangedValuesCondition { @JsonProperty(value = "changeType") private AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType; + /** Creates an instance of AutomationRulePropertyArrayChangedValuesCondition class. */ + public AutomationRulePropertyArrayChangedValuesCondition() { + } + /** * Get the arrayType property: The arrayType property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java index 670c64ea59367..fb98a4f9dd0e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java @@ -15,6 +15,15 @@ public final class AutomationRulePropertyArrayConditionSupportedArrayConditionTy public static final AutomationRulePropertyArrayConditionSupportedArrayConditionType ANY_ITEM = fromString("AnyItem"); + /** + * Creates a new instance of AutomationRulePropertyArrayConditionSupportedArrayConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayConditionSupportedArrayConditionType() { + } + /** * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayConditionType from its string * representation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java index af5e23b9d813d..c209184c302e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java @@ -19,6 +19,15 @@ public final class AutomationRulePropertyArrayConditionSupportedArrayType public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAIL_VALUES = fromString("CustomDetailValues"); + /** + * Creates a new instance of AutomationRulePropertyArrayConditionSupportedArrayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayConditionSupportedArrayType() { + } + /** * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java index 40158ab460bc9..381ce9aa7de3a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java @@ -29,6 +29,10 @@ public final class AutomationRulePropertyArrayValuesCondition { @JsonProperty(value = "itemConditions") private List itemConditions; + /** Creates an instance of AutomationRulePropertyArrayValuesCondition class. */ + public AutomationRulePropertyArrayValuesCondition() { + } + /** * Get the arrayType property: The arrayType property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java index 1ca0b71450304..1ef6316561616 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java @@ -18,6 +18,15 @@ public final class AutomationRulePropertyChangedConditionSupportedChangedType /** Static value ChangedTo for AutomationRulePropertyChangedConditionSupportedChangedType. */ public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_TO = fromString("ChangedTo"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedChangedType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedChangedType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedChangedType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java index 7f7b6618b8416..4ec99c10a8261 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyChangedConditionSupportedPropertyType public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_OWNER = fromString("IncidentOwner"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedPropertyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedPropertyType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedPropertyType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java index ae9a8ff2891df..8f52fa3333600 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java @@ -35,6 +35,15 @@ public final class AutomationRulePropertyConditionSupportedOperator /** Static value NotEndsWith for AutomationRulePropertyConditionSupportedOperator. */ public static final AutomationRulePropertyConditionSupportedOperator NOT_ENDS_WITH = fromString("NotEndsWith"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedOperator() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedOperator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java index 72af96f863db6..b828f858109ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java @@ -220,6 +220,15 @@ public final class AutomationRulePropertyConditionSupportedProperty /** Static value Url for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty URL = fromString("Url"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedProperty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedProperty() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedProperty from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java index 9996382f4bddf..ff5cf10eefd44 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java @@ -35,6 +35,10 @@ public final class AutomationRulePropertyValuesChangedCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesChangedCondition class. */ + public AutomationRulePropertyValuesChangedCondition() { + } + /** * Get the propertyName property: The propertyName property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java index d04dd33f2854a..c6401d78b6c70 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java @@ -29,6 +29,10 @@ public final class AutomationRulePropertyValuesCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesCondition class. */ + public AutomationRulePropertyValuesCondition() { + } + /** * Get the propertyName property: The property to evaluate in an automation rule property condition. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index f2b367315f617..a8f694f9859cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction @JsonProperty(value = "actionConfiguration") private PlaybookActionProperties actionConfiguration; + /** Creates an instance of AutomationRuleRunPlaybookAction class. */ + public AutomationRuleRunPlaybookAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java index 066a10e1830ec..a2bd9c35c4593 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java @@ -43,6 +43,10 @@ public final class AutomationRuleTriggeringLogic { @JsonProperty(value = "conditions") private List conditions; + /** Creates an instance of AutomationRuleTriggeringLogic class. */ + public AutomationRuleTriggeringLogic() { + } + /** * Get the isEnabled property: Determines whether the automation rule is enabled or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java index 157bf09eeafd3..5a3125430eb84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java @@ -16,12 +16,14 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Gets the automation rule. @@ -29,14 +31,12 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -44,12 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Delete the automation rule. @@ -57,14 +59,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Gets all automation rules. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java index ca0dc3474b774..272b819532b79 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java @@ -24,6 +24,10 @@ public final class AutomationRulesList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AutomationRulesList class. */ + public AutomationRulesList() { + } + /** * Get the value property: The value property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java index 30665983543bf..c7333878de2f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java @@ -22,6 +22,10 @@ public final class Availability { @JsonProperty(value = "isPreview") private Boolean isPreview; + /** Creates an instance of Availability class. */ + public Availability() { + } + /** * Get the status property: The connector Availability Status. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java index 047f80cbc5a1a..4f5cf47b4120d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java @@ -13,6 +13,10 @@ @JsonTypeName("AmazonWebServicesCloudTrail") @Immutable public final class AwsCloudTrailCheckRequirements extends DataConnectorsCheckRequirements { + /** Creates an instance of AwsCloudTrailCheckRequirements class. */ + public AwsCloudTrailCheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java index 85fed62b4c137..bd6fabfc5678a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java @@ -22,6 +22,10 @@ public final class AwsCloudTrailDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsCloudTrailDataConnectorProperties innerProperties; + /** Creates an instance of AwsCloudTrailDataConnector class. */ + public AwsCloudTrailDataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services CloudTrail data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java index 019e54161be6d..0d072da4e805e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class AwsCloudTrailDataConnectorDataTypes { @JsonProperty(value = "logs", required = true) private AwsCloudTrailDataConnectorDataTypesLogs logs; + /** Creates an instance of AwsCloudTrailDataConnectorDataTypes class. */ + public AwsCloudTrailDataConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java index f11d9c72a1d9f..bb73c9450fe57 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsCloudTrailDataConnectorDataTypesLogs class. */ + public AwsCloudTrailDataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsCloudTrailDataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java index ddfb6f7d40c15..753b432fb0390 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java @@ -13,6 +13,10 @@ @JsonTypeName("AmazonWebServicesS3") @Immutable public final class AwsS3CheckRequirements extends DataConnectorsCheckRequirements { + /** Creates an instance of AwsS3CheckRequirements class. */ + public AwsS3CheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java index 3739b6ccb5232..65fcba2368f60 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java @@ -23,6 +23,10 @@ public final class AwsS3DataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsS3DataConnectorProperties innerProperties; + /** Creates an instance of AwsS3DataConnector class. */ + public AwsS3DataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services S3 data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java index 14c7a6754785f..18cc9658d41b6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class AwsS3DataConnectorDataTypes { @JsonProperty(value = "logs", required = true) private AwsS3DataConnectorDataTypesLogs logs; + /** Creates an instance of AwsS3DataConnectorDataTypes class. */ + public AwsS3DataConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java index dd24d8ad6de34..855fe6d5d57f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsS3DataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsS3DataConnectorDataTypesLogs class. */ + public AwsS3DataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsS3DataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java index 4c8ea02124614..c2929f76aa26f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java @@ -22,6 +22,10 @@ public final class AzureDevOpsResourceInfo { @JsonProperty(value = "serviceConnectionId") private String serviceConnectionId; + /** Creates an instance of AzureDevOpsResourceInfo class. */ + public AzureDevOpsResourceInfo() { + } + /** * Get the pipelineId property: Id of the pipeline created for the source-control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureEntityResource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureEntityResource.java new file mode 100644 index 0000000000000..f46f6971d29fc --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureEntityResource.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Entity Resource + * + *

The resource model definition for an Azure Resource Manager resource with an etag. + */ +@Immutable +public class AzureEntityResource extends ProxyResource { + /* + * Resource Etag. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of AzureEntityResource class. */ + public AzureEntityResource() { + } + + /** + * Get the etag property: Resource Etag. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java index 64b4871d5cf41..178ea6f4edd33 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.AzureResourceEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents an azure resource entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AzureResource") -@Fluent +@Immutable public final class AzureResourceEntity extends EntityInner { /* * AzureResource entity properties @@ -23,6 +23,10 @@ public final class AzureResourceEntity extends EntityInner { @JsonProperty(value = "properties") private AzureResourceEntityProperties innerProperties; + /** Creates an instance of AzureResourceEntity class. */ + public AzureResourceEntity() { + } + /** * Get the innerProperties property: AzureResource entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java index b46a2d88c95d1..69d5f83fc4e26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java @@ -23,6 +23,10 @@ public final class BookmarkEntityMappings { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of BookmarkEntityMappings class. */ + public BookmarkEntityMappings() { + } + /** * Get the entityType property: The entity type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java index ea70e05214484..c20dfc59bd11f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java @@ -30,6 +30,10 @@ public final class BookmarkExpandParameters { @JsonProperty(value = "startTime") private OffsetDateTime startTime; + /** Creates an instance of BookmarkExpandParameters class. */ + public BookmarkExpandParameters() { + } + /** * Get the endTime property: The end date filter, so the only expansion results returned are before this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java index b9b48339a131c..d0dd0a8b92952 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java @@ -24,6 +24,10 @@ public final class BookmarkExpandResponseValue { @JsonProperty(value = "edges") private List edges; + /** Creates an instance of BookmarkExpandResponseValue class. */ + public BookmarkExpandResponseValue() { + } + /** * Get the entities property: Array of the expansion result entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java index f89890b19242f..b718b92eea2f6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java @@ -25,6 +25,10 @@ public final class BookmarkList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of BookmarkList class. */ + public BookmarkList() { + } + /** * Get the nextLink property: URL to fetch the next set of bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java index cf54322f2c78d..510c32bc2a798 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java @@ -16,13 +16,18 @@ public interface BookmarkOperations { * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ - BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); + Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context); /** * Expand an bookmark. @@ -31,16 +36,11 @@ BookmarkExpandResponse expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); + BookmarkExpandResponse expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java index e1db491640d0e..e146bc88ea215 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java @@ -58,12 +58,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. + * @return a bookmark relation along with {@link Response}. */ - Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** * Gets a bookmark relation. @@ -72,14 +74,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. + * @return a bookmark relation. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Delete the bookmark relation. @@ -88,11 +88,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** * Delete the bookmark relation. @@ -101,14 +104,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Gets a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java index bfad411f1ce64..37689f545cfe2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java @@ -65,6 +65,10 @@ public final class BookmarkTimelineItem extends EntityTimelineItem { @JsonProperty(value = "labels") private List labels; + /** Creates an instance of BookmarkTimelineItem class. */ + public BookmarkTimelineItem() { + } + /** * Get the azureResourceId property: The bookmark azure resource id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java index 3b3706f36fd81..844d404d48478 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java @@ -41,12 +41,14 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ - Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -54,14 +56,12 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Delete the bookmark. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); /** * Gets a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java index be26717140de0..563c06bf65e06 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java @@ -20,6 +20,10 @@ public final class BooleanConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRuleBooleanCondition conditionProperties; + /** Creates an instance of BooleanConditionProperties class. */ + public BooleanConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java new file mode 100644 index 0000000000000..1e8768f358149 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Categories of recommendations. */ +public final class Category extends ExpandableStringEnum { + /** Static value Onboarding for Category. */ + public static final Category ONBOARDING = fromString("Onboarding"); + + /** Static value NewFeature for Category. */ + public static final Category NEW_FEATURE = fromString("NewFeature"); + + /** Static value SocEfficiency for Category. */ + public static final Category SOC_EFFICIENCY = fromString("SocEfficiency"); + + /** Static value CostOptimization for Category. */ + public static final Category COST_OPTIMIZATION = fromString("CostOptimization"); + + /** Static value Demo for Category. */ + public static final Category DEMO = fromString("Demo"); + + /** + * Creates a new instance of Category value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Category() { + } + + /** + * Creates or finds a Category from its string representation. + * + * @param name a name to look for. + * @return the corresponding Category. + */ + @JsonCreator + public static Category fromString(String name) { + return fromString(name, Category.class); + } + + /** + * Gets known Category values. + * + * @return known Category values. + */ + public static Collection values() { + return values(Category.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java index 9d6d5e61b586f..df99e16b4d4af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java @@ -35,6 +35,10 @@ public final class ClientInfo { @JsonProperty(value = "userPrincipalName") private String userPrincipalName; + /** Creates an instance of ClientInfo class. */ + public ClientInfo() { + } + /** * Get the email property: The email of the client. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java index 2d0908e927daf..ed15f6bcb5162 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.CloudApplicationEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a cloud application entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("CloudApplication") -@Fluent +@Immutable public final class CloudApplicationEntity extends EntityInner { /* * CloudApplication entity properties @@ -23,6 +23,10 @@ public final class CloudApplicationEntity extends EntityInner { @JsonProperty(value = "properties") private CloudApplicationEntityProperties innerProperties; + /** Creates an instance of CloudApplicationEntity class. */ + public CloudApplicationEntity() { + } + /** * Get the innerProperties property: CloudApplication entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java index 396d69282da38..5e61a7e1755c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java @@ -22,6 +22,10 @@ public final class CodelessApiPollingDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private ApiPollingParameters innerProperties; + /** Creates an instance of CodelessApiPollingDataConnector class. */ + public CodelessApiPollingDataConnector() { + } + /** * Get the innerProperties property: Codeless poling data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java index a9a781b14c946..5e07b5b9c84d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java @@ -89,6 +89,10 @@ public final class CodelessConnectorPollingAuthProperties { @JsonProperty(value = "scope") private String scope; + /** Creates an instance of CodelessConnectorPollingAuthProperties class. */ + public CodelessConnectorPollingAuthProperties() { + } + /** * Get the authType property: The authentication type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java index b1040c30de779..1c855a5070745 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java @@ -41,6 +41,10 @@ public final class CodelessConnectorPollingConfigProperties { @JsonProperty(value = "response") private CodelessConnectorPollingResponseProperties response; + /** Creates an instance of CodelessConnectorPollingConfigProperties class. */ + public CodelessConnectorPollingConfigProperties() { + } + /** * Get the isActive property: The poller active status. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java index a0d01a5af717c..ae569a83de31d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java @@ -65,6 +65,10 @@ public final class CodelessConnectorPollingPagingProperties { @JsonProperty(value = "pageSize") private Integer pageSize; + /** Creates an instance of CodelessConnectorPollingPagingProperties class. */ + public CodelessConnectorPollingPagingProperties() { + } + /** * Get the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java index cf4d6e8754b98..268b7ae718403 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java @@ -83,6 +83,10 @@ public final class CodelessConnectorPollingRequestProperties { @JsonProperty(value = "endTimeAttributeName") private String endTimeAttributeName; + /** Creates an instance of CodelessConnectorPollingRequestProperties class. */ + public CodelessConnectorPollingRequestProperties() { + } + /** * Get the apiEndpoint property: Describe the endpoint we should pull the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java index 561f409ee82f6..6418f41211f73 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java @@ -36,6 +36,10 @@ public final class CodelessConnectorPollingResponseProperties { @JsonProperty(value = "isGzipCompressed") private Boolean isGzipCompressed; + /** Creates an instance of CodelessConnectorPollingResponseProperties class. */ + public CodelessConnectorPollingResponseProperties() { + } + /** * Get the eventsJsonPaths property: Describes the path we should extract the data in the response. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java index bf0ae2f7d8b44..41d52e49929fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java @@ -84,6 +84,10 @@ public final class CodelessUiConnectorConfigProperties { @JsonProperty(value = "instructionSteps", required = true) private List instructionSteps; + /** Creates an instance of CodelessUiConnectorConfigProperties class. */ + public CodelessUiConnectorConfigProperties() { + } + /** * Get the title property: Connector blade title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java index c57fe3ddde438..324c9a5fdd6c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java @@ -10,6 +10,10 @@ /** The CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem extends ConnectivityCriteria { + /** Creates an instance of CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem class. */ + public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withType(ConnectivityType type) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java index 1f9a8f78eb43e..bc9304fa137a3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesDataTypesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesDataTypesItem extends LastDataReceivedDataType { + /** Creates an instance of CodelessUiConnectorConfigPropertiesDataTypesItem class. */ + public CodelessUiConnectorConfigPropertiesDataTypesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesDataTypesItem withName(String name) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java index 80ff447db0ad5..251488f8d6243 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesGraphQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesGraphQueriesItem extends GraphQueries { + /** Creates an instance of CodelessUiConnectorConfigPropertiesGraphQueriesItem class. */ + public CodelessUiConnectorConfigPropertiesGraphQueriesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesGraphQueriesItem withMetricName(String metricName) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java index 187727984833d..3116316916d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java @@ -10,6 +10,10 @@ /** The CodelessUiConnectorConfigPropertiesInstructionStepsItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesInstructionStepsItem extends InstructionSteps { + /** Creates an instance of CodelessUiConnectorConfigPropertiesInstructionStepsItem class. */ + public CodelessUiConnectorConfigPropertiesInstructionStepsItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesInstructionStepsItem withTitle(String title) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java index 288bd8d550f89..da94f59b943d7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesSampleQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesSampleQueriesItem extends SampleQueries { + /** Creates an instance of CodelessUiConnectorConfigPropertiesSampleQueriesItem class. */ + public CodelessUiConnectorConfigPropertiesSampleQueriesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesSampleQueriesItem withDescription(String description) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java index 06cd156687bbc..cbf0702a87089 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java @@ -22,6 +22,10 @@ public final class CodelessUiDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private CodelessParameters innerProperties; + /** Creates an instance of CodelessUiDataConnector class. */ + public CodelessUiDataConnector() { + } + /** * Get the innerProperties property: Codeless UI data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java index 2e471ac418a27..006e4ef77ecf2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java @@ -25,6 +25,15 @@ public final class ConditionType extends ExpandableStringEnum { /** Static value Boolean for ConditionType. */ public static final ConditionType BOOLEAN = fromString("Boolean"); + /** + * Creates a new instance of ConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConditionType() { + } + /** * Creates or finds a ConditionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java index 7e6818923a420..7613f93e6a8e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java @@ -19,6 +19,15 @@ public final class ConfidenceLevel extends ExpandableStringEnum /** Static value High for ConfidenceLevel. */ public static final ConfidenceLevel HIGH = fromString("High"); + /** + * Creates a new instance of ConfidenceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidenceLevel() { + } + /** * Creates or finds a ConfidenceLevel from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java index 1f8966323364a..aa7a871a1503c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java @@ -25,6 +25,15 @@ public final class ConfidenceScoreStatus extends ExpandableStringEnum /** Static value APIKey for ConnectAuthKind. */ public static final ConnectAuthKind APIKEY = fromString("APIKey"); + /** + * Creates a new instance of ConnectAuthKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectAuthKind() { + } + /** * Creates or finds a ConnectAuthKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java index 655facb3559ae..be350399547f0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java @@ -22,6 +22,10 @@ public final class ConnectedEntity { @JsonProperty(value = "additionalData") private Object additionalData; + /** Creates an instance of ConnectedEntity class. */ + public ConnectedEntity() { + } + /** * Get the targetEntityId property: Entity Id of the connected entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java index da5f0724d4220..32ad5919b97bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java @@ -23,6 +23,10 @@ public class ConnectivityCriteria { @JsonProperty(value = "value") private List value; + /** Creates an instance of ConnectivityCriteria class. */ + public ConnectivityCriteria() { + } + /** * Get the type property: type of connectivity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java index d3298e56cbd90..2332c7a93c3fa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java @@ -13,6 +13,15 @@ public final class ConnectivityType extends ExpandableStringEnum uninstallWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context); + + /** + * Uninstall a package from the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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. + */ + void uninstall(String resourceGroupName, String workspaceName, String packageId); + + /** + * Begins definition for a new PackageModel resource. + * + * @param name resource name. + * @return the first stage of the new PackageModel definition. + */ + PackageModel.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPackages.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPackages.java new file mode 100644 index 0000000000000..4e433250bd28a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPackages.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ContentPackages. */ +public interface ContentPackages { + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed packages as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all installed packages. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed packages as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an installed packages by its id along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, + String workspaceName, + String packageId, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); + + /** + * Gets an installed packages by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 an installed packages by its id. + */ + PackageModel get(String resourceGroupName, String workspaceName, String packageId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java index 55e4aa0cd259c..1a3480664e083 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java @@ -22,6 +22,10 @@ public final class ContentPathMap { @JsonProperty(value = "path") private String path; + /** Creates an instance of ContentPathMap class. */ + public ContentPathMap() { + } + /** * Get the contentType property: Content type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplateOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplateOperations.java new file mode 100644 index 0000000000000..203b2eff389de --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplateOperations.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ContentTemplateOperations. */ +public interface ContentTemplateOperations { + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template byt its identifier along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Gets a template byt its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template byt its identifier. + */ + TemplateModelAutoGenerated get(String resourceGroupName, String workspaceName, String templateId); + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Delete an installed template. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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. + */ + void delete(String resourceGroupName, String workspaceName, String templateId); + + /** + * Gets a template byt its identifier. + * + * @param id the 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 a template byt its identifier along with {@link Response}. + */ + TemplateModelAutoGenerated getById(String id); + + /** + * Gets a template byt its identifier. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template byt its identifier along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an installed template. + * + * @param id the 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. + */ + void deleteById(String id); + + /** + * Delete an installed template. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new TemplateModelAutoGenerated resource. + * + * @param name resource name. + * @return the first stage of the new TemplateModelAutoGenerated definition. + */ + TemplateModelAutoGenerated.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplates.java new file mode 100644 index 0000000000000..1fa7eb72e98c5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentTemplates.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ContentTemplates. */ +public interface ContentTemplates { + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all installed templates as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all installed templates. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all installed templates as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java index d9976250f875b..8249501a04920 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java @@ -16,6 +16,15 @@ public final class ContentType extends ExpandableStringEnum { /** Static value Workbook for ContentType. */ public static final ContentType WORKBOOK = fromString("Workbook"); + /** + * Creates a new instance of ContentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContentType() { + } + /** * Creates or finds a ContentType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java new file mode 100644 index 0000000000000..bb25525290bff --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Context of recommendation. */ +public final class Context extends ExpandableStringEnum { + /** Static value Analytics for Context. */ + public static final Context ANALYTICS = fromString("Analytics"); + + /** Static value Incidents for Context. */ + public static final Context INCIDENTS = fromString("Incidents"); + + /** Static value Overview for Context. */ + public static final Context OVERVIEW = fromString("Overview"); + + /** Static value None for Context. */ + public static final Context NONE = fromString("None"); + + /** + * Creates a new instance of Context value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Context() { + } + + /** + * Creates or finds a Context from its string representation. + * + * @param name a name to look for. + * @return the corresponding Context. + */ + @JsonCreator + public static Context fromString(String name) { + return fromString(name, Context.class); + } + + /** + * Gets known Context values. + * + * @return known Context values. + */ + public static Collection values() { + return values(Context.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java index 76169a7542b08..8a71f8d00b29c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java @@ -19,6 +19,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityCustomEntityQuery.class)}) @Fluent public class CustomEntityQuery extends ResourceWithEtag { + /** Creates an instance of CustomEntityQuery class. */ + public CustomEntityQuery() { + } + /** {@inheritDoc} */ @Override public CustomEntityQuery withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java index b0e8395c6c5ff..9ad30cad89cd3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java @@ -13,6 +13,15 @@ public final class CustomEntityQueryKind extends ExpandableStringEnum requestConfigUserInputValues; + /** Creates an instance of DataConnectorConnectBody class. */ + public DataConnectorConnectBody() { + } + /** * Get the kind property: The authentication kind used to poll the data. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java index 936cd58c91149..3c8f4bb2d8f76 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java @@ -17,6 +17,10 @@ public class DataConnectorDataTypeCommon { @JsonProperty(value = "state", required = true) private DataTypeState state; + /** Creates an instance of DataConnectorDataTypeCommon class. */ + public DataConnectorDataTypeCommon() { + } + /** * Get the state property: Describe whether this data type connection is enabled or not. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java index b140a12dfff79..fad570c897818 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java @@ -37,6 +37,10 @@ public final class DataConnectorKind extends ExpandableStringEnum value; + /** Creates an instance of DataConnectorList class. */ + public DataConnectorList() { + } + /** * Get the nextLink property: URL to fetch the next set of data connectors. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java index 36d4914ce98b3..518078c708dd1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java @@ -17,6 +17,10 @@ public class DataConnectorTenantId { @JsonProperty(value = "tenantId", required = true) private String tenantId; + /** Creates an instance of DataConnectorTenantId class. */ + public DataConnectorTenantId() { + } + /** * Get the tenantId property: The tenant id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java index e0bbbf5d03346..93fbfed69f7b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java @@ -16,6 +16,10 @@ public class DataConnectorWithAlertsProperties { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of DataConnectorWithAlertsProperties class. */ + public DataConnectorWithAlertsProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java index f80628152117b..28edd0d5c9f4f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java @@ -36,19 +36,6 @@ public interface DataConnectors { */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector 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 a data connector. - */ - DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -65,19 +52,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ - DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -100,16 +85,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -127,18 +115,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Connects a data connector. @@ -161,16 +147,18 @@ Response connectWithResponse( Context context); /** - * Disconnect a data connector. + * Connects a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); + void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); /** * Disconnect a data connector. @@ -186,4 +174,16 @@ Response connectWithResponse( */ Response disconnectWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + + /** + * Disconnect a data connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataConnectorId Connector 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. + */ + void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java index 57317f6ffc3c3..0ac49063f1782 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java @@ -29,6 +29,9 @@ @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmCheckRequirements.class), + @JsonSubTypes.Type( + name = "MicrosoftPurviewInformationProtection", + value = MicrosoftPurviewInformationProtectionCheckRequirements.class), @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectCheckRequirements.class), @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBICheckRequirements.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TICheckRequirements.class), @@ -37,6 +40,10 @@ }) @Immutable public class DataConnectorsCheckRequirements { + /** Creates an instance of DataConnectorsCheckRequirements class. */ + public DataConnectorsCheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java index 6524d59b35155..ba642ba0695fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java @@ -15,15 +15,17 @@ public interface DataConnectorsCheckRequirementsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @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 requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ - DataConnectorRequirementsState post( + Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context); /** * Get requirements state for a data connector type. @@ -31,15 +33,13 @@ DataConnectorRequirementsState post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @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 requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ - Response postWithResponse( + DataConnectorRequirementsState post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java index 419ceca405400..445def19bebcf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java @@ -16,6 +16,10 @@ public final class DataTypeDefinitions { @JsonProperty(value = "dataType") private String dataType; + /** Creates an instance of DataTypeDefinitions class. */ + public DataTypeDefinitions() { + } + /** * Get the dataType property: The data type name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java index f0851844c733a..e84f1e9d4f61d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java @@ -16,6 +16,15 @@ public final class DataTypeState extends ExpandableStringEnum { /** Static value Disabled for DataTypeState. */ public static final DataTypeState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of DataTypeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataTypeState() { + } + /** * Creates or finds a DataTypeState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java index f0501a0e1fbcb..0881b11bbc1cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java @@ -19,6 +19,15 @@ public final class DeleteStatus extends ExpandableStringEnum { /** Static value Unspecified for DeleteStatus. */ public static final DeleteStatus UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of DeleteStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeleteStatus() { + } + /** * Creates or finds a DeleteStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java index f500a22a553ec..481720e7baa7c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java @@ -41,6 +41,10 @@ public final class Deployment { @JsonProperty(value = "deploymentLogsUrl") private String deploymentLogsUrl; + /** Creates an instance of Deployment class. */ + public Deployment() { + } + /** * Get the deploymentId property: Deployment identifier. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java index 0cfc63e3b5a8a..c54e5010665ff 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java @@ -19,6 +19,15 @@ public final class DeploymentFetchStatus extends ExpandableStringEnum /** Static value Canceling for DeploymentState. */ public static final DeploymentState CANCELING = fromString("Canceling"); + /** + * Creates a new instance of DeploymentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentState() { + } + /** * Creates or finds a DeploymentState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java index 2a78da582b0bb..181296bc81544 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java @@ -22,6 +22,15 @@ public final class DeviceImportance extends ExpandableStringEnum getWithResponse(String resourceGroupName, String domain, Context context); /** * Get whois information for a single domain name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @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 whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ - Response getWithResponse(String resourceGroupName, String domain, Context context); + EnrichmentDomainWhois get(String resourceGroupName, String domain); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java index eaa3c125f5675..49d592d4defa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java @@ -21,6 +21,10 @@ public final class Dynamics365CheckRequirements extends DataConnectorsCheckRequi @JsonProperty(value = "properties") private Dynamics365CheckRequirementsProperties innerProperties; + /** Creates an instance of Dynamics365CheckRequirements class. */ + public Dynamics365CheckRequirements() { + } + /** * Get the innerProperties property: Dynamics365 requirements check properties. * @@ -30,6 +34,29 @@ private Dynamics365CheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the Dynamics365CheckRequirements object itself. + */ + public Dynamics365CheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Dynamics365CheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java index 653d886600c33..5ad9d53bce116 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java @@ -22,6 +22,10 @@ public final class Dynamics365DataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private Dynamics365DataConnectorProperties innerProperties; + /** Creates an instance of Dynamics365DataConnector class. */ + public Dynamics365DataConnector() { + } + /** * Get the innerProperties property: Dynamics365 data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java index 0df0a2723965f..e85f4ef27e118 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class Dynamics365DataConnectorDataTypes { @JsonProperty(value = "dynamics365CdsActivities", required = true) private Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities; + /** Creates an instance of Dynamics365DataConnectorDataTypes class. */ + public Dynamics365DataConnectorDataTypes() { + } + /** * Get the dynamics365CdsActivities property: Common Data Service data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java index d1ed289fd67c8..779c712378411 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java @@ -9,6 +9,10 @@ /** Common Data Service data type connection. */ @Fluent public final class Dynamics365DataConnectorDataTypesDynamics365CdsActivities extends DataConnectorDataTypeCommon { + /** Creates an instance of Dynamics365DataConnectorDataTypesDynamics365CdsActivities class. */ + public Dynamics365DataConnectorDataTypesDynamics365CdsActivities() { + } + /** {@inheritDoc} */ @Override public Dynamics365DataConnectorDataTypesDynamics365CdsActivities withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java index d75c0f24e472b..c49d22318903d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java @@ -71,6 +71,10 @@ public final class EnrichmentDomainWhoisContact { @JsonProperty(value = "email") private String email; + /** Creates an instance of EnrichmentDomainWhoisContact class. */ + public EnrichmentDomainWhoisContact() { + } + /** * Get the name property: The name of this contact. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java index 869d7a774b30f..b7531a9759b21 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java @@ -34,6 +34,10 @@ public final class EnrichmentDomainWhoisContacts { @JsonProperty(value = "tech") private EnrichmentDomainWhoisContact tech; + /** Creates an instance of EnrichmentDomainWhoisContacts class. */ + public EnrichmentDomainWhoisContacts() { + } + /** * Get the admin property: The admin contact for this whois record. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java index 7a22dff870a65..75a8b2a8017d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java @@ -35,6 +35,10 @@ public final class EnrichmentDomainWhoisDetails { @JsonProperty(value = "statuses") private List statuses; + /** Creates an instance of EnrichmentDomainWhoisDetails class. */ + public EnrichmentDomainWhoisDetails() { + } + /** * Get the registrar property: The registrar associated with this domain. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java index 545f2a28b66bb..3fe8745eb42de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java @@ -46,6 +46,10 @@ public final class EnrichmentDomainWhoisRegistrarDetails { @JsonProperty(value = "whoisServer") private String whoisServer; + /** Creates an instance of EnrichmentDomainWhoisRegistrarDetails class. */ + public EnrichmentDomainWhoisRegistrarDetails() { + } + /** * Get the name property: The name of this registrar. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java index 182172f2a926e..72b46b850f728 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java @@ -11,42 +11,61 @@ /** Resource collection API of Entities. */ public interface Entities { /** - * Gets all entities. + * Triggers playbook on a specific entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @param requestBody Describes the request body for triggering a playbook on an entity. + * @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 all entities as paginated response with {@link PagedIterable}. + * @return the {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String entityIdentifier, + EntityManualTriggerRequestBody requestBody, + Context context); + + /** + * Triggers playbook on a specific entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityIdentifier Entity identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void runPlaybook(String resourceGroupName, String workspaceName, String entityIdentifier); /** * Gets all entities. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all entities as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets an entity. + * Gets all entities. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param entityId entity ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. + * @return all entities as paginated response with {@link PagedIterable}. */ - Entity get(String resourceGroupName, String workspaceName, String entityId); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Gets an entity. @@ -63,19 +82,17 @@ public interface Entities { Response getWithResponse(String resourceGroupName, String workspaceName, String entityId, Context context); /** - * Expands an entity. + * Gets an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return an entity. */ - EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); + Entity get(String resourceGroupName, String workspaceName, String entityId); /** * Expands an entity. @@ -98,19 +115,19 @@ Response expandWithResponse( Context context); /** - * Get Insights and Activities for an entity. + * Expands an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param kind The Kind parameter for queries. + * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. + * @return the entity expansion result operation response. */ - GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); + EntityExpandResponse expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); /** * Get Insights and Activities for an entity. @@ -129,19 +146,19 @@ Response queriesWithResponse( String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); /** - * Execute Insights for an entity. + * Get Insights and Activities for an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. + * @param kind The Kind parameter for queries. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return insights and Activities for an entity. */ - EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); + GetQueriesResponse queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); /** * Execute Insights for an entity. @@ -162,4 +179,19 @@ Response getInsightsWithResponse( String entityId, EntityGetInsightsParameters parameters, Context context); + + /** + * Execute Insights for an entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityId entity ID. + * @param parameters The parameters required to execute insights on the given entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Get Insights result operation response. + */ + EntityGetInsightsResponse getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java index 29a184b1bde33..faac913312c82 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java @@ -16,13 +16,18 @@ public interface EntitiesGetTimelines { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ - EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); + Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context); /** * Timeline for an entity. @@ -31,16 +36,11 @@ EntityTimelineResponse list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); + EntityTimelineResponse list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java index 7ebdadd6fc3c6..7d596084948ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java @@ -23,6 +23,10 @@ public final class EntityAnalytics extends SettingsInner { @JsonProperty(value = "properties") private EntityAnalyticsProperties innerProperties; + /** Creates an instance of EntityAnalytics class. */ + public EntityAnalytics() { + } + /** * Get the innerProperties property: EntityAnalytics properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java index 49d3c8f895a19..5252752f3fb19 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java @@ -26,6 +26,10 @@ public class EntityCommonProperties { @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; + /** Creates an instance of EntityCommonProperties class. */ + public EntityCommonProperties() { + } + /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java index e925912285ebb..92eb022c689d9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java @@ -25,6 +25,10 @@ public final class EntityEdges { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map additionalData; + /** Creates an instance of EntityEdges class. */ + public EntityEdges() { + } + /** * Get the targetEntityId property: The target entity Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java index 8d0d6ec6ebdcf..d577a3d079d72 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java @@ -30,6 +30,10 @@ public final class EntityExpandParameters { @JsonProperty(value = "startTime") private OffsetDateTime startTime; + /** Creates an instance of EntityExpandParameters class. */ + public EntityExpandParameters() { + } + /** * Get the endTime property: The end date filter, so the only expansion results returned are before this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java index f8558de18c341..839192828e368 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java @@ -24,6 +24,10 @@ public final class EntityExpandResponseValue { @JsonProperty(value = "edges") private List edges; + /** Creates an instance of EntityExpandResponseValue class. */ + public EntityExpandResponseValue() { + } + /** * Get the entities property: Array of the expansion result entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java index 0d26828407936..7c6b4b3ae1360 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java @@ -22,6 +22,10 @@ public final class EntityFieldMapping { @JsonProperty(value = "value") private String value; + /** Creates an instance of EntityFieldMapping class. */ + public EntityFieldMapping() { + } + /** * Get the identifier property: Alert V3 identifier. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java index 04a3e0d4c5303..23167eecede9e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java @@ -38,6 +38,10 @@ public final class EntityGetInsightsParameters { @JsonProperty(value = "insightQueryIds") private List insightQueryIds; + /** Creates an instance of EntityGetInsightsParameters class. */ + public EntityGetInsightsParameters() { + } + /** * Get the startTime property: The start timeline date, so the results returned are after this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java index 15d19b7473a95..6fd53f2bd08d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java @@ -35,6 +35,10 @@ public final class EntityInsightItem { @JsonProperty(value = "chartQueryResults") private List chartQueryResults; + /** Creates an instance of EntityInsightItem class. */ + public EntityInsightItem() { + } + /** * Get the queryId property: The query id of the insight. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java index e04c157d5dc66..a2e6328b624bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java @@ -23,6 +23,10 @@ public final class EntityInsightItemQueryTimeInterval { @JsonProperty(value = "endTime") private OffsetDateTime endTime; + /** Creates an instance of EntityInsightItemQueryTimeInterval class. */ + public EntityInsightItemQueryTimeInterval() { + } + /** * Get the startTime property: Insight query start time. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java index 3759170c00e3b..cb0816389a7ff 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java @@ -13,6 +13,15 @@ public final class EntityItemQueryKind extends ExpandableStringEnum { - /** Static value Account for EntityKind. */ - public static final EntityKind ACCOUNT = fromString("Account"); - - /** Static value Host for EntityKind. */ - public static final EntityKind HOST = fromString("Host"); - - /** Static value File for EntityKind. */ - public static final EntityKind FILE = fromString("File"); - - /** Static value AzureResource for EntityKind. */ - public static final EntityKind AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value CloudApplication for EntityKind. */ - public static final EntityKind CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DnsResolution for EntityKind. */ - public static final EntityKind DNS_RESOLUTION = fromString("DnsResolution"); - - /** Static value FileHash for EntityKind. */ - public static final EntityKind FILE_HASH = fromString("FileHash"); - - /** Static value Ip for EntityKind. */ - public static final EntityKind IP = fromString("Ip"); - - /** Static value Malware for EntityKind. */ - public static final EntityKind MALWARE = fromString("Malware"); - - /** Static value Process for EntityKind. */ - public static final EntityKind PROCESS = fromString("Process"); - - /** Static value RegistryKey for EntityKind. */ - public static final EntityKind REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityKind. */ - public static final EntityKind REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityKind. */ - public static final EntityKind SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value Url for EntityKind. */ - public static final EntityKind URL = fromString("Url"); - - /** Static value IoTDevice for EntityKind. */ - public static final EntityKind IO_TDEVICE = fromString("IoTDevice"); - - /** Static value SecurityAlert for EntityKind. */ - public static final EntityKind SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value Bookmark for EntityKind. */ - public static final EntityKind BOOKMARK = fromString("Bookmark"); - - /** Static value MailCluster for EntityKind. */ - public static final EntityKind MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityKind. */ - public static final EntityKind MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value Mailbox for EntityKind. */ - public static final EntityKind MAILBOX = fromString("Mailbox"); - - /** Static value SubmissionMail for EntityKind. */ - public static final EntityKind SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** Static value Nic for EntityKind. */ - public static final EntityKind NIC = fromString("Nic"); - - /** - * Creates or finds a EntityKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityKind. - */ - @JsonCreator - public static EntityKind fromString(String name) { - return fromString(name, EntityKind.class); - } - - /** - * Gets known EntityKind values. - * - * @return known EntityKind values. - */ - public static Collection values() { - return values(EntityKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java new file mode 100644 index 0000000000000..8dc75eb96ecf9 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of the entity. */ +public final class EntityKindEnum extends ExpandableStringEnum { + /** Static value Account for EntityKindEnum. */ + public static final EntityKindEnum ACCOUNT = fromString("Account"); + + /** Static value Host for EntityKindEnum. */ + public static final EntityKindEnum HOST = fromString("Host"); + + /** Static value File for EntityKindEnum. */ + public static final EntityKindEnum FILE = fromString("File"); + + /** Static value AzureResource for EntityKindEnum. */ + public static final EntityKindEnum AZURE_RESOURCE = fromString("AzureResource"); + + /** Static value CloudApplication for EntityKindEnum. */ + public static final EntityKindEnum CLOUD_APPLICATION = fromString("CloudApplication"); + + /** Static value DnsResolution for EntityKindEnum. */ + public static final EntityKindEnum DNS_RESOLUTION = fromString("DnsResolution"); + + /** Static value FileHash for EntityKindEnum. */ + public static final EntityKindEnum FILE_HASH = fromString("FileHash"); + + /** Static value Ip for EntityKindEnum. */ + public static final EntityKindEnum IP = fromString("Ip"); + + /** Static value Malware for EntityKindEnum. */ + public static final EntityKindEnum MALWARE = fromString("Malware"); + + /** Static value Process for EntityKindEnum. */ + public static final EntityKindEnum PROCESS = fromString("Process"); + + /** Static value RegistryKey for EntityKindEnum. */ + public static final EntityKindEnum REGISTRY_KEY = fromString("RegistryKey"); + + /** Static value RegistryValue for EntityKindEnum. */ + public static final EntityKindEnum REGISTRY_VALUE = fromString("RegistryValue"); + + /** Static value SecurityGroup for EntityKindEnum. */ + public static final EntityKindEnum SECURITY_GROUP = fromString("SecurityGroup"); + + /** Static value Url for EntityKindEnum. */ + public static final EntityKindEnum URL = fromString("Url"); + + /** Static value IoTDevice for EntityKindEnum. */ + public static final EntityKindEnum IO_TDEVICE = fromString("IoTDevice"); + + /** Static value SecurityAlert for EntityKindEnum. */ + public static final EntityKindEnum SECURITY_ALERT = fromString("SecurityAlert"); + + /** Static value Bookmark for EntityKindEnum. */ + public static final EntityKindEnum BOOKMARK = fromString("Bookmark"); + + /** Static value MailCluster for EntityKindEnum. */ + public static final EntityKindEnum MAIL_CLUSTER = fromString("MailCluster"); + + /** Static value MailMessage for EntityKindEnum. */ + public static final EntityKindEnum MAIL_MESSAGE = fromString("MailMessage"); + + /** Static value Mailbox for EntityKindEnum. */ + public static final EntityKindEnum MAILBOX = fromString("Mailbox"); + + /** Static value SubmissionMail for EntityKindEnum. */ + public static final EntityKindEnum SUBMISSION_MAIL = fromString("SubmissionMail"); + + /** Static value Nic for EntityKindEnum. */ + public static final EntityKindEnum NIC = fromString("Nic"); + + /** + * Creates a new instance of EntityKindEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityKindEnum() { + } + + /** + * Creates or finds a EntityKindEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding EntityKindEnum. + */ + @JsonCreator + public static EntityKindEnum fromString(String name) { + return fromString(name, EntityKindEnum.class); + } + + /** + * Gets known EntityKindEnum values. + * + * @return known EntityKindEnum values. + */ + public static Collection values() { + return values(EntityKindEnum.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java index 0e160998fea52..04067d516bde4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java @@ -25,6 +25,10 @@ public final class EntityList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of EntityList class. */ + public EntityList() { + } + /** * Get the nextLink property: URL to fetch the next set of entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityManualTriggerRequestBody.java new file mode 100644 index 0000000000000..5ccf504697387 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityManualTriggerRequestBody.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** Describes the request body for triggering a playbook on an entity. */ +@Fluent +public final class EntityManualTriggerRequestBody { + /* + * Incident ARM id. + */ + @JsonProperty(value = "incidentArmId") + private String incidentArmId; + + /* + * The tenant id of the playbook resource. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /* + * The resource id of the playbook resource. + */ + @JsonProperty(value = "logicAppsResourceId", required = true) + private String logicAppsResourceId; + + /** Creates an instance of EntityManualTriggerRequestBody class. */ + public EntityManualTriggerRequestBody() { + } + + /** + * Get the incidentArmId property: Incident ARM id. + * + * @return the incidentArmId value. + */ + public String incidentArmId() { + return this.incidentArmId; + } + + /** + * Set the incidentArmId property: Incident ARM id. + * + * @param incidentArmId the incidentArmId value to set. + * @return the EntityManualTriggerRequestBody object itself. + */ + public EntityManualTriggerRequestBody withIncidentArmId(String incidentArmId) { + this.incidentArmId = incidentArmId; + return this; + } + + /** + * Get the tenantId property: The tenant id of the playbook resource. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant id of the playbook resource. + * + * @param tenantId the tenantId value to set. + * @return the EntityManualTriggerRequestBody object itself. + */ + public EntityManualTriggerRequestBody withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the logicAppsResourceId property: The resource id of the playbook resource. + * + * @return the logicAppsResourceId value. + */ + public String logicAppsResourceId() { + return this.logicAppsResourceId; + } + + /** + * Set the logicAppsResourceId property: The resource id of the playbook resource. + * + * @param logicAppsResourceId the logicAppsResourceId value to set. + * @return the EntityManualTriggerRequestBody object itself. + */ + public EntityManualTriggerRequestBody withLogicAppsResourceId(String logicAppsResourceId) { + this.logicAppsResourceId = logicAppsResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logicAppsResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logicAppsResourceId in model EntityManualTriggerRequestBody")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EntityManualTriggerRequestBody.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java index b5081a9937a3f..f0fb60fa302b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java @@ -23,6 +23,10 @@ public final class EntityMapping { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of EntityMapping class. */ + public EntityMapping() { + } + /** * Get the entityType property: The V3 type of the mapped entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java index 5d33cc2b87a47..449a0fa75e2a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java @@ -64,6 +64,15 @@ public final class EntityMappingType extends ExpandableStringEnum /** Static value AzureActiveDirectory for EntityProviders. */ public static final EntityProviders AZURE_ACTIVE_DIRECTORY = fromString("AzureActiveDirectory"); + /** + * Creates a new instance of EntityProviders value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityProviders() { + } + /** * Creates or finds a EntityProviders from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java index d0f22a8e74b05..eafaf93054836 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java @@ -37,19 +37,6 @@ public interface EntityQueries { PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query 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 an entity query. - */ - EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); - /** * Gets an entity query. * @@ -66,19 +53,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); /** - * Creates or updates the entity query. + * Gets an entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return an entity query. */ - EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); + EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); /** * Creates or updates the entity query. @@ -101,16 +86,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the entity query. + * Creates or updates the entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific entity query. */ - void delete(String resourceGroupName, String workspaceName, String entityQueryId); + EntityQuery createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); /** * Delete the entity query. @@ -126,4 +114,16 @@ Response createOrUpdateWithResponse( */ Response deleteWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); + + /** + * Delete the entity query. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityQueryId entity query 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. + */ + void delete(String resourceGroupName, String workspaceName, String entityQueryId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java index 9af86d0f151c2..7c26b4207a89b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java @@ -16,6 +16,15 @@ public final class EntityQueriesKind extends ExpandableStringEnum /** Static value Activity for EntityQueryKind. */ public static final EntityQueryKind ACTIVITY = fromString("Activity"); + /** + * Creates a new instance of EntityQueryKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityQueryKind() { + } + /** * Creates or finds a EntityQueryKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java index 28db9eb064609..6c4c8f1653b64 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java @@ -25,6 +25,10 @@ public final class EntityQueryList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of EntityQueryList class. */ + public EntityQueryList() { + } + /** * Get the nextLink property: URL to fetch the next set of entity queries. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java index 21ce0db46791c..b6a36d38e2259 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java @@ -13,6 +13,15 @@ public final class EntityQueryTemplateKind extends ExpandableStringEnum value; + /** Creates an instance of EntityQueryTemplateList class. */ + public EntityQueryTemplateList() { + } + /** * Get the nextLink property: URL to fetch the next set of entity query templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java index 4bddc9d19d913..2bfbc6b20ca04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java @@ -35,7 +35,7 @@ public interface EntityQueryTemplates { * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); + String resourceGroupName, String workspaceName, Constant99 kind, Context context); /** * Gets an entity query. @@ -43,12 +43,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ - EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); /** * Gets an entity query. @@ -56,12 +58,10 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); + EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java index 28d08ca8e2716..0ce15bc7a8edf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java @@ -16,12 +16,14 @@ public interface EntityRelations { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ - Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); + Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); /** * Gets an entity relation. @@ -30,12 +32,10 @@ public interface EntityRelations { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); + Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java index fff8bc9123109..e366cf19eccd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java @@ -24,6 +24,10 @@ }) @Immutable public class EntityTimelineItem { + /** Creates an instance of EntityTimelineItem class. */ + public EntityTimelineItem() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java index e5a502f1acfb8..98cadce02de36 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java @@ -22,6 +22,15 @@ public final class EntityTimelineKind extends ExpandableStringEnum { /** Static value Nic for EntityType. */ public static final EntityType NIC = fromString("Nic"); + /** + * Creates a new instance of EntityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityType() { + } + /** * Creates or finds a EntityType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java index 8849d5c4a7b91..6e0980e896b95 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java @@ -16,6 +16,15 @@ public final class EventGroupingAggregationKind extends ExpandableStringEnum aggregations; + /** Creates an instance of ExpansionResultsMetadata class. */ + public ExpansionResultsMetadata() { + } + /** * Get the aggregations property: Information of the aggregated nodes in the expansion result. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java index 05d0db1cba993..9e804778c4f86 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java @@ -22,6 +22,10 @@ public final class EyesOn extends SettingsInner { @JsonProperty(value = "properties") private EyesOnSettingsProperties innerProperties; + /** Creates an instance of EyesOn class. */ + public EyesOn() { + } + /** * Get the innerProperties property: EyesOn properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java index d01e4fca5f25b..218cfb57f5d25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java @@ -22,6 +22,10 @@ public final class FieldMapping { @JsonProperty(value = "columnName") private String columnName; + /** Creates an instance of FieldMapping class. */ + public FieldMapping() { + } + /** * Get the identifier property: the V3 identifier of the entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java index 7cfc51143dbb1..6d0cb7f7b9d84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a file entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("File") -@Fluent +@Immutable public final class FileEntity extends EntityInner { /* * File entity properties @@ -24,6 +24,10 @@ public final class FileEntity extends EntityInner { @JsonProperty(value = "properties") private FileEntityProperties innerProperties; + /** Creates an instance of FileEntity class. */ + public FileEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java index b75ccaba87f1d..2e53a0ca367f3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java @@ -19,6 +19,15 @@ public final class FileFormat extends ExpandableStringEnum { /** Static value Unspecified for FileFormat. */ public static final FileFormat UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of FileFormat value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FileFormat() { + } + /** * Creates or finds a FileFormat from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java index 60f2e72f165e0..71548df30f7a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java @@ -25,6 +25,15 @@ public final class FileHashAlgorithm extends ExpandableStringEnum value; + /** Creates an instance of FileImportList class. */ + public FileImportList() { + } + /** * Get the nextLink property: URL to fetch the next set of file imports. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java index 865e69307352d..21ec46620540a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java @@ -31,6 +31,15 @@ public final class FileImportState extends ExpandableStringEnum /** Static value Unspecified for FileImportState. */ public static final FileImportState UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of FileImportState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FileImportState() { + } + /** * Creates or finds a FileImportState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java index ae0a2d6348d24..2d077559c476a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java @@ -54,12 +54,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ - FileImport get(String resourceGroupName, String workspaceName, String fileImportId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context); /** * Gets a file import. @@ -67,14 +69,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); + FileImport get(String resourceGroupName, String workspaceName, String fileImportId); /** * Delete the file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java index 39027c4f608c9..2f7e6eae298dc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java @@ -40,6 +40,10 @@ public final class FileMetadata { @JsonProperty(value = "deleteStatus", access = JsonProperty.Access.WRITE_ONLY) private DeleteStatus deleteStatus; + /** Creates an instance of FileMetadata class. */ + public FileMetadata() { + } + /** * Get the fileFormat property: The format of the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Flag.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Flag.java new file mode 100644 index 0000000000000..b4a65450a82e0 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Flag.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The boolean value the metadata is for. */ +public final class Flag extends ExpandableStringEnum { + /** Static value true for Flag. */ + public static final Flag TRUE = fromString("true"); + + /** Static value false for Flag. */ + public static final Flag FALSE = fromString("false"); + + /** + * Creates a new instance of Flag value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Flag() { + } + + /** + * Creates or finds a Flag from its string representation. + * + * @param name a name to look for. + * @return the corresponding Flag. + */ + @JsonCreator + public static Flag fromString(String name) { + return fromString(name, Flag.class); + } + + /** + * Gets known Flag values. + * + * @return known Flag values. + */ + public static Collection values() { + return values(Flag.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java index 792e517d8d108..e4da3b1c6f151 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java @@ -24,6 +24,10 @@ public final class FusionAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private FusionAlertRuleProperties innerProperties; + /** Creates an instance of FusionAlertRule class. */ + public FusionAlertRule() { + } + /** * Get the innerProperties property: Fusion alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java index ce4da38707f03..e8d4cfadb18d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class FusionAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private FusionAlertRuleTemplateProperties innerProperties; + /** Creates an instance of FusionAlertRuleTemplate class. */ + public FusionAlertRuleTemplate() { + } + /** * Get the innerProperties property: Fusion alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java index 018fafeb72565..d842490715ceb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java @@ -23,6 +23,10 @@ public final class FusionScenarioExclusionPattern { @JsonProperty(value = "dateAddedInUTC", required = true) private String dateAddedInUtc; + /** Creates an instance of FusionScenarioExclusionPattern class. */ + public FusionScenarioExclusionPattern() { + } + /** * Get the exclusionPattern property: Scenario exclusion pattern. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java index e551140636d87..12e0f1644634f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java @@ -30,6 +30,10 @@ public final class FusionSourceSettings { @JsonProperty(value = "sourceSubTypes") private List sourceSubTypes; + /** Creates an instance of FusionSourceSettings class. */ + public FusionSourceSettings() { + } + /** * Get the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java index cdf5cd5f92699..7c45ee6c6e36d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java @@ -36,6 +36,10 @@ public final class FusionSourceSubTypeSetting { @JsonProperty(value = "severityFilters", required = true) private FusionSubTypeSeverityFilter severityFilters; + /** Creates an instance of FusionSourceSubTypeSetting class. */ + public FusionSourceSubTypeSetting() { + } + /** * Get the enabled property: Determines whether this source subtype under source signal is enabled or disabled in * Fusion detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java index c6ae35c723373..8f7925947c211 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java @@ -23,6 +23,10 @@ public final class FusionSubTypeSeverityFilter { @JsonProperty(value = "filters") private List filters; + /** Creates an instance of FusionSubTypeSeverityFilter class. */ + public FusionSubTypeSeverityFilter() { + } + /** * Get the isSupported property: Determines whether this source subtype supports severity configuration or not. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java index 0892d2a463238..f1c43ed81d153 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java @@ -23,6 +23,10 @@ public final class FusionSubTypeSeverityFiltersItem { @JsonProperty(value = "enabled", required = true) private boolean enabled; + /** Creates an instance of FusionSubTypeSeverityFiltersItem class. */ + public FusionSubTypeSeverityFiltersItem() { + } + /** * Get the severity property: The Severity for a given source subtype consumed in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java index 1f2111a56b48d..985a2b1a32ca5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java @@ -24,6 +24,10 @@ public final class FusionTemplateSourceSetting { @JsonProperty(value = "sourceSubTypes") private List sourceSubTypes; + /** Creates an instance of FusionTemplateSourceSetting class. */ + public FusionTemplateSourceSetting() { + } + /** * Get the sourceName property: The name of a source signal consumed in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java index 89bfdf241a525..ddbbf8b4bcc5b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java @@ -29,6 +29,10 @@ public final class FusionTemplateSourceSubType { @JsonProperty(value = "severityFilter", required = true) private FusionTemplateSubTypeSeverityFilter severityFilter; + /** Creates an instance of FusionTemplateSourceSubType class. */ + public FusionTemplateSourceSubType() { + } + /** * Get the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion * detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java index ef8388621d5ae..da2fa6c2ba1fe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java @@ -23,6 +23,10 @@ public final class FusionTemplateSubTypeSeverityFilter { @JsonProperty(value = "severityFilters") private List severityFilters; + /** Creates an instance of FusionTemplateSubTypeSeverityFilter class. */ + public FusionTemplateSubTypeSeverityFilter() { + } + /** * Get the isSupported property: Determines whether severity configuration is supported for this source subtype * consumed in Fusion detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java index 675f38adbbe96..5f7e0a8e0b868 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java @@ -56,6 +56,10 @@ public final class GeoLocation { @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; + /** Creates an instance of GeoLocation class. */ + public GeoLocation() { + } + /** * Get the asn property: Autonomous System Number. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java index cc444f69cd21e..68a5c001b06e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java @@ -13,6 +13,15 @@ public final class GetInsightsError extends ExpandableStringEnum errors; + /** Creates an instance of GetInsightsResultsMetadata class. */ + public GetInsightsResultsMetadata() { + } + /** * Get the totalCount property: the total items found for the insights request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java new file mode 100644 index 0000000000000..1d7f635c9a558 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of GetRecommendations. */ +public interface GetRecommendations { + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + RecommendationList list(String resourceGroupName, String workspaceName); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java new file mode 100644 index 0000000000000..59fc55dba4639 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of GetTriggeredAnalyticsRuleRuns. */ +public interface GetTriggeredAnalyticsRuleRuns { + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java new file mode 100644 index 0000000000000..39e36a2d4bf2b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.UUID; + +/** Resource collection API of Gets. */ +public interface Gets { + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response}. + */ + Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context); + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation 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 a recommendation by its id. + */ + Recommendation singleRecommendation(String resourceGroupName, String workspaceName, UUID recommendationId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java index 07ee2d932d262..f3f8fe110c3db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java @@ -16,6 +16,10 @@ public final class GitHubResourceInfo { @JsonProperty(value = "appInstallationId") private String appInstallationId; + /** Creates an instance of GitHubResourceInfo class. */ + public GitHubResourceInfo() { + } + /** * Get the appInstallationId property: GitHub application installation id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java index a0f7e3b56450f..5085def4d731a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java @@ -28,6 +28,10 @@ public class GraphQueries { @JsonProperty(value = "baseQuery") private String baseQuery; + /** Creates an instance of GraphQueries class. */ + public GraphQueries() { + } + /** * Get the metricName property: the metric that the query is checking. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java index c6a5e97fd9ca9..4bdfe6f016886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java @@ -58,6 +58,10 @@ public final class GroupingConfiguration { @JsonProperty(value = "groupByCustomDetails") private List groupByCustomDetails; + /** Creates an instance of GroupingConfiguration class. */ + public GroupingConfiguration() { + } + /** * Get the enabled property: Grouping enabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java index 08e75c45b2b33..7c681299dd38e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java @@ -23,6 +23,10 @@ public final class HostEntity extends EntityInner { @JsonProperty(value = "properties") private HostEntityProperties innerProperties; + /** Creates an instance of HostEntity class. */ + public HostEntity() { + } + /** * Get the innerProperties property: Host entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java index 3ea294c0b3b58..33239610c7970 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java @@ -25,6 +25,10 @@ public final class HuntingBookmark extends EntityInner { @JsonProperty(value = "properties") private HuntingBookmarkProperties innerProperties; + /** Creates an instance of HuntingBookmark class. */ + public HuntingBookmark() { + } + /** * Get the innerProperties property: HuntingBookmark entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java index 2d051e853f0fc..c095187c68277 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java @@ -50,67 +50,60 @@ public interface Incident { SystemData systemData(); /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. + * Gets the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - IncidentClassification classification(); + String title(); /** - * Gets the classificationComment property: Describes the reason the incident was closed. + * Gets the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - String classificationComment(); + String description(); /** - * Gets the classificationReason property: The classification reason the incident was closed with. + * Gets the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - IncidentClassificationReason classificationReason(); + IncidentSeverity severity(); /** - * Gets the createdTimeUtc property: The time the incident was created. + * Gets the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - OffsetDateTime createdTimeUtc(); + IncidentStatus status(); /** - * Gets the description property: The description of the incident. + * Gets the classification property: The reason the incident was closed. * - * @return the description value. + * @return the classification value. */ - String description(); + IncidentClassification classification(); /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. + * Gets the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - OffsetDateTime firstActivityTimeUtc(); + IncidentClassificationReason classificationReason(); /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. + * Gets the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - String incidentUrl(); + String classificationComment(); /** - * Gets the incidentNumber property: A sequential number. + * Gets the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @return the owner value. */ - Integer incidentNumber(); + IncidentOwnerInfo owner(); /** * Gets the labels property: List of labels relevant to this incident. @@ -120,18 +113,11 @@ public interface Incident { List labels(); /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. + * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - String providerIncidentId(); + OffsetDateTime firstActivityTimeUtc(); /** * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. @@ -148,11 +134,25 @@ public interface Incident { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the owner property: Describes a user that the incident is assigned to. + * Gets the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - IncidentOwnerInfo owner(); + OffsetDateTime createdTimeUtc(); + + /** + * Gets the incidentNumber property: A sequential number. + * + * @return the incidentNumber value. + */ + Integer incidentNumber(); + + /** + * Gets the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + IncidentAdditionalData additionalData(); /** * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. @@ -162,32 +162,32 @@ public interface Incident { List relatedAnalyticRuleIds(); /** - * Gets the severity property: The severity of the incident. + * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - IncidentSeverity severity(); + String incidentUrl(); /** - * Gets the status property: The status of the incident. + * Gets the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @return the providerName value. */ - IncidentStatus status(); + String providerName(); /** - * Gets the teamInformation property: Describes a team for the incident. + * Gets the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the teamInformation value. + * @return the providerIncidentId value. */ - TeamInformation teamInformation(); + String providerIncidentId(); /** - * Gets the title property: The title of the incident. + * Gets the teamInformation property: Describes a team for the incident. * - * @return the title value. + * @return the teamInformation value. */ - String title(); + TeamInformation teamInformation(); /** * Gets the name of the resource group. @@ -229,20 +229,19 @@ interface WithParentResource { */ interface WithCreate extends DefinitionStages.WithEtag, + DefinitionStages.WithTitle, + DefinitionStages.WithDescription, + DefinitionStages.WithSeverity, + DefinitionStages.WithStatus, DefinitionStages.WithClassification, - DefinitionStages.WithClassificationComment, DefinitionStages.WithClassificationReason, - DefinitionStages.WithDescription, - DefinitionStages.WithFirstActivityTimeUtc, + DefinitionStages.WithClassificationComment, + DefinitionStages.WithOwner, DefinitionStages.WithLabels, - DefinitionStages.WithProviderName, - DefinitionStages.WithProviderIncidentId, + DefinitionStages.WithFirstActivityTimeUtc, DefinitionStages.WithLastActivityTimeUtc, - DefinitionStages.WithOwner, - DefinitionStages.WithSeverity, - DefinitionStages.WithStatus, - DefinitionStages.WithTeamInformation, - DefinitionStages.WithTitle { + DefinitionStages.WithProviderName, + DefinitionStages.WithTeamInformation { /** * Executes the create request. * @@ -268,35 +267,15 @@ interface WithEtag { */ WithCreate withEtag(String etag); } - /** The stage of the Incident definition allowing to specify classification. */ - interface WithClassification { - /** - * Specifies the classification property: The reason the incident was closed. - * - * @param classification The reason the incident was closed. - * @return the next definition stage. - */ - WithCreate withClassification(IncidentClassification classification); - } - /** The stage of the Incident definition allowing to specify classificationComment. */ - interface WithClassificationComment { - /** - * Specifies the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment Describes the reason the incident was closed. - * @return the next definition stage. - */ - WithCreate withClassificationComment(String classificationComment); - } - /** The stage of the Incident definition allowing to specify classificationReason. */ - interface WithClassificationReason { + /** The stage of the Incident definition allowing to specify title. */ + interface WithTitle { /** - * Specifies the classificationReason property: The classification reason the incident was closed with. + * Specifies the title property: The title of the incident. * - * @param classificationReason The classification reason the incident was closed with. + * @param title The title of the incident. * @return the next definition stage. */ - WithCreate withClassificationReason(IncidentClassificationReason classificationReason); + WithCreate withTitle(String title); } /** The stage of the Incident definition allowing to specify description. */ interface WithDescription { @@ -308,55 +287,55 @@ interface WithDescription { */ WithCreate withDescription(String description); } - /** The stage of the Incident definition allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { + /** The stage of the Incident definition allowing to specify severity. */ + interface WithSeverity { /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. + * Specifies the severity property: The severity of the incident. * - * @param firstActivityTimeUtc The time of the first activity in the incident. + * @param severity The severity of the incident. * @return the next definition stage. */ - WithCreate withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); + WithCreate withSeverity(IncidentSeverity severity); } - /** The stage of the Incident definition allowing to specify labels. */ - interface WithLabels { + /** The stage of the Incident definition allowing to specify status. */ + interface WithStatus { /** - * Specifies the labels property: List of labels relevant to this incident. + * Specifies the status property: The status of the incident. * - * @param labels List of labels relevant to this incident. + * @param status The status of the incident. * @return the next definition stage. */ - WithCreate withLabels(List labels); + WithCreate withStatus(IncidentStatus status); } - /** The stage of the Incident definition allowing to specify providerName. */ - interface WithProviderName { + /** The stage of the Incident definition allowing to specify classification. */ + interface WithClassification { /** - * Specifies the providerName property: The name of the source provider that generated the incident. + * Specifies the classification property: The reason the incident was closed. * - * @param providerName The name of the source provider that generated the incident. + * @param classification The reason the incident was closed. * @return the next definition stage. */ - WithCreate withProviderName(String providerName); + WithCreate withClassification(IncidentClassification classification); } - /** The stage of the Incident definition allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { + /** The stage of the Incident definition allowing to specify classificationReason. */ + interface WithClassificationReason { /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. + * Specifies the classificationReason property: The classification reason the incident was closed with. * - * @param providerIncidentId The incident ID assigned by the incident provider. + * @param classificationReason The classification reason the incident was closed with. * @return the next definition stage. */ - WithCreate withProviderIncidentId(String providerIncidentId); + WithCreate withClassificationReason(IncidentClassificationReason classificationReason); } - /** The stage of the Incident definition allowing to specify lastActivityTimeUtc. */ - interface WithLastActivityTimeUtc { + /** The stage of the Incident definition allowing to specify classificationComment. */ + interface WithClassificationComment { /** - * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. + * Specifies the classificationComment property: Describes the reason the incident was closed. * - * @param lastActivityTimeUtc The time of the last activity in the incident. + * @param classificationComment Describes the reason the incident was closed. * @return the next definition stage. */ - WithCreate withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); + WithCreate withClassificationComment(String classificationComment); } /** The stage of the Incident definition allowing to specify owner. */ interface WithOwner { @@ -368,45 +347,55 @@ interface WithOwner { */ WithCreate withOwner(IncidentOwnerInfo owner); } - /** The stage of the Incident definition allowing to specify severity. */ - interface WithSeverity { + /** The stage of the Incident definition allowing to specify labels. */ + interface WithLabels { /** - * Specifies the severity property: The severity of the incident. + * Specifies the labels property: List of labels relevant to this incident. * - * @param severity The severity of the incident. + * @param labels List of labels relevant to this incident. * @return the next definition stage. */ - WithCreate withSeverity(IncidentSeverity severity); + WithCreate withLabels(List labels); } - /** The stage of the Incident definition allowing to specify status. */ - interface WithStatus { + /** The stage of the Incident definition allowing to specify firstActivityTimeUtc. */ + interface WithFirstActivityTimeUtc { /** - * Specifies the status property: The status of the incident. + * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param status The status of the incident. + * @param firstActivityTimeUtc The time of the first activity in the incident. * @return the next definition stage. */ - WithCreate withStatus(IncidentStatus status); + WithCreate withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); } - /** The stage of the Incident definition allowing to specify teamInformation. */ - interface WithTeamInformation { + /** The stage of the Incident definition allowing to specify lastActivityTimeUtc. */ + interface WithLastActivityTimeUtc { /** - * Specifies the teamInformation property: Describes a team for the incident. + * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. * - * @param teamInformation Describes a team for the incident. + * @param lastActivityTimeUtc The time of the last activity in the incident. * @return the next definition stage. */ - WithCreate withTeamInformation(TeamInformationInner teamInformation); + WithCreate withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); } - /** The stage of the Incident definition allowing to specify title. */ - interface WithTitle { + /** The stage of the Incident definition allowing to specify providerName. */ + interface WithProviderName { /** - * Specifies the title property: The title of the incident. + * Specifies the providerName property: The name of the source provider that generated the incident. * - * @param title The title of the incident. + * @param providerName The name of the source provider that generated the incident. * @return the next definition stage. */ - WithCreate withTitle(String title); + WithCreate withProviderName(String providerName); + } + /** The stage of the Incident definition allowing to specify teamInformation. */ + interface WithTeamInformation { + /** + * Specifies the teamInformation property: Describes a team for the incident. + * + * @param teamInformation Describes a team for the incident. + * @return the next definition stage. + */ + WithCreate withTeamInformation(TeamInformationInner teamInformation); } } /** @@ -419,20 +408,19 @@ interface WithTitle { /** The template for Incident update. */ interface Update extends UpdateStages.WithEtag, + UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithSeverity, + UpdateStages.WithStatus, UpdateStages.WithClassification, - UpdateStages.WithClassificationComment, UpdateStages.WithClassificationReason, - UpdateStages.WithDescription, - UpdateStages.WithFirstActivityTimeUtc, + UpdateStages.WithClassificationComment, + UpdateStages.WithOwner, UpdateStages.WithLabels, - UpdateStages.WithProviderName, - UpdateStages.WithProviderIncidentId, + UpdateStages.WithFirstActivityTimeUtc, UpdateStages.WithLastActivityTimeUtc, - UpdateStages.WithOwner, - UpdateStages.WithSeverity, - UpdateStages.WithStatus, - UpdateStages.WithTeamInformation, - UpdateStages.WithTitle { + UpdateStages.WithProviderName, + UpdateStages.WithTeamInformation { /** * Executes the update request. * @@ -460,35 +448,15 @@ interface WithEtag { */ Update withEtag(String etag); } - /** The stage of the Incident update allowing to specify classification. */ - interface WithClassification { - /** - * Specifies the classification property: The reason the incident was closed. - * - * @param classification The reason the incident was closed. - * @return the next definition stage. - */ - Update withClassification(IncidentClassification classification); - } - /** The stage of the Incident update allowing to specify classificationComment. */ - interface WithClassificationComment { - /** - * Specifies the classificationComment property: Describes the reason the incident was closed. - * - * @param classificationComment Describes the reason the incident was closed. - * @return the next definition stage. - */ - Update withClassificationComment(String classificationComment); - } - /** The stage of the Incident update allowing to specify classificationReason. */ - interface WithClassificationReason { + /** The stage of the Incident update allowing to specify title. */ + interface WithTitle { /** - * Specifies the classificationReason property: The classification reason the incident was closed with. + * Specifies the title property: The title of the incident. * - * @param classificationReason The classification reason the incident was closed with. + * @param title The title of the incident. * @return the next definition stage. */ - Update withClassificationReason(IncidentClassificationReason classificationReason); + Update withTitle(String title); } /** The stage of the Incident update allowing to specify description. */ interface WithDescription { @@ -500,55 +468,55 @@ interface WithDescription { */ Update withDescription(String description); } - /** The stage of the Incident update allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { + /** The stage of the Incident update allowing to specify severity. */ + interface WithSeverity { /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. + * Specifies the severity property: The severity of the incident. * - * @param firstActivityTimeUtc The time of the first activity in the incident. + * @param severity The severity of the incident. * @return the next definition stage. */ - Update withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); + Update withSeverity(IncidentSeverity severity); } - /** The stage of the Incident update allowing to specify labels. */ - interface WithLabels { + /** The stage of the Incident update allowing to specify status. */ + interface WithStatus { /** - * Specifies the labels property: List of labels relevant to this incident. + * Specifies the status property: The status of the incident. * - * @param labels List of labels relevant to this incident. + * @param status The status of the incident. * @return the next definition stage. */ - Update withLabels(List labels); + Update withStatus(IncidentStatus status); } - /** The stage of the Incident update allowing to specify providerName. */ - interface WithProviderName { + /** The stage of the Incident update allowing to specify classification. */ + interface WithClassification { /** - * Specifies the providerName property: The name of the source provider that generated the incident. + * Specifies the classification property: The reason the incident was closed. * - * @param providerName The name of the source provider that generated the incident. + * @param classification The reason the incident was closed. * @return the next definition stage. */ - Update withProviderName(String providerName); + Update withClassification(IncidentClassification classification); } - /** The stage of the Incident update allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { + /** The stage of the Incident update allowing to specify classificationReason. */ + interface WithClassificationReason { /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. + * Specifies the classificationReason property: The classification reason the incident was closed with. * - * @param providerIncidentId The incident ID assigned by the incident provider. + * @param classificationReason The classification reason the incident was closed with. * @return the next definition stage. */ - Update withProviderIncidentId(String providerIncidentId); + Update withClassificationReason(IncidentClassificationReason classificationReason); } - /** The stage of the Incident update allowing to specify lastActivityTimeUtc. */ - interface WithLastActivityTimeUtc { + /** The stage of the Incident update allowing to specify classificationComment. */ + interface WithClassificationComment { /** - * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. + * Specifies the classificationComment property: Describes the reason the incident was closed. * - * @param lastActivityTimeUtc The time of the last activity in the incident. + * @param classificationComment Describes the reason the incident was closed. * @return the next definition stage. */ - Update withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); + Update withClassificationComment(String classificationComment); } /** The stage of the Incident update allowing to specify owner. */ interface WithOwner { @@ -560,45 +528,55 @@ interface WithOwner { */ Update withOwner(IncidentOwnerInfo owner); } - /** The stage of the Incident update allowing to specify severity. */ - interface WithSeverity { + /** The stage of the Incident update allowing to specify labels. */ + interface WithLabels { /** - * Specifies the severity property: The severity of the incident. + * Specifies the labels property: List of labels relevant to this incident. * - * @param severity The severity of the incident. + * @param labels List of labels relevant to this incident. * @return the next definition stage. */ - Update withSeverity(IncidentSeverity severity); + Update withLabels(List labels); } - /** The stage of the Incident update allowing to specify status. */ - interface WithStatus { + /** The stage of the Incident update allowing to specify firstActivityTimeUtc. */ + interface WithFirstActivityTimeUtc { /** - * Specifies the status property: The status of the incident. + * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param status The status of the incident. + * @param firstActivityTimeUtc The time of the first activity in the incident. * @return the next definition stage. */ - Update withStatus(IncidentStatus status); + Update withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); } - /** The stage of the Incident update allowing to specify teamInformation. */ - interface WithTeamInformation { + /** The stage of the Incident update allowing to specify lastActivityTimeUtc. */ + interface WithLastActivityTimeUtc { /** - * Specifies the teamInformation property: Describes a team for the incident. + * Specifies the lastActivityTimeUtc property: The time of the last activity in the incident. * - * @param teamInformation Describes a team for the incident. + * @param lastActivityTimeUtc The time of the last activity in the incident. * @return the next definition stage. */ - Update withTeamInformation(TeamInformationInner teamInformation); + Update withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); } - /** The stage of the Incident update allowing to specify title. */ - interface WithTitle { + /** The stage of the Incident update allowing to specify providerName. */ + interface WithProviderName { /** - * Specifies the title property: The title of the incident. + * Specifies the providerName property: The name of the source provider that generated the incident. * - * @param title The title of the incident. + * @param providerName The name of the source provider that generated the incident. * @return the next definition stage. */ - Update withTitle(String title); + Update withProviderName(String providerName); + } + /** The stage of the Incident update allowing to specify teamInformation. */ + interface WithTeamInformation { + /** + * Specifies the teamInformation property: Describes a team for the incident. + * + * @param teamInformation Describes a team for the incident. + * @return the next definition stage. + */ + Update withTeamInformation(TeamInformationInner teamInformation); } } /** @@ -620,33 +598,24 @@ interface WithTitle { * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param teamProperties Team properties. + * @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 describes team information. + * @return describes team information along with {@link Response}. */ - TeamInformation createTeam(TeamProperties teamProperties); + Response createTeamWithResponse(TeamInformationInner teamProperties, Context context); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param teamProperties Team properties. - * @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 describes team information along with {@link Response}. - */ - Response createTeamWithResponse(TeamProperties teamProperties, Context context); - - /** - * Gets all incident alerts. - * - * @throws com.azure.core.management.exception.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 incident alerts. + * @return describes team information. */ - IncidentAlertList listAlerts(); + TeamInformation createTeam(TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -660,13 +629,13 @@ interface WithTitle { Response listAlertsWithResponse(Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @throws com.azure.core.management.exception.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 incident bookmarks. + * @return all incident alerts. */ - IncidentBookmarkList listBookmarks(); + IncidentAlertList listAlerts(); /** * Gets all incident bookmarks. @@ -680,13 +649,13 @@ interface WithTitle { Response listBookmarksWithResponse(Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @throws com.azure.core.management.exception.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 incident related entities. + * @return all incident bookmarks. */ - IncidentEntitiesResponse listEntities(); + IncidentBookmarkList listBookmarks(); /** * Gets all incident related entities. @@ -698,4 +667,13 @@ interface WithTitle { * @return all incident related entities along with {@link Response}. */ Response listEntitiesWithResponse(Context context); + + /** + * Gets all incident related entities. + * + * @throws com.azure.core.management.exception.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 incident related entities. + */ + IncidentEntitiesResponse listEntities(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java index f86ce54b9f24f..7313297d41e0b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java @@ -35,12 +35,6 @@ public final class IncidentAdditionalData { @JsonProperty(value = "alertProductNames", access = JsonProperty.Access.WRITE_ONLY) private List alertProductNames; - /* - * The provider incident url to the incident in Microsoft 365 Defender portal - */ - @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String providerIncidentUrl; - /* * The tactics associated with incident */ @@ -48,11 +42,21 @@ public final class IncidentAdditionalData { private List tactics; /* - * The techniques associated with incident's tactics' + * The techniques associated with incident's tactics */ @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /* + * The provider incident url to the incident in Microsoft 365 Defender portal + */ + @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) + private String providerIncidentUrl; + + /** Creates an instance of IncidentAdditionalData class. */ + public IncidentAdditionalData() { + } + /** * Get the alertsCount property: The number of alerts in the incident. * @@ -89,15 +93,6 @@ public List alertProductNames() { return this.alertProductNames; } - /** - * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. - * - * @return the providerIncidentUrl value. - */ - public String providerIncidentUrl() { - return this.providerIncidentUrl; - } - /** * Get the tactics property: The tactics associated with incident. * @@ -108,7 +103,7 @@ public List tactics() { } /** - * Get the techniques property: The techniques associated with incident's tactics'. + * Get the techniques property: The techniques associated with incident's tactics. * * @return the techniques value. */ @@ -116,6 +111,15 @@ public List techniques() { return this.techniques; } + /** + * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. + * + * @return the providerIncidentUrl value. + */ + public String providerIncidentUrl() { + return this.providerIncidentUrl; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java index 400aa8f0d0c49..37d377dcfef3a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java @@ -22,6 +22,15 @@ public final class IncidentClassification extends ExpandableStringEnum value; - /** - * Get the nextLink property: URL to fetch the next set of comments. - * - * @return the nextLink value. + /* + * The nextLink property. */ - public String nextLink() { - return this.nextLink; + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of IncidentCommentList class. */ + public IncidentCommentList() { } /** - * Get the value property: Array of comments. + * Get the value property: The value property. * * @return the value value. */ @@ -44,7 +39,7 @@ public List value() { } /** - * Set the value property: Array of comments. + * Set the value property: The value property. * * @param value the value value to set. * @return the IncidentCommentList object itself. @@ -54,6 +49,15 @@ public IncidentCommentList withValue(List value) { return this; } + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java index 3e39bb7cd39ce..9844c3898eb24 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java @@ -58,12 +58,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return an incident comment along with {@link Response}. */ - IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Gets an incident comment. @@ -72,14 +74,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return an incident comment. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Delete the incident comment. @@ -88,11 +88,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Delete the incident comment. @@ -101,14 +104,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Gets an incident comment. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java index 3746be98a60ad..74a866d473bd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java @@ -22,6 +22,10 @@ public final class IncidentConfiguration { @JsonProperty(value = "groupingConfiguration") private GroupingConfiguration groupingConfiguration; + /** Creates an instance of IncidentConfiguration class. */ + public IncidentConfiguration() { + } + /** * Get the createIncident property: Create incidents from alerts triggered by this analytics rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java index f282c15e2c9d7..8ed2c975a2104 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java @@ -11,55 +11,59 @@ /** Information of a specific aggregation in the incident related entities result. */ @Fluent public final class IncidentEntitiesResultsMetadata { + /* + * The kind of the aggregated entity. + */ + @JsonProperty(value = "entityKind", required = true) + private EntityKindEnum entityKind; + /* * Total number of aggregations of the given kind in the incident related entities result. */ @JsonProperty(value = "count", required = true) private int count; - /* - * The kind of the aggregated entity. - */ - @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; + /** Creates an instance of IncidentEntitiesResultsMetadata class. */ + public IncidentEntitiesResultsMetadata() { + } /** - * Get the count property: Total number of aggregations of the given kind in the incident related entities result. + * Get the entityKind property: The kind of the aggregated entity. * - * @return the count value. + * @return the entityKind value. */ - public int count() { - return this.count; + public EntityKindEnum entityKind() { + return this.entityKind; } /** - * Set the count property: Total number of aggregations of the given kind in the incident related entities result. + * Set the entityKind property: The kind of the aggregated entity. * - * @param count the count value to set. + * @param entityKind the entityKind value to set. * @return the IncidentEntitiesResultsMetadata object itself. */ - public IncidentEntitiesResultsMetadata withCount(int count) { - this.count = count; + public IncidentEntitiesResultsMetadata withEntityKind(EntityKindEnum entityKind) { + this.entityKind = entityKind; return this; } /** - * Get the entityKind property: The kind of the aggregated entity. + * Get the count property: Total number of aggregations of the given kind in the incident related entities result. * - * @return the entityKind value. + * @return the count value. */ - public EntityKind entityKind() { - return this.entityKind; + public int count() { + return this.count; } /** - * Set the entityKind property: The kind of the aggregated entity. + * Set the count property: Total number of aggregations of the given kind in the incident related entities result. * - * @param entityKind the entityKind value to set. + * @param count the count value to set. * @return the IncidentEntitiesResultsMetadata object itself. */ - public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { - this.entityKind = entityKind; + public IncidentEntitiesResultsMetadata withCount(int count) { + this.count = count; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java index e8ee0d18e29b6..1dba990980615 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java @@ -34,6 +34,10 @@ public final class IncidentInfo { @JsonProperty(value = "relationName") private String relationName; + /** Creates an instance of IncidentInfo class. */ + public IncidentInfo() { + } + /** * Get the incidentId property: Incident Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java index c24c4a8522eab..975a88bd59ca9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java @@ -23,6 +23,10 @@ public final class IncidentLabel { @JsonProperty(value = "labelType", access = JsonProperty.Access.WRITE_ONLY) private IncidentLabelType labelType; + /** Creates an instance of IncidentLabel class. */ + public IncidentLabel() { + } + /** * Get the labelName property: The name of the label. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java index 19999e0261f65..1212669d63e97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java @@ -16,6 +16,15 @@ public final class IncidentLabelType extends ExpandableStringEnum value; - /** - * Get the nextLink property: URL to fetch the next set of incidents. - * - * @return the nextLink value. + /* + * URL to fetch the next set of incidents. */ - public String nextLink() { - return this.nextLink; + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of IncidentList class. */ + public IncidentList() { } /** - * Get the value property: Array of incidents. + * Get the value property: The value property. * * @return the value value. */ @@ -44,7 +39,7 @@ public List value() { } /** - * Set the value property: Array of incidents. + * Set the value property: The value property. * * @param value the value value to set. * @return the IncidentList object itself. @@ -54,6 +49,15 @@ public IncidentList withValue(List value) { return this; } + /** + * Get the nextLink property: URL to fetch the next set of incidents. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java index dee86cc228605..32b1f5991cfe6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java @@ -41,6 +41,10 @@ public final class IncidentOwnerInfo { @JsonProperty(value = "ownerType") private OwnerType ownerType; + /** Creates an instance of IncidentOwnerInfo class. */ + public IncidentOwnerInfo() { + } + /** * Get the email property: The email of the user the incident is assigned to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java index 924ddce626e4f..c3943f31c05bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java @@ -11,67 +11,60 @@ /** An immutable client-side representation of IncidentProperties. */ public interface IncidentProperties { /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. + * Gets the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - IncidentClassification classification(); + String title(); /** - * Gets the classificationComment property: Describes the reason the incident was closed. + * Gets the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - String classificationComment(); + String description(); /** - * Gets the classificationReason property: The classification reason the incident was closed with. + * Gets the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - IncidentClassificationReason classificationReason(); + IncidentSeverity severity(); /** - * Gets the createdTimeUtc property: The time the incident was created. + * Gets the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - OffsetDateTime createdTimeUtc(); + IncidentStatus status(); /** - * Gets the description property: The description of the incident. + * Gets the classification property: The reason the incident was closed. * - * @return the description value. + * @return the classification value. */ - String description(); + IncidentClassification classification(); /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. + * Gets the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - OffsetDateTime firstActivityTimeUtc(); + IncidentClassificationReason classificationReason(); /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. + * Gets the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - String incidentUrl(); + String classificationComment(); /** - * Gets the incidentNumber property: A sequential number. + * Gets the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @return the owner value. */ - Integer incidentNumber(); + IncidentOwnerInfo owner(); /** * Gets the labels property: List of labels relevant to this incident. @@ -81,18 +74,11 @@ public interface IncidentProperties { List labels(); /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. + * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - String providerIncidentId(); + OffsetDateTime firstActivityTimeUtc(); /** * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. @@ -109,11 +95,25 @@ public interface IncidentProperties { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the owner property: Describes a user that the incident is assigned to. + * Gets the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - IncidentOwnerInfo owner(); + OffsetDateTime createdTimeUtc(); + + /** + * Gets the incidentNumber property: A sequential number. + * + * @return the incidentNumber value. + */ + Integer incidentNumber(); + + /** + * Gets the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + IncidentAdditionalData additionalData(); /** * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. @@ -123,32 +123,32 @@ public interface IncidentProperties { List relatedAnalyticRuleIds(); /** - * Gets the severity property: The severity of the incident. + * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - IncidentSeverity severity(); + String incidentUrl(); /** - * Gets the status property: The status of the incident. + * Gets the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @return the providerName value. */ - IncidentStatus status(); + String providerName(); /** - * Gets the teamInformation property: Describes a team for the incident. + * Gets the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the teamInformation value. + * @return the providerIncidentId value. */ - TeamInformation teamInformation(); + String providerIncidentId(); /** - * Gets the title property: The title of the incident. + * Gets the teamInformation property: Describes a team for the incident. * - * @return the title value. + * @return the teamInformation value. */ - String title(); + TeamInformation teamInformation(); /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner object. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java index 0278075d0b460..7680e876e1834 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java @@ -53,6 +53,10 @@ public final class IncidentPropertiesAction { @JsonProperty(value = "labels") private List labels; + /** Creates an instance of IncidentPropertiesAction class. */ + public IncidentPropertiesAction() { + } + /** * Get the severity property: The severity of the incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java index 078c2fce6eb80..dbf09abdbe1bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java @@ -52,20 +52,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation 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 an incident relation. - */ - Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - /** * Gets an incident relation. * @@ -83,20 +69,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Gets an incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return an incident relation. */ - Relation createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** * Creates or updates the incident relation. @@ -121,17 +105,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the incident relation. + * Creates or updates the incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + Relation createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); /** * Delete the incident relation. @@ -148,4 +135,17 @@ Response createOrUpdateWithResponse( */ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + + /** + * Delete the incident relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param relationName Relation 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. + */ + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java index 4be03522b9c58..c55bda3bdadad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java @@ -22,6 +22,15 @@ public final class IncidentSeverity extends ExpandableStringEnum { /** Static value Closed for IncidentStatus. */ public static final IncidentStatus CLOSED = fromString("Closed"); + /** + * Creates a new instance of IncidentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentStatus() { + } + /** * Creates or finds a IncidentStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java new file mode 100644 index 0000000000000..ea9dac71b6ce5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of IncidentTask. */ +public interface IncidentTask { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the title property: The title of the task. + * + * @return the title value. + */ + String title(); + + /** + * Gets the description property: The description of the task. + * + * @return the description value. + */ + String description(); + + /** + * Gets the status property: The status property. + * + * @return the status value. + */ + IncidentTaskStatus status(); + + /** + * Gets the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + OffsetDateTime createdTimeUtc(); + + /** + * Gets the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + ClientInfo createdBy(); + + /** + * Gets the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + ClientInfo lastModifiedBy(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner object. + * + * @return the inner object. + */ + IncidentTaskInner innerModel(); + + /** The entirety of the IncidentTask definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithTitle, + DefinitionStages.WithStatus, + DefinitionStages.WithCreate { + } + /** The IncidentTask definition stages. */ + interface DefinitionStages { + /** The first stage of the IncidentTask definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the IncidentTask definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, incidentId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @return the next definition stage. + */ + WithTitle withExistingIncident(String resourceGroupName, String workspaceName, String incidentId); + } + /** The stage of the IncidentTask definition allowing to specify title. */ + interface WithTitle { + /** + * Specifies the title property: The title of the task. + * + * @param title The title of the task. + * @return the next definition stage. + */ + WithStatus withTitle(String title); + } + /** The stage of the IncidentTask definition allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status property.. + * + * @param status The status property. + * @return the next definition stage. + */ + WithCreate withStatus(IncidentTaskStatus status); + } + /** + * The stage of the IncidentTask definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithEtag, + DefinitionStages.WithDescription, + DefinitionStages.WithCreatedBy, + DefinitionStages.WithLastModifiedBy { + /** + * Executes the create request. + * + * @return the created resource. + */ + IncidentTask create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + IncidentTask create(Context context); + } + /** The stage of the IncidentTask definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: Etag of the azure resource. + * + * @param etag Etag of the azure resource. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + /** The stage of the IncidentTask definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the task. + * + * @param description The description of the task. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the IncidentTask definition allowing to specify createdBy. */ + interface WithCreatedBy { + /** + * Specifies the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + WithCreate withCreatedBy(ClientInfo createdBy); + } + /** The stage of the IncidentTask definition allowing to specify lastModifiedBy. */ + interface WithLastModifiedBy { + /** + * Specifies the lastModifiedBy property: Information on the client (user or application) that made some + * action. + * + * @param lastModifiedBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + WithCreate withLastModifiedBy(ClientInfo lastModifiedBy); + } + } + /** + * Begins update for the IncidentTask resource. + * + * @return the stage of resource update. + */ + IncidentTask.Update update(); + + /** The template for IncidentTask update. */ + interface Update + extends UpdateStages.WithEtag, + UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithStatus, + UpdateStages.WithCreatedBy, + UpdateStages.WithLastModifiedBy { + /** + * Executes the update request. + * + * @return the updated resource. + */ + IncidentTask apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + IncidentTask apply(Context context); + } + /** The IncidentTask update stages. */ + interface UpdateStages { + /** The stage of the IncidentTask update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: Etag of the azure resource. + * + * @param etag Etag of the azure resource. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + /** The stage of the IncidentTask update allowing to specify title. */ + interface WithTitle { + /** + * Specifies the title property: The title of the task. + * + * @param title The title of the task. + * @return the next definition stage. + */ + Update withTitle(String title); + } + /** The stage of the IncidentTask update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the task. + * + * @param description The description of the task. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the IncidentTask update allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status property.. + * + * @param status The status property. + * @return the next definition stage. + */ + Update withStatus(IncidentTaskStatus status); + } + /** The stage of the IncidentTask update allowing to specify createdBy. */ + interface WithCreatedBy { + /** + * Specifies the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + Update withCreatedBy(ClientInfo createdBy); + } + /** The stage of the IncidentTask update allowing to specify lastModifiedBy. */ + interface WithLastModifiedBy { + /** + * Specifies the lastModifiedBy property: Information on the client (user or application) that made some + * action. + * + * @param lastModifiedBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + Update withLastModifiedBy(ClientInfo lastModifiedBy); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + IncidentTask refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + IncidentTask refresh(Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java new file mode 100644 index 0000000000000..dfaf09e1b83af --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The IncidentTaskList model. */ +@Fluent +public final class IncidentTaskList { + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of IncidentTaskList class. */ + public IncidentTaskList() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the IncidentTaskList object itself. + */ + public IncidentTaskList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the IncidentTaskList object itself. + */ + public IncidentTaskList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java new file mode 100644 index 0000000000000..619131af1ab11 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IncidentTaskStatus. */ +public final class IncidentTaskStatus extends ExpandableStringEnum { + /** Static value New for IncidentTaskStatus. */ + public static final IncidentTaskStatus NEW = fromString("New"); + + /** Static value Completed for IncidentTaskStatus. */ + public static final IncidentTaskStatus COMPLETED = fromString("Completed"); + + /** + * Creates a new instance of IncidentTaskStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentTaskStatus() { + } + + /** + * Creates or finds a IncidentTaskStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncidentTaskStatus. + */ + @JsonCreator + public static IncidentTaskStatus fromString(String name) { + return fromString(name, IncidentTaskStatus.class); + } + + /** + * Gets known IncidentTaskStatus values. + * + * @return known IncidentTaskStatus values. + */ + public static Collection values() { + return values(IncidentTaskStatus.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java new file mode 100644 index 0000000000000..130e861c0216e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of IncidentTasks. */ +public interface IncidentTasks { + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident tasks as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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 an incident task. + */ + IncidentTask get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task 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. + */ + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Gets an incident task. + * + * @param id the 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 an incident task along with {@link Response}. + */ + IncidentTask getById(String id); + + /** + * Gets an incident task. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the incident task. + * + * @param id the 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. + */ + void deleteById(String id); + + /** + * Delete the incident task. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new IncidentTask resource. + * + * @param name resource name. + * @return the first stage of the new IncidentTask definition. + */ + IncidentTask.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java index 3a2710c7cad6e..4e3d4ce1e0dc8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Resource collection API of Incidents. */ public interface Incidents { @@ -16,12 +17,19 @@ public interface Incidents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @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 any object. + * @return any object along with {@link Response}. */ - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); /** * Triggers playbook on a specific incident. @@ -29,19 +37,12 @@ public interface Incidents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @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 any object along with {@link Response}. + * @return any object. */ - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); /** * Gets all incidents. @@ -81,19 +82,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident 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 an incident. - */ - Incident get(String resourceGroupName, String workspaceName, String incidentId); - /** * Gets an incident. * @@ -110,7 +98,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Delete the incident. + * Gets an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -118,8 +106,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident. */ - void delete(String resourceGroupName, String workspaceName, String incidentId); + Incident get(String resourceGroupName, String workspaceName, String incidentId); /** * Delete the incident. @@ -137,19 +126,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Delete the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ - TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. @@ -168,21 +154,23 @@ Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context); /** - * Gets all incident alerts. + * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident alerts. + * @return describes team information. */ - IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); + TeamInformation createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -200,7 +188,7 @@ Response listAlertsWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -208,9 +196,9 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident bookmarks. + * @return all incident alerts. */ - IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); + IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident bookmarks. @@ -228,7 +216,7 @@ Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -236,9 +224,9 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incident related entities. + * @return all incident bookmarks. */ - IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); + IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident related entities. @@ -255,6 +243,19 @@ Response listBookmarksWithResponse( Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); + /** + * Gets all incident related entities. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident 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 all incident related entities. + */ + IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); + /** * Gets an incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java index 7cb969486ee31..d4798afa8a05a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java @@ -19,6 +19,15 @@ public final class IngestionMode extends ExpandableStringEnum { /** Static value Unspecified for IngestionMode. */ public static final IngestionMode UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of IngestionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngestionMode() { + } + /** * Creates or finds a IngestionMode from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java index 0efb0bc5aff8b..0d7b8b0003925 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java @@ -20,6 +20,10 @@ public final class InsightQueryItem extends EntityQueryItem { @JsonProperty(value = "properties") private InsightQueryItemProperties properties; + /** Creates an instance of InsightQueryItem class. */ + public InsightQueryItem() { + } + /** * Get the properties property: Properties bag for InsightQueryItem. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java index e69737b5e3c81..67b3aac548b5a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java @@ -59,6 +59,10 @@ public final class InsightQueryItemProperties extends EntityQueryItemProperties @JsonProperty(value = "referenceTimeRange") private InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange; + /** Creates an instance of InsightQueryItemProperties class. */ + public InsightQueryItemProperties() { + } + /** * Get the displayName property: The insight display name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java index c9877e7f9273b..85469c4c7e6d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesAdditionalQuery { @JsonProperty(value = "text") private String text; + /** Creates an instance of InsightQueryItemPropertiesAdditionalQuery class. */ + public InsightQueryItemPropertiesAdditionalQuery() { + } + /** * Get the query property: The insight query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java index f870634fb1997..6ca5ad9714ee5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesDefaultTimeRange { @JsonProperty(value = "afterRange") private String afterRange; + /** Creates an instance of InsightQueryItemPropertiesDefaultTimeRange class. */ + public InsightQueryItemPropertiesDefaultTimeRange() { + } + /** * Get the beforeRange property: The padding for the start time of the query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java index 6dd0b8e28f15f..56b41fe1f3735 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java @@ -16,6 +16,10 @@ public final class InsightQueryItemPropertiesReferenceTimeRange { @JsonProperty(value = "beforeRange") private String beforeRange; + /** Creates an instance of InsightQueryItemPropertiesReferenceTimeRange class. */ + public InsightQueryItemPropertiesReferenceTimeRange() { + } + /** * Get the beforeRange property: Additional query time for looking back. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java index 3c889abbed883..c6127abe667ac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java @@ -23,6 +23,10 @@ public final class InsightQueryItemPropertiesTableQuery { @JsonProperty(value = "queriesDefinitions") private List queriesDefinitions; + /** Creates an instance of InsightQueryItemPropertiesTableQuery class. */ + public InsightQueryItemPropertiesTableQuery() { + } + /** * Get the columnsDefinitions property: List of insight column definitions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java index f9428faa609ae..fded6773e09ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java @@ -28,6 +28,10 @@ public final class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem { @JsonProperty(value = "supportDeepLink") private Boolean supportDeepLink; + /** Creates an instance of InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem class. */ + public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem() { + } + /** * Get the headerProperty property: Insight column header. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java index ea811b7bdc9a6..ed768336113e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java @@ -35,6 +35,10 @@ public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem { @JsonProperty(value = "linkColumnsDefinitions") private List linkColumnsDefinitions; + /** Creates an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem class. */ + public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem() { + } + /** * Get the filter property: Insight column header. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java index 626304571d5cb..aefca4653d86d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropert @JsonProperty(value = "Query") private String query; + /** Creates an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem class. */ + public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem() { + } + /** * Get the projectedName property: Insight Link Definition Projected Name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java index 08c5f7cb09c25..18e8969e4cc1c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java @@ -23,6 +23,10 @@ public final class InsightsTableResult { @JsonProperty(value = "rows") private List> rows; + /** Creates an instance of InsightsTableResult class. */ + public InsightsTableResult() { + } + /** * Get the columns property: Columns Metadata of the table. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java index 486e7914039cb..cf1bd2dc19726 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java @@ -22,6 +22,10 @@ public final class InsightsTableResultColumnsItem { @JsonProperty(value = "name") private String name; + /** Creates an instance of InsightsTableResultColumnsItem class. */ + public InsightsTableResultColumnsItem() { + } + /** * Get the type property: the type of the colum. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java index 227c38863a55d..de9e6b7b83fe3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java @@ -29,6 +29,10 @@ public class InstructionSteps { @JsonProperty(value = "instructions") private List instructions; + /** Creates an instance of InstructionSteps class. */ + public InstructionSteps() { + } + /** * Get the title property: Instruction step title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java index 45cf764a6a76a..b30b0a0b303ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java @@ -9,6 +9,10 @@ /** The InstructionStepsInstructionsItem model. */ @Fluent public final class InstructionStepsInstructionsItem extends ConnectorInstructionModelBase { + /** Creates an instance of InstructionStepsInstructionsItem class. */ + public InstructionStepsInstructionsItem() { + } + /** {@inheritDoc} */ @Override public InstructionStepsInstructionsItem withParameters(Object parameters) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java new file mode 100644 index 0000000000000..e1837f424bcd6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Instructions section of a recommendation. */ +@Fluent +public final class Instructions { + /* + * What actions should be taken to complete the recommendation. + */ + @JsonProperty(value = "actionsToBePerformed", required = true) + private String actionsToBePerformed; + + /* + * Explains why the recommendation is important. + */ + @JsonProperty(value = "recommendationImportance", required = true) + private String recommendationImportance; + + /* + * How should the user complete the recommendation. + */ + @JsonProperty(value = "howToPerformActionDetails") + private String howToPerformActionDetails; + + /** Creates an instance of Instructions class. */ + public Instructions() { + } + + /** + * Get the actionsToBePerformed property: What actions should be taken to complete the recommendation. + * + * @return the actionsToBePerformed value. + */ + public String actionsToBePerformed() { + return this.actionsToBePerformed; + } + + /** + * Set the actionsToBePerformed property: What actions should be taken to complete the recommendation. + * + * @param actionsToBePerformed the actionsToBePerformed value to set. + * @return the Instructions object itself. + */ + public Instructions withActionsToBePerformed(String actionsToBePerformed) { + this.actionsToBePerformed = actionsToBePerformed; + return this; + } + + /** + * Get the recommendationImportance property: Explains why the recommendation is important. + * + * @return the recommendationImportance value. + */ + public String recommendationImportance() { + return this.recommendationImportance; + } + + /** + * Set the recommendationImportance property: Explains why the recommendation is important. + * + * @param recommendationImportance the recommendationImportance value to set. + * @return the Instructions object itself. + */ + public Instructions withRecommendationImportance(String recommendationImportance) { + this.recommendationImportance = recommendationImportance; + return this; + } + + /** + * Get the howToPerformActionDetails property: How should the user complete the recommendation. + * + * @return the howToPerformActionDetails value. + */ + public String howToPerformActionDetails() { + return this.howToPerformActionDetails; + } + + /** + * Set the howToPerformActionDetails property: How should the user complete the recommendation. + * + * @param howToPerformActionDetails the howToPerformActionDetails value to set. + * @return the Instructions object itself. + */ + public Instructions withHowToPerformActionDetails(String howToPerformActionDetails) { + this.howToPerformActionDetails = howToPerformActionDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionsToBePerformed() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property actionsToBePerformed in model Instructions")); + } + if (recommendationImportance() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationImportance in model Instructions")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Instructions.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java index cf5ebc9db245e..f1cfd8df136c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java @@ -21,6 +21,10 @@ public final class IoTCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private IoTCheckRequirementsProperties innerProperties; + /** Creates an instance of IoTCheckRequirements class. */ + public IoTCheckRequirements() { + } + /** * Get the innerProperties property: IoT requirements check properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java index 787fff5098c38..4e04dc30decd6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java @@ -22,6 +22,10 @@ public final class IoTDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private IoTDataConnectorProperties innerProperties; + /** Creates an instance of IoTDataConnector class. */ + public IoTDataConnector() { + } + /** * Get the innerProperties property: IoT data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java index 06ab4d1c051d5..b2251a5ea8bee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java @@ -25,6 +25,10 @@ public final class IoTDeviceEntity extends EntityInner { @JsonProperty(value = "properties") private IoTDeviceEntityProperties innerProperties; + /** Creates an instance of IoTDeviceEntity class. */ + public IoTDeviceEntity() { + } + /** * Get the innerProperties property: IoTDevice entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java index beeac5a11a604..f0ec73678065e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.IpEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an ip entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Ip") -@Fluent +@Immutable public final class IpEntity extends EntityInner { /* * Ip entity properties @@ -24,6 +24,10 @@ public final class IpEntity extends EntityInner { @JsonProperty(value = "properties") private IpEntityProperties innerProperties; + /** Creates an instance of IpEntity class. */ + public IpEntity() { + } + /** * Get the innerProperties property: Ip entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java index c85e9c1ab3752..818b8e284d64a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java @@ -14,23 +14,23 @@ public interface IpGeodatas { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @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 geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ - EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); + Response getWithResponse(String resourceGroupName, String ipAddress, Context context); /** * Get geodata for a single IP address. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @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 geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); + EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java index ff0016d01c524..05524b81f56e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Holds the alert intent stage(s) mapping for this alert. */ +/** The intent of the alert. */ public final class KillChainIntent extends ExpandableStringEnum { /** Static value Unknown for KillChainIntent. */ public static final KillChainIntent UNKNOWN = fromString("Unknown"); @@ -52,6 +52,15 @@ public final class KillChainIntent extends ExpandableStringEnum /** Static value Impact for KillChainIntent. */ public static final KillChainIntent IMPACT = fromString("Impact"); + /** + * Creates a new instance of KillChainIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KillChainIntent() { + } + /** * Creates or finds a KillChainIntent from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java index b8879fab665fb..5af7072046190 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java @@ -61,6 +61,15 @@ public final class Kind extends ExpandableStringEnum { /** Static value AutomationRule for Kind. */ public static final Kind AUTOMATION_RULE = fromString("AutomationRule"); + /** + * Creates a new instance of Kind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Kind() { + } + /** * Creates or finds a Kind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java index ee71cb19cfb9d..eacd6e8811c16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java @@ -22,6 +22,10 @@ public class LastDataReceivedDataType { @JsonProperty(value = "lastDataReceivedQuery") private String lastDataReceivedQuery; + /** Creates an instance of LastDataReceivedDataType class. */ + public LastDataReceivedDataType() { + } + /** * Get the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} * placeholder. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java index 9538371ea2c41..c41d1e9677dcc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java @@ -24,6 +24,10 @@ public final class MLBehaviorAnalyticsAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private MLBehaviorAnalyticsAlertRuleProperties innerProperties; + /** Creates an instance of MLBehaviorAnalyticsAlertRule class. */ + public MLBehaviorAnalyticsAlertRule() { + } + /** * Get the innerProperties property: MLBehaviorAnalytics alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java index 3dc6cb43070cb..7ff8a9aae1423 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class MLBehaviorAnalyticsAlertRuleTemplate extends AlertRuleTemplat @JsonProperty(value = "properties") private MLBehaviorAnalyticsAlertRuleTemplateProperties innerProperties; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleTemplate class. */ + public MLBehaviorAnalyticsAlertRuleTemplate() { + } + /** * Get the innerProperties property: MLBehaviorAnalytics alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java index 1f8aeca643cc4..8107f98359e98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +17,7 @@ /** Represents a mail cluster entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("MailCluster") -@Fluent +@Immutable public final class MailClusterEntity extends EntityInner { /* * Mail cluster entity properties @@ -25,6 +25,10 @@ public final class MailClusterEntity extends EntityInner { @JsonProperty(value = "properties") private MailClusterEntityProperties innerProperties; + /** Creates an instance of MailClusterEntity class. */ + public MailClusterEntity() { + } + /** * Get the innerProperties property: Mail cluster entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java index 8d4c01ef2b891..ebd61789c75cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java @@ -26,6 +26,10 @@ public final class MailMessageEntity extends EntityInner { @JsonProperty(value = "properties") private MailMessageEntityProperties innerProperties; + /** Creates an instance of MailMessageEntity class. */ + public MailMessageEntity() { + } + /** * Get the innerProperties property: Mail message entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java index 9441ac626ef07..550d3d54eff7a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailboxEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a mailbox entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Mailbox") -@Fluent +@Immutable public final class MailboxEntity extends EntityInner { /* * Mailbox entity properties @@ -24,6 +24,10 @@ public final class MailboxEntity extends EntityInner { @JsonProperty(value = "properties") private MailboxEntityProperties innerProperties; + /** Creates an instance of MailboxEntity class. */ + public MailboxEntity() { + } + /** * Get the innerProperties property: Mailbox entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java index efcd2bbb952b2..906b04dc6e984 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MalwareEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a malware entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Malware") -@Fluent +@Immutable public final class MalwareEntity extends EntityInner { /* * File entity properties @@ -24,6 +24,10 @@ public final class MalwareEntity extends EntityInner { @JsonProperty(value = "properties") private MalwareEntityProperties innerProperties; + /** Creates an instance of MalwareEntity class. */ + public MalwareEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java index ab2433df85a50..1491f62fd9aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java @@ -24,6 +24,10 @@ public final class ManualTriggerRequestBody { @JsonProperty(value = "logicAppsResourceId", required = true) private String logicAppsResourceId; + /** Creates an instance of ManualTriggerRequestBody class. */ + public ManualTriggerRequestBody() { + } + /** * Get the tenantId property: The tenantId property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java index 412bb642d81e4..760410892abc3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java @@ -22,6 +22,15 @@ public final class MatchingMethod extends ExpandableStringEnum { /** Static value Selected for MatchingMethod. */ public static final MatchingMethod SELECTED = fromString("Selected"); + /** + * Creates a new instance of MatchingMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MatchingMethod() { + } + /** * Creates or finds a MatchingMethod from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java index bf543c75aaafc..0834b040fb546 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java @@ -21,6 +21,10 @@ public final class McasCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private McasCheckRequirementsProperties innerProperties; + /** Creates an instance of McasCheckRequirements class. */ + public McasCheckRequirements() { + } + /** * Get the innerProperties property: MCAS (Microsoft Cloud App Security) requirements check properties. * @@ -30,6 +34,29 @@ private McasCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the McasCheckRequirements object itself. + */ + public McasCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new McasCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java index 4849da973db9a..b97aa53d6e97d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java @@ -22,6 +22,10 @@ public final class McasDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private McasDataConnectorProperties innerProperties; + /** Creates an instance of McasDataConnector class. */ + public McasDataConnector() { + } + /** * Get the innerProperties property: MCAS (Microsoft Cloud App Security) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java index ced242cf519f6..47e45201f9aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java @@ -16,6 +16,10 @@ public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnec @JsonProperty(value = "discoveryLogs") private DataConnectorDataTypeCommon discoveryLogs; + /** Creates an instance of McasDataConnectorDataTypes class. */ + public McasDataConnectorDataTypes() { + } + /** * Get the discoveryLogs property: Discovery log data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java index 97b1be834a33a..ef6df0d8eba25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java @@ -21,6 +21,10 @@ public final class MdatpCheckRequirements extends DataConnectorsCheckRequirement @JsonProperty(value = "properties") private MdatpCheckRequirementsProperties innerProperties; + /** Creates an instance of MdatpCheckRequirements class. */ + public MdatpCheckRequirements() { + } + /** * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) requirements check * properties. @@ -31,6 +35,29 @@ private MdatpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MdatpCheckRequirements object itself. + */ + public MdatpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MdatpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java index be4c5abc500b7..6091da72918b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java @@ -22,6 +22,10 @@ public final class MdatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private MdatpDataConnectorProperties innerProperties; + /** Creates an instance of MdatpDataConnector class. */ + public MdatpDataConnector() { + } + /** * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) data connector * properties. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java index 568297b27c579..8c6d3e99ebc05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java @@ -28,6 +28,10 @@ public final class MetadataAuthor { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataAuthor class. */ + public MetadataAuthor() { + } + /** * Get the name property: Name of the author. Company or person. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java index d2101c1cc1cf7..2a244bb3737d6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java @@ -23,6 +23,10 @@ public final class MetadataCategories { @JsonProperty(value = "verticals") private List verticals; + /** Creates an instance of MetadataCategories class. */ + public MetadataCategories() { + } + /** * Get the domains property: domain for the solution content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java index 0fcabe6da5cd3..7559941194567 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java @@ -52,6 +52,10 @@ public final class MetadataDependencies { @JsonProperty(value = "criteria") private List criteria; + /** Creates an instance of MetadataDependencies class. */ + public MetadataDependencies() { + } + /** * Get the contentId property: Id of the content item we depend on. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependenciesAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependenciesAutoGenerated.java new file mode 100644 index 0000000000000..164c8e67ffdc9 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependenciesAutoGenerated.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Dependencies for the content item, what other content items it requires to work. Can describe more complex + * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or + * operator/criteria for complex dependencies. + */ +@Fluent +public final class MetadataDependenciesAutoGenerated { + /* + * Id of the content item we depend on + */ + @JsonProperty(value = "contentId") + private String contentId; + + /* + * Type of the content item we depend on + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Version of the the content item we depend on. Can be blank, * or missing to indicate any version fulfills the + * dependency. If version does not match our defined numeric format then an exact match is required. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Name of the content item + */ + @JsonProperty(value = "name") + private String name; + + /* + * Operator used for list of dependencies in criteria array. + */ + @JsonProperty(value = "operator") + private Operator operator; + + /* + * This is the list of dependencies we must fulfill, according to the AND/OR operator + */ + @JsonProperty(value = "criteria") + private List criteria; + + /** Creates an instance of MetadataDependenciesAutoGenerated class. */ + public MetadataDependenciesAutoGenerated() { + } + + /** + * Get the contentId property: Id of the content item we depend on. + * + * @return the contentId value. + */ + public String contentId() { + return this.contentId; + } + + /** + * Set the contentId property: Id of the content item we depend on. + * + * @param contentId the contentId value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withContentId(String contentId) { + this.contentId = contentId; + return this; + } + + /** + * Get the kind property: Type of the content item we depend on. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Type of the content item we depend on. + * + * @param kind the kind value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate + * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is + * required. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate + * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is + * required. + * + * @param version the version value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the name property: Name of the content item. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the content item. + * + * @param name the name value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withName(String name) { + this.name = name; + return this; + } + + /** + * Get the operator property: Operator used for list of dependencies in criteria array. + * + * @return the operator value. + */ + public Operator operator() { + return this.operator; + } + + /** + * Set the operator property: Operator used for list of dependencies in criteria array. + * + * @param operator the operator value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withOperator(Operator operator) { + this.operator = operator; + return this; + } + + /** + * Get the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. + * + * @return the criteria value. + */ + public List criteria() { + return this.criteria; + } + + /** + * Set the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. + * + * @param criteria the criteria value to set. + * @return the MetadataDependenciesAutoGenerated object itself. + */ + public MetadataDependenciesAutoGenerated withCriteria(List criteria) { + this.criteria = criteria; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (criteria() != null) { + criteria().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java index a5a93f7aa39fd..138ea70302504 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java @@ -25,6 +25,10 @@ public final class MetadataList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of MetadataList class. */ + public MetadataList() { + } + /** * Get the value property: Array of metadata. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java index 392d45ae54999..381185b3d598c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java @@ -78,7 +78,7 @@ public interface MetadataModel { * * @return the kind value. */ - Kind kind(); + String kind(); /** * Gets the source property: Source of the content. This is where/how it was created. @@ -108,7 +108,7 @@ public interface MetadataModel { * * @return the dependencies value. */ - MetadataDependencies dependencies(); + MetadataDependenciesAutoGenerated dependencies(); /** * Gets the categories property: Categories for the solution content item. @@ -322,7 +322,7 @@ interface WithKind { * @param kind The kind of content the metadata is for. * @return the next definition stage. */ - WithCreate withKind(Kind kind); + WithCreate withKind(String kind); } /** The stage of the MetadataModel definition allowing to specify source. */ interface WithSource { @@ -366,7 +366,7 @@ interface WithDependencies { * id/kind/version can be supplied or operator/criteria for complex formats. * @return the next definition stage. */ - WithCreate withDependencies(MetadataDependencies dependencies); + WithCreate withDependencies(MetadataDependenciesAutoGenerated dependencies); } /** The stage of the MetadataModel definition allowing to specify categories. */ interface WithCategories { @@ -591,7 +591,7 @@ interface WithKind { * @param kind The kind of content the metadata is for. * @return the next definition stage. */ - Update withKind(Kind kind); + Update withKind(String kind); } /** The stage of the MetadataModel update allowing to specify source. */ interface WithSource { @@ -635,7 +635,7 @@ interface WithDependencies { * id/kind/version can be supplied or operator/criteria for complex formats. * @return the next definition stage. */ - Update withDependencies(MetadataDependencies dependencies); + Update withDependencies(MetadataDependenciesAutoGenerated dependencies); } /** The stage of the MetadataModel update allowing to specify categories. */ interface WithCategories { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java index 7556f02585fb6..acebec96db16f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java @@ -19,6 +19,10 @@ public final class MetadataPatch extends ResourceWithEtag { @JsonProperty(value = "properties") private MetadataPropertiesPatch innerProperties; + /** Creates an instance of MetadataPatch class. */ + public MetadataPatch() { + } + /** * Get the innerProperties property: Metadata patch request body. * @@ -119,7 +123,7 @@ public MetadataPatch withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.innerProperties() == null ? null : this.innerProperties().kind(); } @@ -129,7 +133,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataPatch object itself. */ - public MetadataPatch withKind(Kind kind) { + public MetadataPatch withKind(String kind) { if (this.innerProperties() == null) { this.innerProperties = new MetadataPropertiesPatch(); } @@ -213,7 +217,7 @@ public MetadataPatch withSupport(MetadataSupport support) { * * @return the dependencies value. */ - public MetadataDependencies dependencies() { + public MetadataDependenciesAutoGenerated dependencies() { return this.innerProperties() == null ? null : this.innerProperties().dependencies(); } @@ -225,7 +229,7 @@ public MetadataDependencies dependencies() { * @param dependencies the dependencies value to set. * @return the MetadataPatch object itself. */ - public MetadataPatch withDependencies(MetadataDependencies dependencies) { + public MetadataPatch withDependencies(MetadataDependenciesAutoGenerated dependencies) { if (this.innerProperties() == null) { this.innerProperties = new MetadataPropertiesPatch(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java index 41a206a6dccf9..8c21deca2e754 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java @@ -29,6 +29,10 @@ public final class MetadataSource { @JsonProperty(value = "sourceId") private String sourceId; + /** Creates an instance of MetadataSource class. */ + public MetadataSource() { + } + /** * Get the kind property: Source type of the content. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java index a25d51b568bed..a2d9a01d2b2df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java @@ -35,6 +35,10 @@ public final class MetadataSupport { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataSupport class. */ + public MetadataSupport() { + } + /** * Get the tier property: Type of support for content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java index b8be150a2a19c..5640a663d54e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java @@ -53,12 +53,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. + * @return a Metadata along with {@link Response}. */ - MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Get a Metadata. @@ -66,14 +68,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. + * @return a Metadata. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -81,11 +81,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String metadataName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Delete a Metadata. @@ -93,14 +96,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Get a Metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java new file mode 100644 index 0000000000000..b93c826f214ac --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftPurviewInformationProtectionCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents MicrosoftPurviewInformationProtection requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("MicrosoftPurviewInformationProtection") +@Fluent +public final class MicrosoftPurviewInformationProtectionCheckRequirements extends DataConnectorsCheckRequirements { + /* + * MicrosoftPurviewInformationProtection requirements check properties. + */ + @JsonProperty(value = "properties") + private MicrosoftPurviewInformationProtectionCheckRequirementsProperties innerProperties; + + /** Creates an instance of MicrosoftPurviewInformationProtectionCheckRequirements class. */ + public MicrosoftPurviewInformationProtectionCheckRequirements() { + } + + /** + * Get the innerProperties property: MicrosoftPurviewInformationProtection requirements check properties. + * + * @return the innerProperties value. + */ + private MicrosoftPurviewInformationProtectionCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MicrosoftPurviewInformationProtectionCheckRequirements object itself. + */ + public MicrosoftPurviewInformationProtectionCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java new file mode 100644 index 0000000000000..34b5d61afeacd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Microsoft Purview Information Protection data connector. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionConnectorDataTypes { + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs; + + /** Creates an instance of MicrosoftPurviewInformationProtectionConnectorDataTypes class. */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes() { + } + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the MicrosoftPurviewInformationProtectionConnectorDataTypes object itself. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes withLogs( + MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs) { + this.logs = logs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logs() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logs in model" + + " MicrosoftPurviewInformationProtectionConnectorDataTypes")); + } else { + logs().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftPurviewInformationProtectionConnectorDataTypes.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java new file mode 100644 index 0000000000000..80a191731899a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; + +/** Logs data type. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of MicrosoftPurviewInformationProtectionConnectorDataTypesLogs class. */ + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() { + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs withState(DataTypeState state) { + super.withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java new file mode 100644 index 0000000000000..2c81e5461451d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftPurviewInformationProtectionDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Microsoft Purview Information Protection data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("MicrosoftPurviewInformationProtection") +@Fluent +public final class MicrosoftPurviewInformationProtectionDataConnector extends DataConnectorInner { + /* + * Microsoft Purview Information Protection data connector properties. + */ + @JsonProperty(value = "properties") + private MicrosoftPurviewInformationProtectionDataConnectorProperties innerProperties; + + /** Creates an instance of MicrosoftPurviewInformationProtectionDataConnector class. */ + public MicrosoftPurviewInformationProtectionDataConnector() { + } + + /** + * Get the innerProperties property: Microsoft Purview Information Protection data connector properties. + * + * @return the innerProperties value. + */ + private MicrosoftPurviewInformationProtectionDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnector object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnector withDataTypes( + MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + return this; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnector object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionDataConnectorProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java index 201a74e0f4e16..d72927a479667 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleI @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRule class. */ + public MicrosoftSecurityIncidentCreationAlertRule() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java index 5a6e176fc2a3c..d76b0b58863bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java @@ -36,6 +36,10 @@ public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleCommonProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java index d908982016d7a..356b3a7e049b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplate extends Al @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplate class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplate() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java index d6958d5cf48af..6fb7b4a767429 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java @@ -37,6 +37,15 @@ public final class MicrosoftSecurityProductName extends ExpandableStringEnum { + /** Static value Enabled for Mode. */ + public static final Mode ENABLED = fromString("Enabled"); + + /** Static value Disabled for Mode. */ + public static final Mode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + @JsonCreator + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection values() { + return values(Mode.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java index 95cb0a532898c..59b438483e80c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiCheckRequirements.java @@ -21,6 +21,10 @@ public final class MstiCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private MstiCheckRequirementsProperties innerProperties; + /** Creates an instance of MstiCheckRequirements class. */ + public MstiCheckRequirements() { + } + /** * Get the innerProperties property: Microsoft Threat Intelligence requirements check properties. * @@ -30,6 +34,29 @@ private MstiCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MstiCheckRequirements object itself. + */ + public MstiCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MstiCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java index 55c79f1bebab1..16b1379dbb506 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnector.java @@ -22,6 +22,10 @@ public final class MstiDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private MstiDataConnectorProperties innerProperties; + /** Creates an instance of MstiDataConnector class. */ + public MstiDataConnector() { + } + /** * Get the innerProperties property: Microsoft Threat Intelligence data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java index 2c1077694cfdb..fc238a6c18a5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypes.java @@ -11,37 +11,14 @@ /** The available data types for Microsoft Threat Intelligence Platforms data connector. */ @Fluent public final class MstiDataConnectorDataTypes { - /* - * Data type for Microsoft Threat Intelligence Platforms data connector. - */ - @JsonProperty(value = "bingSafetyPhishingURL", required = true) - private MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl; - /* * Data type for Microsoft Threat Intelligence Platforms data connector. */ @JsonProperty(value = "microsoftEmergingThreatFeed", required = true) private MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed microsoftEmergingThreatFeed; - /** - * Get the bingSafetyPhishingUrl property: Data type for Microsoft Threat Intelligence Platforms data connector. - * - * @return the bingSafetyPhishingUrl value. - */ - public MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl() { - return this.bingSafetyPhishingUrl; - } - - /** - * Set the bingSafetyPhishingUrl property: Data type for Microsoft Threat Intelligence Platforms data connector. - * - * @param bingSafetyPhishingUrl the bingSafetyPhishingUrl value to set. - * @return the MstiDataConnectorDataTypes object itself. - */ - public MstiDataConnectorDataTypes withBingSafetyPhishingUrl( - MstiDataConnectorDataTypesBingSafetyPhishingUrl bingSafetyPhishingUrl) { - this.bingSafetyPhishingUrl = bingSafetyPhishingUrl; - return this; + /** Creates an instance of MstiDataConnectorDataTypes class. */ + public MstiDataConnectorDataTypes() { } /** @@ -73,14 +50,6 @@ public MstiDataConnectorDataTypes withMicrosoftEmergingThreatFeed( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (bingSafetyPhishingUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bingSafetyPhishingUrl in model MstiDataConnectorDataTypes")); - } else { - bingSafetyPhishingUrl().validate(); - } if (microsoftEmergingThreatFeed() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java deleted file mode 100644 index 3eee77b51ac32..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesBingSafetyPhishingUrl.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data type for Microsoft Threat Intelligence Platforms data connector. */ -@Fluent -public final class MstiDataConnectorDataTypesBingSafetyPhishingUrl extends DataConnectorDataTypeCommon { - /* - * lookback period - */ - @JsonProperty(value = "lookbackPeriod", required = true) - private String lookbackPeriod; - - /** - * Get the lookbackPeriod property: lookback period. - * - * @return the lookbackPeriod value. - */ - public String lookbackPeriod() { - return this.lookbackPeriod; - } - - /** - * Set the lookbackPeriod property: lookback period. - * - * @param lookbackPeriod the lookbackPeriod value to set. - * @return the MstiDataConnectorDataTypesBingSafetyPhishingUrl object itself. - */ - public MstiDataConnectorDataTypesBingSafetyPhishingUrl withLookbackPeriod(String lookbackPeriod) { - this.lookbackPeriod = lookbackPeriod; - return this; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnectorDataTypesBingSafetyPhishingUrl withState(DataTypeState state) { - super.withState(state); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (lookbackPeriod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lookbackPeriod in model" - + " MstiDataConnectorDataTypesBingSafetyPhishingUrl")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorDataTypesBingSafetyPhishingUrl.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java index 29ab116cee8f2..2b4f2a41eeab8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed.java @@ -12,13 +12,17 @@ @Fluent public final class MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed extends DataConnectorDataTypeCommon { /* - * lookback period + * The lookback period for the feed to be imported. */ @JsonProperty(value = "lookbackPeriod", required = true) private String lookbackPeriod; + /** Creates an instance of MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed class. */ + public MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed() { + } + /** - * Get the lookbackPeriod property: lookback period. + * Get the lookbackPeriod property: The lookback period for the feed to be imported. * * @return the lookbackPeriod value. */ @@ -27,7 +31,7 @@ public String lookbackPeriod() { } /** - * Set the lookbackPeriod property: lookback period. + * Set the lookbackPeriod property: The lookback period for the feed to be imported. * * @param lookbackPeriod the lookbackPeriod value to set. * @return the MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java index 074527921be7b..cf94ef89faa07 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpCheckRequirements.java @@ -21,6 +21,10 @@ public final class MtpCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private MtpCheckRequirementsProperties innerProperties; + /** Creates an instance of MtpCheckRequirements class. */ + public MtpCheckRequirements() { + } + /** * Get the innerProperties property: MTP (Microsoft Threat Protection) requirements check properties. * @@ -30,6 +34,29 @@ private MtpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MtpCheckRequirements object itself. + */ + public MtpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MtpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java index 8c6b30014f43c..4ea5211fb7b7f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnector.java @@ -22,6 +22,10 @@ public final class MtpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private MtpDataConnectorProperties innerProperties; + /** Creates an instance of MtpDataConnector class. */ + public MtpDataConnector() { + } + /** * Get the innerProperties property: MTP (Microsoft Threat Protection) data connector properties. * @@ -61,6 +65,29 @@ public MtpDataConnector withDataTypes(MtpDataConnectorDataTypes dataTypes) { return this; } + /** + * Get the filteredProviders property: The available filtered providers for the connector. + * + * @return the filteredProviders value. + */ + public MtpFilteredProviders filteredProviders() { + return this.innerProperties() == null ? null : this.innerProperties().filteredProviders(); + } + + /** + * Set the filteredProviders property: The available filtered providers for the connector. + * + * @param filteredProviders the filteredProviders value to set. + * @return the MtpDataConnector object itself. + */ + public MtpDataConnector withFilteredProviders(MtpFilteredProviders filteredProviders) { + if (this.innerProperties() == null) { + this.innerProperties = new MtpDataConnectorProperties(); + } + this.innerProperties().withFilteredProviders(filteredProviders); + return this; + } + /** * Get the tenantId property: The tenant id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java index 27fa2a5c2d9b3..a41f05b8b3040 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypes.java @@ -12,13 +12,23 @@ @Fluent public final class MtpDataConnectorDataTypes { /* - * Data type for Microsoft Threat Protection Platforms data connector. + * Incidents data type for Microsoft Threat Protection Platforms data connector. */ @JsonProperty(value = "incidents", required = true) private MtpDataConnectorDataTypesIncidents incidents; + /* + * Alerts data type for Microsoft Threat Protection Platforms data connector. + */ + @JsonProperty(value = "alerts") + private MtpDataConnectorDataTypesAlerts alerts; + + /** Creates an instance of MtpDataConnectorDataTypes class. */ + public MtpDataConnectorDataTypes() { + } + /** - * Get the incidents property: Data type for Microsoft Threat Protection Platforms data connector. + * Get the incidents property: Incidents data type for Microsoft Threat Protection Platforms data connector. * * @return the incidents value. */ @@ -27,7 +37,7 @@ public MtpDataConnectorDataTypesIncidents incidents() { } /** - * Set the incidents property: Data type for Microsoft Threat Protection Platforms data connector. + * Set the incidents property: Incidents data type for Microsoft Threat Protection Platforms data connector. * * @param incidents the incidents value to set. * @return the MtpDataConnectorDataTypes object itself. @@ -37,6 +47,26 @@ public MtpDataConnectorDataTypes withIncidents(MtpDataConnectorDataTypesIncident return this; } + /** + * Get the alerts property: Alerts data type for Microsoft Threat Protection Platforms data connector. + * + * @return the alerts value. + */ + public MtpDataConnectorDataTypesAlerts alerts() { + return this.alerts; + } + + /** + * Set the alerts property: Alerts data type for Microsoft Threat Protection Platforms data connector. + * + * @param alerts the alerts value to set. + * @return the MtpDataConnectorDataTypes object itself. + */ + public MtpDataConnectorDataTypes withAlerts(MtpDataConnectorDataTypesAlerts alerts) { + this.alerts = alerts; + return this; + } + /** * Validates the instance. * @@ -51,6 +81,9 @@ public void validate() { } else { incidents().validate(); } + if (alerts() != null) { + alerts().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorDataTypes.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesAlerts.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesAlerts.java new file mode 100644 index 0000000000000..56b26fcb17d77 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesAlerts.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; + +/** Alerts data type for Microsoft Threat Protection Platforms data connector. */ +@Fluent +public final class MtpDataConnectorDataTypesAlerts extends DataConnectorDataTypeCommon { + /** Creates an instance of MtpDataConnectorDataTypesAlerts class. */ + public MtpDataConnectorDataTypesAlerts() { + } + + /** {@inheritDoc} */ + @Override + public MtpDataConnectorDataTypesAlerts withState(DataTypeState state) { + super.withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java index 0b347d9db7b61..a1b79031b4df8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesIncidents.java @@ -6,9 +6,13 @@ import com.azure.core.annotation.Fluent; -/** Data type for Microsoft Threat Protection Platforms data connector. */ +/** Incidents data type for Microsoft Threat Protection Platforms data connector. */ @Fluent public final class MtpDataConnectorDataTypesIncidents extends DataConnectorDataTypeCommon { + /** Creates an instance of MtpDataConnectorDataTypesIncidents class. */ + public MtpDataConnectorDataTypesIncidents() { + } + /** {@inheritDoc} */ @Override public MtpDataConnectorDataTypesIncidents withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpFilteredProviders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpFilteredProviders.java new file mode 100644 index 0000000000000..c4d389f5959c0 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpFilteredProviders.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents the connector's Filtered providers. */ +@Fluent +public final class MtpFilteredProviders { + /* + * Alerts filtered providers. When filters are not applied, all alerts will stream through the MTP pipeline, still + * in private preview for all products EXCEPT MDA and MDI, which are in GA state. + */ + @JsonProperty(value = "alerts", required = true) + private List alerts; + + /** Creates an instance of MtpFilteredProviders class. */ + public MtpFilteredProviders() { + } + + /** + * Get the alerts property: Alerts filtered providers. When filters are not applied, all alerts will stream through + * the MTP pipeline, still in private preview for all products EXCEPT MDA and MDI, which are in GA state. + * + * @return the alerts value. + */ + public List alerts() { + return this.alerts; + } + + /** + * Set the alerts property: Alerts filtered providers. When filters are not applied, all alerts will stream through + * the MTP pipeline, still in private preview for all products EXCEPT MDA and MDI, which are in GA state. + * + * @param alerts the alerts value to set. + * @return the MtpFilteredProviders object itself. + */ + public MtpFilteredProviders withAlerts(List alerts) { + this.alerts = alerts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (alerts() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property alerts in model MtpFilteredProviders")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MtpFilteredProviders.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java new file mode 100644 index 0000000000000..314cb8f134e4b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The available data providers. */ +public final class MtpProvider extends ExpandableStringEnum { + /** Static value microsoftDefenderForCloudApps for MtpProvider. */ + public static final MtpProvider MICROSOFT_DEFENDER_FOR_CLOUD_APPS = fromString("microsoftDefenderForCloudApps"); + + /** Static value microsoftDefenderForIdentity for MtpProvider. */ + public static final MtpProvider MICROSOFT_DEFENDER_FOR_IDENTITY = fromString("microsoftDefenderForIdentity"); + + /** + * Creates a new instance of MtpProvider value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MtpProvider() { + } + + /** + * Creates or finds a MtpProvider from its string representation. + * + * @param name a name to look for. + * @return the corresponding MtpProvider. + */ + @JsonCreator + public static MtpProvider fromString(String name) { + return fromString(name, MtpProvider.class); + } + + /** + * Gets known MtpProvider values. + * + * @return known MtpProvider values. + */ + public static Collection values() { + return values(MtpProvider.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java index 26326e8ddb92f..8ff8953f2d423 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.NicEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an network interface entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Nic") -@Fluent +@Immutable public final class NicEntity extends EntityInner { /* * Network interface entity properties @@ -24,6 +24,10 @@ public final class NicEntity extends EntityInner { @JsonProperty(value = "properties") private NicEntityProperties innerProperties; + /** Creates an instance of NicEntity class. */ + public NicEntity() { + } + /** * Get the innerProperties property: Network interface entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java index 7a23f7a2b182d..0ce0d60900d31 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java @@ -26,6 +26,10 @@ public final class NrtAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private NrtAlertRuleProperties innerProperties; + /** Creates an instance of NrtAlertRule class. */ + public NrtAlertRule() { + } + /** * Get the innerProperties property: NRT alert rule properties. * @@ -427,6 +431,29 @@ public NrtAlertRule withEventGroupingSettings(EventGroupingSettings eventGroupin return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java index 551cb9589235c..d28b91f789e56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java @@ -25,6 +25,10 @@ public final class NrtAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private NrtAlertRuleTemplateProperties innerProperties; + /** Creates an instance of NrtAlertRuleTemplate class. */ + public NrtAlertRuleTemplate() { + } + /** * Get the innerProperties property: NRT alert rule template properties. * @@ -197,6 +201,29 @@ public NrtAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings even return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Get the tactics property: The tactics of the alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java index 8ed7cfef085ed..81feffa749c93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java @@ -21,6 +21,10 @@ public final class Office365ProjectCheckRequirements extends DataConnectorsCheck @JsonProperty(value = "properties") private Office365ProjectCheckRequirementsProperties innerProperties; + /** Creates an instance of Office365ProjectCheckRequirements class. */ + public Office365ProjectCheckRequirements() { + } + /** * Get the innerProperties property: Office365 Project requirements check properties. * @@ -30,6 +34,29 @@ private Office365ProjectCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the Office365ProjectCheckRequirements object itself. + */ + public Office365ProjectCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java index bafc9102b1dde..b709b2e023c42 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class Office365ProjectConnectorDataTypes { @JsonProperty(value = "logs", required = true) private Office365ProjectConnectorDataTypesLogs logs; + /** Creates an instance of Office365ProjectConnectorDataTypes class. */ + public Office365ProjectConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java index 80908337be80d..01d5bb97c7cae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of Office365ProjectConnectorDataTypesLogs class. */ + public Office365ProjectConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public Office365ProjectConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java index 7665b6940195e..b1ca30836d378 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java @@ -22,6 +22,10 @@ public final class Office365ProjectDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private Office365ProjectDataConnectorProperties innerProperties; + /** Creates an instance of Office365ProjectDataConnector class. */ + public Office365ProjectDataConnector() { + } + /** * Get the innerProperties property: Office Microsoft Project data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java index 25d2ff4c15b41..d19d990620455 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficeAtpCheckRequirements extends DataConnectorsCheckRequire @JsonProperty(value = "properties") private OfficeAtpCheckRequirementsProperties innerProperties; + /** Creates an instance of OfficeAtpCheckRequirements class. */ + public OfficeAtpCheckRequirements() { + } + /** * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) requirements check * properties. @@ -31,6 +35,29 @@ private OfficeAtpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficeAtpCheckRequirements object itself. + */ + public OfficeAtpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficeAtpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java index 2a339d8590fd3..82aa15446f80e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeAtpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeAtpDataConnectorProperties innerProperties; + /** Creates an instance of OfficeAtpDataConnector class. */ + public OfficeAtpDataConnector() { + } + /** * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java index c82170f9180d6..8d5f713347d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java @@ -25,6 +25,10 @@ public final class OfficeConsentList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OfficeConsentList class. */ + public OfficeConsentList() { + } + /** * Get the nextLink property: URL to fetch the next set of office consents. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java index ed83191305b56..65662fbfa49fb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java @@ -41,12 +41,14 @@ public interface OfficeConsents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ - OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Gets an office365 consent. @@ -54,14 +56,12 @@ public interface OfficeConsents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); /** * Delete the office365 consent. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String consentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Delete the office365 consent. @@ -81,12 +84,9 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + void delete(String resourceGroupName, String workspaceName, String consentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java index 2fb508346db83..8eef8afb3c95e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeDataConnectorProperties innerProperties; + /** Creates an instance of OfficeDataConnector class. */ + public OfficeDataConnector() { + } + /** * Get the innerProperties property: Office data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java index f96e94afc7493..72327b88ce2e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java @@ -29,6 +29,10 @@ public final class OfficeDataConnectorDataTypes { @JsonProperty(value = "teams", required = true) private OfficeDataConnectorDataTypesTeams teams; + /** Creates an instance of OfficeDataConnectorDataTypes class. */ + public OfficeDataConnectorDataTypes() { + } + /** * Get the exchange property: Exchange data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java index f4bb9c178fe0d..d5115e8c9b482 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java @@ -9,6 +9,10 @@ /** Exchange data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesExchange class. */ + public OfficeDataConnectorDataTypesExchange() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesExchange withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java index 85b62eaef4d0a..08ab9688e59a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java @@ -9,6 +9,10 @@ /** SharePoint data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesSharePoint class. */ + public OfficeDataConnectorDataTypesSharePoint() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesSharePoint withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java index a16d1b5ddc04a..1ff0e69de273e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java @@ -9,6 +9,10 @@ /** Teams data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesTeams class. */ + public OfficeDataConnectorDataTypesTeams() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesTeams withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java index 0572876278d14..e912ce821e714 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequire @JsonProperty(value = "properties") private OfficeIrmCheckRequirementsProperties innerProperties; + /** Creates an instance of OfficeIrmCheckRequirements class. */ + public OfficeIrmCheckRequirements() { + } + /** * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) requirements check properties. * @@ -30,6 +34,29 @@ private OfficeIrmCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficeIrmCheckRequirements object itself. + */ + public OfficeIrmCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficeIrmCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java index 0a26b9e454929..da67e7253f68f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeIrmDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeIrmDataConnectorProperties innerProperties; + /** Creates an instance of OfficeIrmDataConnector class. */ + public OfficeIrmDataConnector() { + } + /** * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java index 8e52f4d91bb24..bf1ae4f33a068 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficePowerBICheckRequirements extends DataConnectorsCheckReq @JsonProperty(value = "properties") private OfficePowerBICheckRequirementsProperties innerProperties; + /** Creates an instance of OfficePowerBICheckRequirements class. */ + public OfficePowerBICheckRequirements() { + } + /** * Get the innerProperties property: Office Power BI requirements check properties. * @@ -30,6 +34,29 @@ private OfficePowerBICheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficePowerBICheckRequirements object itself. + */ + public OfficePowerBICheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBICheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java index 42b1400cfcf47..b9df79b02be48 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class OfficePowerBIConnectorDataTypes { @JsonProperty(value = "logs", required = true) private OfficePowerBIConnectorDataTypesLogs logs; + /** Creates an instance of OfficePowerBIConnectorDataTypes class. */ + public OfficePowerBIConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java index 0e71c0fd1cad8..a77690e1e4de0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficePowerBIConnectorDataTypesLogs class. */ + public OfficePowerBIConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public OfficePowerBIConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java index 2c7496612394b..7ed1a962d32cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java @@ -22,6 +22,10 @@ public final class OfficePowerBIDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficePowerBIDataConnectorProperties innerProperties; + /** Creates an instance of OfficePowerBIDataConnector class. */ + public OfficePowerBIDataConnector() { + } + /** * Get the innerProperties property: Office Microsoft PowerBI data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java index 54967890e46e1..bad441db6f3b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "resource") private String resource; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the description property: Description of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java index 47df47f995193..c88eb98bd9440 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java @@ -25,6 +25,10 @@ public final class OperationsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OperationsList class. */ + public OperationsList() { + } + /** * Get the nextLink property: URL to fetch the next set of operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java index 77aafbf0cf2b5..5e030be941b83 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java @@ -16,6 +16,15 @@ public final class Operator extends ExpandableStringEnum { /** Static value OR for Operator. */ public static final Operator OR = fromString("OR"); + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + /** * Creates or finds a Operator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java index 6fff096285297..be4c2d51e6075 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java @@ -22,6 +22,15 @@ public final class OutputType extends ExpandableStringEnum { /** Static value Entity for OutputType. */ public static final OutputType ENTITY = fromString("Entity"); + /** + * Creates a new instance of OutputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutputType() { + } + /** * Creates or finds a OutputType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java index 8bb1280540329..82b98bb7dcacb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java @@ -19,6 +19,15 @@ public final class OwnerType extends ExpandableStringEnum { /** Static value Group for OwnerType. */ public static final OwnerType GROUP = fromString("Group"); + /** + * Creates a new instance of OwnerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OwnerType() { + } + /** * Creates or finds a OwnerType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageInstallationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageInstallationProperties.java new file mode 100644 index 0000000000000..7f3cceb30c9e9 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageInstallationProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** package installation properties. */ +@Fluent +public final class PackageInstallationProperties { + /* + * Template Spec properties. + */ + @JsonProperty(value = "properties") + private PackageProperties properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of PackageInstallationProperties class. */ + public PackageInstallationProperties() { + } + + /** + * Get the properties property: Template Spec properties. + * + * @return the properties value. + */ + public PackageProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Template Spec properties. + * + * @param properties the properties value to set. + * @return the PackageInstallationProperties object itself. + */ + public PackageInstallationProperties withProperties(PackageProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PackageInstallationProperties object itself. + */ + public PackageInstallationProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageKind.java new file mode 100644 index 0000000000000..0b6ef7834c1e7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageKind.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The package kind. */ +public final class PackageKind extends ExpandableStringEnum { + /** Static value Solution for PackageKind. */ + public static final PackageKind SOLUTION = fromString("Solution"); + + /** Static value Standalone for PackageKind. */ + public static final PackageKind STANDALONE = fromString("Standalone"); + + /** + * Creates a new instance of PackageKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageKind() { + } + + /** + * Creates or finds a PackageKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageKind. + */ + @JsonCreator + public static PackageKind fromString(String name) { + return fromString(name, PackageKind.class); + } + + /** + * Gets known PackageKind values. + * + * @return known PackageKind values. + */ + public static Collection values() { + return values(PackageKind.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageList.java new file mode 100644 index 0000000000000..4e5249f220c6a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageList.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List available packages. */ +@Fluent +public final class PackageList { + /* + * URL to fetch the next set of packages. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /* + * Array of packages. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of PackageList class. */ + public PackageList() { + } + + /** + * Get the nextLink property: URL to fetch the next set of packages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Get the value property: Array of packages. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of packages. + * + * @param value the value value to set. + * @return the PackageList object itself. + */ + public PackageList withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PackageList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackageList.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageListAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageListAutoGenerated.java new file mode 100644 index 0000000000000..dd6687a4ee563 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageListAutoGenerated.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List available packages. */ +@Fluent +public final class PackageListAutoGenerated { + /* + * URL to fetch the next set of packages. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /* + * Array of packages. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of PackageListAutoGenerated class. */ + public PackageListAutoGenerated() { + } + + /** + * Get the nextLink property: URL to fetch the next set of packages. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Get the value property: Array of packages. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of packages. + * + * @param value the value value to set. + * @return the PackageListAutoGenerated object itself. + */ + public PackageListAutoGenerated withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PackageListAutoGenerated")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackageListAutoGenerated.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModel.java new file mode 100644 index 0000000000000..cae6d925e6c4f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModel.java @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of PackageModel. */ +public interface PackageModel { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the packageId property: The package id. + * + * @return the packageId value. + */ + String packageId(); + + /** + * Gets the packageKind property: The package kind. + * + * @return the packageKind value. + */ + PackageKind packageKind(); + + /** + * Gets the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + String contentSchemaVersion(); + + /** + * Gets the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + Flag isNew(); + + /** + * Gets the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + Flag isPreview(); + + /** + * Gets the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + Flag isFeatured(); + + /** + * Gets the version property: the latest version number of the package. + * + * @return the version value. + */ + String version(); + + /** + * Gets the displayName property: The display name of the package. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the description property: The description of the package. + * + * @return the description value. + */ + String description(); + + /** + * Gets the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + String publisherDisplayName(); + + /** + * Gets the source property: The source of the package. + * + * @return the source value. + */ + MetadataSource source(); + + /** + * Gets the author property: The author of the package. + * + * @return the author value. + */ + MetadataAuthor author(); + + /** + * Gets the support property: The support tier of the package. + * + * @return the support value. + */ + MetadataSupport support(); + + /** + * Gets the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + MetadataDependencies dependencies(); + + /** + * Gets the providers property: Providers for the package item. + * + * @return the providers value. + */ + List providers(); + + /** + * Gets the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + LocalDate firstPublishDate(); + + /** + * Gets the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + LocalDate lastPublishDate(); + + /** + * Gets the categories property: The categories of the package. + * + * @return the categories value. + */ + MetadataCategories categories(); + + /** + * Gets the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + List threatAnalysisTactics(); + + /** + * Gets the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with + * the tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + List threatAnalyticsTechniques(); + + /** + * Gets the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + String icon(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.PackageModelInner object. + * + * @return the inner object. + */ + PackageModelInner innerModel(); + + /** The entirety of the PackageModel definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PackageModel definition stages. */ + interface DefinitionStages { + /** The first stage of the PackageModel definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PackageModel definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** + * The stage of the PackageModel definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + PackageModel create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PackageModel create(Context context); + } + /** The stage of the PackageModel definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the PackageModel definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Template Spec properties.. + * + * @param properties Template Spec properties. + * @return the next definition stage. + */ + WithCreate withProperties(PackageProperties properties); + } + } + /** + * Begins update for the PackageModel resource. + * + * @return the stage of resource update. + */ + PackageModel.Update update(); + + /** The template for PackageModel update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PackageModel apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PackageModel apply(Context context); + } + /** The PackageModel update stages. */ + interface UpdateStages { + /** The stage of the PackageModel update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the PackageModel update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Template Spec properties.. + * + * @param properties Template Spec properties. + * @return the next definition stage. + */ + Update withProperties(PackageProperties properties); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModelAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModelAutoGenerated.java new file mode 100644 index 0000000000000..d5c4905e33610 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageModelAutoGenerated.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner; +import java.time.LocalDate; +import java.util.List; + +/** An immutable client-side representation of PackageModelAutoGenerated. */ +public interface PackageModelAutoGenerated { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the packageId property: The package id. + * + * @return the packageId value. + */ + String packageId(); + + /** + * Gets the packageKind property: The package kind. + * + * @return the packageKind value. + */ + PackageKind packageKind(); + + /** + * Gets the installedVersion property: The version of the installed package, null or absent means not installed. + * + * @return the installedVersion value. + */ + String installedVersion(); + + /** + * Gets the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + String contentSchemaVersion(); + + /** + * Gets the resourceId property: The metadata resource id. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + Flag isNew(); + + /** + * Gets the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + Flag isPreview(); + + /** + * Gets the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + Flag isFeatured(); + + /** + * Gets the version property: the latest version number of the package. + * + * @return the version value. + */ + String version(); + + /** + * Gets the displayName property: The display name of the package. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the description property: The description of the package. + * + * @return the description value. + */ + String description(); + + /** + * Gets the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + String publisherDisplayName(); + + /** + * Gets the source property: The source of the package. + * + * @return the source value. + */ + MetadataSource source(); + + /** + * Gets the author property: The author of the package. + * + * @return the author value. + */ + MetadataAuthor author(); + + /** + * Gets the support property: The support tier of the package. + * + * @return the support value. + */ + MetadataSupport support(); + + /** + * Gets the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + MetadataDependencies dependencies(); + + /** + * Gets the providers property: Providers for the package item. + * + * @return the providers value. + */ + List providers(); + + /** + * Gets the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + LocalDate firstPublishDate(); + + /** + * Gets the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + LocalDate lastPublishDate(); + + /** + * Gets the categories property: The categories of the package. + * + * @return the categories value. + */ + MetadataCategories categories(); + + /** + * Gets the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + List threatAnalysisTactics(); + + /** + * Gets the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with + * the tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + List threatAnalyticsTechniques(); + + /** + * Gets the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + String icon(); + + /** + * Gets the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + Object packagedContent(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.PackageModelAutoGeneratedInner object. + * + * @return the inner object. + */ + PackageModelAutoGeneratedInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageProperties.java new file mode 100644 index 0000000000000..f29104453e60f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PackageProperties.java @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.LocalDate; +import java.util.List; + +/** Describes package properties. */ +@Fluent +public class PackageProperties { + /* + * The package kind + */ + @JsonProperty(value = "packageKind", required = true) + private PackageKind packageKind; + + /* + * The version of the content schema. + */ + @JsonProperty(value = "contentSchemaVersion") + private String contentSchemaVersion; + + /* + * Flag indicates if this is a newly published package. + */ + @JsonProperty(value = "isNew") + private Flag isNew; + + /* + * Flag indicates if this package is in preview. + */ + @JsonProperty(value = "isPreview") + private Flag isPreview; + + /* + * Flag indicates if this package is among the featured list. + */ + @JsonProperty(value = "isFeatured") + private Flag isFeatured; + + /* + * the latest version number of the package + */ + @JsonProperty(value = "version", required = true) + private String version; + + /* + * The display name of the package + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The description of the package + */ + @JsonProperty(value = "description") + private String description; + + /* + * The publisher display name of the package + */ + @JsonProperty(value = "publisherDisplayName") + private String publisherDisplayName; + + /* + * The source of the package + */ + @JsonProperty(value = "source") + private MetadataSource source; + + /* + * The author of the package + */ + @JsonProperty(value = "author") + private MetadataAuthor author; + + /* + * The support tier of the package + */ + @JsonProperty(value = "support") + private MetadataSupport support; + + /* + * The support tier of the package + */ + @JsonProperty(value = "dependencies") + private MetadataDependencies dependencies; + + /* + * Providers for the package item + */ + @JsonProperty(value = "providers") + private List providers; + + /* + * first publish date package item + */ + @JsonProperty(value = "firstPublishDate") + private LocalDate firstPublishDate; + + /* + * last publish date for the package item + */ + @JsonProperty(value = "lastPublishDate") + private LocalDate lastPublishDate; + + /* + * The categories of the package + */ + @JsonProperty(value = "categories") + private MetadataCategories categories; + + /* + * the tactics the resource covers + */ + @JsonProperty(value = "threatAnalysisTactics") + private List threatAnalysisTactics; + + /* + * the techniques the resource covers, these have to be aligned with the tactics being used + */ + @JsonProperty(value = "threatAnalyticsTechniques") + private List threatAnalyticsTechniques; + + /* + * the icon identifier. this id can later be fetched from the content metadata + */ + @JsonProperty(value = "icon") + private String icon; + + /** Creates an instance of PackageProperties class. */ + public PackageProperties() { + } + + /** + * Get the packageKind property: The package kind. + * + * @return the packageKind value. + */ + public PackageKind packageKind() { + return this.packageKind; + } + + /** + * Set the packageKind property: The package kind. + * + * @param packageKind the packageKind value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withPackageKind(PackageKind packageKind) { + this.packageKind = packageKind; + return this; + } + + /** + * Get the contentSchemaVersion property: The version of the content schema. + * + * @return the contentSchemaVersion value. + */ + public String contentSchemaVersion() { + return this.contentSchemaVersion; + } + + /** + * Set the contentSchemaVersion property: The version of the content schema. + * + * @param contentSchemaVersion the contentSchemaVersion value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the isNew property: Flag indicates if this is a newly published package. + * + * @return the isNew value. + */ + public Flag isNew() { + return this.isNew; + } + + /** + * Set the isNew property: Flag indicates if this is a newly published package. + * + * @param isNew the isNew value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withIsNew(Flag isNew) { + this.isNew = isNew; + return this; + } + + /** + * Get the isPreview property: Flag indicates if this package is in preview. + * + * @return the isPreview value. + */ + public Flag isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: Flag indicates if this package is in preview. + * + * @param isPreview the isPreview value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withIsPreview(Flag isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the isFeatured property: Flag indicates if this package is among the featured list. + * + * @return the isFeatured value. + */ + public Flag isFeatured() { + return this.isFeatured; + } + + /** + * Set the isFeatured property: Flag indicates if this package is among the featured list. + * + * @param isFeatured the isFeatured value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withIsFeatured(Flag isFeatured) { + this.isFeatured = isFeatured; + return this; + } + + /** + * Get the version property: the latest version number of the package. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: the latest version number of the package. + * + * @param version the version value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the displayName property: The display name of the package. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name of the package. + * + * @param displayName the displayName value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description property: The description of the package. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the package. + * + * @param description the description value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the publisherDisplayName property: The publisher display name of the package. + * + * @return the publisherDisplayName value. + */ + public String publisherDisplayName() { + return this.publisherDisplayName; + } + + /** + * Set the publisherDisplayName property: The publisher display name of the package. + * + * @param publisherDisplayName the publisherDisplayName value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withPublisherDisplayName(String publisherDisplayName) { + this.publisherDisplayName = publisherDisplayName; + return this; + } + + /** + * Get the source property: The source of the package. + * + * @return the source value. + */ + public MetadataSource source() { + return this.source; + } + + /** + * Set the source property: The source of the package. + * + * @param source the source value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withSource(MetadataSource source) { + this.source = source; + return this; + } + + /** + * Get the author property: The author of the package. + * + * @return the author value. + */ + public MetadataAuthor author() { + return this.author; + } + + /** + * Set the author property: The author of the package. + * + * @param author the author value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withAuthor(MetadataAuthor author) { + this.author = author; + return this; + } + + /** + * Get the support property: The support tier of the package. + * + * @return the support value. + */ + public MetadataSupport support() { + return this.support; + } + + /** + * Set the support property: The support tier of the package. + * + * @param support the support value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withSupport(MetadataSupport support) { + this.support = support; + return this; + } + + /** + * Get the dependencies property: The support tier of the package. + * + * @return the dependencies value. + */ + public MetadataDependencies dependencies() { + return this.dependencies; + } + + /** + * Set the dependencies property: The support tier of the package. + * + * @param dependencies the dependencies value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withDependencies(MetadataDependencies dependencies) { + this.dependencies = dependencies; + return this; + } + + /** + * Get the providers property: Providers for the package item. + * + * @return the providers value. + */ + public List providers() { + return this.providers; + } + + /** + * Set the providers property: Providers for the package item. + * + * @param providers the providers value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withProviders(List providers) { + this.providers = providers; + return this; + } + + /** + * Get the firstPublishDate property: first publish date package item. + * + * @return the firstPublishDate value. + */ + public LocalDate firstPublishDate() { + return this.firstPublishDate; + } + + /** + * Set the firstPublishDate property: first publish date package item. + * + * @param firstPublishDate the firstPublishDate value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withFirstPublishDate(LocalDate firstPublishDate) { + this.firstPublishDate = firstPublishDate; + return this; + } + + /** + * Get the lastPublishDate property: last publish date for the package item. + * + * @return the lastPublishDate value. + */ + public LocalDate lastPublishDate() { + return this.lastPublishDate; + } + + /** + * Set the lastPublishDate property: last publish date for the package item. + * + * @param lastPublishDate the lastPublishDate value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withLastPublishDate(LocalDate lastPublishDate) { + this.lastPublishDate = lastPublishDate; + return this; + } + + /** + * Get the categories property: The categories of the package. + * + * @return the categories value. + */ + public MetadataCategories categories() { + return this.categories; + } + + /** + * Set the categories property: The categories of the package. + * + * @param categories the categories value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withCategories(MetadataCategories categories) { + this.categories = categories; + return this; + } + + /** + * Get the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + public List threatAnalysisTactics() { + return this.threatAnalysisTactics; + } + + /** + * Set the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the threatAnalysisTactics value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withThreatAnalysisTactics(List threatAnalysisTactics) { + this.threatAnalysisTactics = threatAnalysisTactics; + return this; + } + + /** + * Get the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalyticsTechniques value. + */ + public List threatAnalyticsTechniques() { + return this.threatAnalyticsTechniques; + } + + /** + * Set the threatAnalyticsTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @param threatAnalyticsTechniques the threatAnalyticsTechniques value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withThreatAnalyticsTechniques(List threatAnalyticsTechniques) { + this.threatAnalyticsTechniques = threatAnalyticsTechniques; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + public String icon() { + return this.icon; + } + + /** + * Set the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @param icon the icon value to set. + * @return the PackageProperties object itself. + */ + public PackageProperties withIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageKind() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property packageKind in model PackageProperties")); + } + if (version() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property version in model PackageProperties")); + } + if (displayName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property displayName in model PackageProperties")); + } + if (source() != null) { + source().validate(); + } + if (author() != null) { + author().validate(); + } + if (support() != null) { + support().validate(); + } + if (dependencies() != null) { + dependencies().validate(); + } + if (categories() != null) { + categories().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackageProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java index ba4232af432ec..9c89c601a2e31 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java @@ -19,6 +19,15 @@ public final class PermissionProviderScope extends ExpandableStringEnum customs; + /** Creates an instance of Permissions class. */ + public Permissions() { + } + /** * Get the resourceProvider property: Resource provider permissions required for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java index 943909826a2e7..7baf23b26bb06 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java @@ -9,6 +9,10 @@ /** The PermissionsCustomsItem model. */ @Fluent public final class PermissionsCustomsItem extends Customs { + /** Creates an instance of PermissionsCustomsItem class. */ + public PermissionsCustomsItem() { + } + /** {@inheritDoc} */ @Override public PermissionsCustomsItem withName(String name) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java index d2db9072abc2f..8d49828e934eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java @@ -9,6 +9,10 @@ /** The PermissionsResourceProviderItem model. */ @Fluent public final class PermissionsResourceProviderItem extends ResourceProvider { + /** Creates an instance of PermissionsResourceProviderItem class. */ + public PermissionsResourceProviderItem() { + } + /** {@inheritDoc} */ @Override public PermissionsResourceProviderItem withProvider(ProviderName provider) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java index 9d85ffb7802b6..7adeef14203e0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; @@ -14,7 +15,7 @@ public final class PlaybookActionProperties { /* * The resource id of the playbook resource. */ - @JsonProperty(value = "logicAppResourceId") + @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; /* @@ -23,6 +24,10 @@ public final class PlaybookActionProperties { @JsonProperty(value = "tenantId") private UUID tenantId; + /** Creates an instance of PlaybookActionProperties class. */ + public PlaybookActionProperties() { + } + /** * Get the logicAppResourceId property: The resource id of the playbook resource. * @@ -69,5 +74,13 @@ public PlaybookActionProperties withTenantId(UUID tenantId) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (logicAppResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logicAppResourceId in model PlaybookActionProperties")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(PlaybookActionProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java index e62fa3c417171..30bc1a24050e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java @@ -19,6 +19,15 @@ public final class PollingFrequency extends ExpandableStringEnum { + /** Static value Low for Priority. */ + public static final Priority LOW = fromString("Low"); + + /** Static value Medium for Priority. */ + public static final Priority MEDIUM = fromString("Medium"); + + /** Static value High for Priority. */ + public static final Priority HIGH = fromString("High"); + + /** + * Creates a new instance of Priority value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Priority() { + } + + /** + * Creates or finds a Priority from its string representation. + * + * @param name a name to look for. + * @return the corresponding Priority. + */ + @JsonCreator + public static Priority fromString(String name) { + return fromString(name, Priority.class); + } + + /** + * Gets known Priority values. + * + * @return known Priority values. + */ + public static Collection values() { + return values(Priority.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java index 1d192d71c851c..e2c7225f4cb97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java @@ -24,6 +24,10 @@ public final class ProcessEntity extends EntityInner { @JsonProperty(value = "properties") private ProcessEntityProperties innerProperties; + /** Creates an instance of ProcessEntity class. */ + public ProcessEntity() { + } + /** * Get the innerProperties property: Process entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackageOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackageOperations.java new file mode 100644 index 0000000000000..003b6e5a3a7b5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackageOperations.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ProductPackageOperations. */ +public interface ProductPackageOperations { + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a package by its identifier from the catalog along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String packageId, Context context); + + /** + * Gets a package by its identifier from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param packageId package 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 a package by its identifier from the catalog. + */ + PackageModelAutoGenerated get(String resourceGroupName, String workspaceName, String packageId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackages.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackages.java new file mode 100644 index 0000000000000..bb6c1bc2987ca --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductPackages.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ProductPackages. */ +public interface ProductPackages { + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all packages from the catalog as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all packages from the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all packages from the catalog as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java index ead1ce681b979..7dfdea9e34b37 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java @@ -10,18 +10,6 @@ /** Resource collection API of ProductSettings. */ public interface ProductSettings { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - SettingList list(String resourceGroupName, String workspaceName); - /** * List of all the settings. * @@ -36,17 +24,16 @@ public interface ProductSettings { Response listWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * Gets a setting. + * List of all the settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 setting. + * @return list of all the settings. */ - Settings get(String resourceGroupName, String workspaceName, String settingsName); + SettingList list(String resourceGroupName, String workspaceName); /** * Gets a setting. @@ -64,7 +51,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String settingsName, Context context); /** - * Delete setting of the product. + * Gets a setting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -72,8 +59,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 setting. */ - void delete(String resourceGroupName, String workspaceName, String settingsName); + Settings get(String resourceGroupName, String workspaceName, String settingsName); /** * Delete setting of the product. @@ -91,18 +79,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String settingsName, Context context); /** - * Updates setting. + * Delete setting of the product. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. */ - Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); + void delete(String resourceGroupName, String workspaceName, String settingsName); /** * Updates setting. @@ -119,4 +105,18 @@ Response deleteWithResponse( */ Response updateWithResponse( String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); + + /** + * Updates setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param settings The setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Setting. + */ + Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplateOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplateOperations.java new file mode 100644 index 0000000000000..11d75e0368cfa --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplateOperations.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ProductTemplateOperations. */ +public interface ProductTemplateOperations { + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a template by its identifier along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String templateId, Context context); + + /** + * Gets a template by its identifier. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param templateId template 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 a template by its identifier. + */ + TemplateModel get(String resourceGroupName, String workspaceName, String templateId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplates.java new file mode 100644 index 0000000000000..7470892575794 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductTemplates.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ProductTemplates. */ +public interface ProductTemplates { + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all templates in the catalog as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all templates in the catalog. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param filter Filters the results, based on a Boolean condition. Optional. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all templates in the catalog as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String filter, + String orderby, + Integer top, + String skipToken, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java index dc048782a94f5..be5d0f5368a51 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyArrayChangedConditionProperties extends AutomationRul @JsonProperty(value = "conditionProperties") private AutomationRulePropertyArrayChangedValuesCondition conditionProperties; + /** Creates an instance of PropertyArrayChangedConditionProperties class. */ + public PropertyArrayChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java index a508d41ec8736..61d9a767f8efd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyArrayConditionProperties extends AutomationRuleCondit @JsonProperty(value = "conditionProperties") private AutomationRulePropertyArrayValuesCondition conditionProperties; + /** Creates an instance of PropertyArrayConditionProperties class. */ + public PropertyArrayConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java index 22470af86a465..d0916572cfff9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyChangedConditionProperties extends AutomationRuleCond @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesChangedCondition conditionProperties; + /** Creates an instance of PropertyChangedConditionProperties class. */ + public PropertyChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java index 7c641a0bca1ee..58c0036f081d9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesCondition conditionProperties; + /** Creates an instance of PropertyConditionProperties class. */ + public PropertyConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java index a365b42e5c16b..0c462bd2c1774 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java @@ -34,6 +34,15 @@ public final class ProviderName extends ExpandableStringEnum { public static final ProviderName MICROSOFT_AUTHORIZATION_POLICY_ASSIGNMENTS = fromString("Microsoft.Authorization/policyAssignments"); + /** + * Creates a new instance of ProviderName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProviderName() { + } + /** * Creates or finds a ProviderName from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java new file mode 100644 index 0000000000000..1afca7787242e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The triggered analytics rule run provisioning state. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value InProgress for ProvisioningState. */ + public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java index e20070c785ad5..edd53dc5ea73e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java @@ -56,6 +56,16 @@ public class QueryBasedAlertRuleTemplateProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of QueryBasedAlertRuleTemplateProperties class. */ + public QueryBasedAlertRuleTemplateProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -199,6 +209,27 @@ public QueryBasedAlertRuleTemplateProperties withEventGroupingSettings( return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the QueryBasedAlertRuleTemplateProperties object itself. + */ + public QueryBasedAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -214,5 +245,8 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java new file mode 100644 index 0000000000000..21de0e099a0a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** An immutable client-side representation of Recommendation. */ +public interface Recommendation { + /** + * Gets the id property: id of recommendation. + * + * @return the id value. + */ + UUID id(); + + /** + * Gets the instructions property: Instructions of the recommendation. + * + * @return the instructions value. + */ + Instructions instructions(); + + /** + * Gets the content property: Content of the recommendation. + * + * @return the content value. + */ + Content content(); + + /** + * Gets the resourceId property: Id of the resource this recommendation refers to. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the additionalProperties property: Collection of additional properties for the recommendation. + * + * @return the additionalProperties value. + */ + Map additionalProperties(); + + /** + * Gets the title property: Title of the recommendation. + * + * @return the title value. + */ + String title(); + + /** + * Gets the description property: Description of the recommendation. + * + * @return the description value. + */ + String description(); + + /** + * Gets the recommendationTypeTitle property: Title of the recommendation type. + * + * @return the recommendationTypeTitle value. + */ + String recommendationTypeTitle(); + + /** + * Gets the recommendationTypeId property: Id of the recommendation type. + * + * @return the recommendationTypeId value. + */ + String recommendationTypeId(); + + /** + * Gets the category property: Category of the recommendation. + * + * @return the category value. + */ + Category category(); + + /** + * Gets the context property: Context of the recommendation. + * + * @return the context value. + */ + Context context(); + + /** + * Gets the workspaceId property: Id of the workspace this recommendation refers to. + * + * @return the workspaceId value. + */ + UUID workspaceId(); + + /** + * Gets the actions property: List of actions to take for this recommendation. + * + * @return the actions value. + */ + List actions(); + + /** + * Gets the state property: State of the recommendation. + * + * @return the state value. + */ + State state(); + + /** + * Gets the priority property: Priority of the recommendation. + * + * @return the priority value. + */ + Priority priority(); + + /** + * Gets the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @return the lastEvaluatedTimeUtc value. + */ + OffsetDateTime lastEvaluatedTimeUtc(); + + /** + * Gets the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + OffsetDateTime hideUntilTimeUtc(); + + /** + * Gets the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @return the displayUntilTimeUtc value. + */ + OffsetDateTime displayUntilTimeUtc(); + + /** + * Gets the visible property: Value indicating if the recommendation should be displayed or not. + * + * @return the visible value. + */ + Boolean visible(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner object. + * + * @return the inner object. + */ + RecommendationInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java new file mode 100644 index 0000000000000..93f95267bfd08 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import java.util.List; + +/** An immutable client-side representation of RecommendationList. */ +public interface RecommendationList { + /** + * Gets the value property: An list of recommendations. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner object. + * + * @return the inner object. + */ + RecommendationListInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java new file mode 100644 index 0000000000000..3e61e91ba60f7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Recommendation Fields to update. */ +@Fluent +public final class RecommendationPatch { + /* + * State of the recommendation. + */ + @JsonProperty(value = "state") + private State state; + + /* + * The time stamp (UTC) when the recommendation should be displayed again. + */ + @JsonProperty(value = "hideUntilTimeUtc") + private OffsetDateTime hideUntilTimeUtc; + + /** Creates an instance of RecommendationPatch class. */ + public RecommendationPatch() { + } + + /** + * Get the state property: State of the recommendation. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Set the state property: State of the recommendation. + * + * @param state the state value to set. + * @return the RecommendationPatch object itself. + */ + public RecommendationPatch withState(State state) { + this.state = state; + return this; + } + + /** + * Get the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + public OffsetDateTime hideUntilTimeUtc() { + return this.hideUntilTimeUtc; + } + + /** + * Set the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @param hideUntilTimeUtc the hideUntilTimeUtc value to set. + * @return the RecommendationPatch object itself. + */ + public RecommendationPatch withHideUntilTimeUtc(OffsetDateTime hideUntilTimeUtc) { + this.hideUntilTimeUtc = hideUntilTimeUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java new file mode 100644 index 0000000000000..065a7c219ae0b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** What actions should be taken to complete the recommendation. */ +@Fluent +public final class RecommendedAction { + /* + * Text of the link to complete the action. + */ + @JsonProperty(value = "linkText", required = true) + private String linkText; + + /* + * The Link to complete the action. + */ + @JsonProperty(value = "linkUrl", required = true) + private String linkUrl; + + /* + * The state of the action. + */ + @JsonProperty(value = "state") + private Priority state; + + /** Creates an instance of RecommendedAction class. */ + public RecommendedAction() { + } + + /** + * Get the linkText property: Text of the link to complete the action. + * + * @return the linkText value. + */ + public String linkText() { + return this.linkText; + } + + /** + * Set the linkText property: Text of the link to complete the action. + * + * @param linkText the linkText value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withLinkText(String linkText) { + this.linkText = linkText; + return this; + } + + /** + * Get the linkUrl property: The Link to complete the action. + * + * @return the linkUrl value. + */ + public String linkUrl() { + return this.linkUrl; + } + + /** + * Set the linkUrl property: The Link to complete the action. + * + * @param linkUrl the linkUrl value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withLinkUrl(String linkUrl) { + this.linkUrl = linkUrl; + return this; + } + + /** + * Get the state property: The state of the action. + * + * @return the state value. + */ + public Priority state() { + return this.state; + } + + /** + * Set the state property: The state of the action. + * + * @param state the state value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withState(Priority state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linkText() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property linkText in model RecommendedAction")); + } + if (linkUrl() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property linkUrl in model RecommendedAction")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecommendedAction.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java index 0b533e8cddbbb..37cb3be9e41f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java @@ -40,6 +40,15 @@ public final class RegistryHive extends ExpandableStringEnum { /** Static value HKEY_CURRENT_USER for RegistryHive. */ public static final RegistryHive HKEY_CURRENT_USER = fromString("HKEY_CURRENT_USER"); + /** + * Creates a new instance of RegistryHive value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegistryHive() { + } + /** * Creates or finds a RegistryHive from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java index 116afd6feb604..a89770bdaa26b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryKeyEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a registry key entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryKey") -@Fluent +@Immutable public final class RegistryKeyEntity extends EntityInner { /* * RegistryKey entity properties @@ -23,6 +23,10 @@ public final class RegistryKeyEntity extends EntityInner { @JsonProperty(value = "properties") private RegistryKeyEntityProperties innerProperties; + /** Creates an instance of RegistryKeyEntity class. */ + public RegistryKeyEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java index 8121d653cb19d..4ac242b3b299b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryValueEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a registry value entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryValue") -@Fluent +@Immutable public final class RegistryValueEntity extends EntityInner { /* * RegistryKey entity properties @@ -23,6 +23,10 @@ public final class RegistryValueEntity extends EntityInner { @JsonProperty(value = "properties") private RegistryValueEntityProperties innerProperties; + /** Creates an instance of RegistryValueEntity class. */ + public RegistryValueEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java index 7f214d1bf04f9..ca55b89110bad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java @@ -37,6 +37,15 @@ public final class RegistryValueKind extends ExpandableStringEnum value; + /** Creates an instance of RelationList class. */ + public RelationList() { + } + /** * Get the nextLink property: URL to fetch the next set of relations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java index 02aaa874b88de..87f9c940268ce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java @@ -25,6 +25,10 @@ public final class RepoList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of RepoList class. */ + public RepoList() { + } + /** * Get the nextLink property: URL to fetch the next set of repositories. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java index dcb33e87b257f..78402e3cc10cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java @@ -16,6 +16,15 @@ public final class RepoType extends ExpandableStringEnum { /** Static value DevOps for RepoType. */ public static final RepoType DEV_OPS = fromString("DevOps"); + /** + * Creates a new instance of RepoType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RepoType() { + } + /** * Creates or finds a RepoType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java index 3e26879725a58..38e3c9a9d8c8e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java @@ -41,6 +41,10 @@ public final class Repository { @JsonProperty(value = "pathMapping") private List pathMapping; + /** Creates an instance of Repository class. */ + public Repository() { + } + /** * Get the url property: Url of repository. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java index 5e10c94993ffe..7b1c24757e918 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java @@ -28,6 +28,10 @@ public final class RepositoryResourceInfo { @JsonProperty(value = "azureDevOpsResourceInfo") private AzureDevOpsResourceInfo azureDevOpsResourceInfo; + /** Creates an instance of RepositoryResourceInfo class. */ + public RepositoryResourceInfo() { + } + /** * Get the webhook property: The webhook object created for the source-control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java index 146d39665d202..c4bd2d0c0ac9f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java @@ -34,6 +34,10 @@ public final class RequiredPermissions { @JsonProperty(value = "delete") private Boolean delete; + /** Creates an instance of RequiredPermissions class. */ + public RequiredPermissions() { + } + /** * Get the action property: action permission. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java index 7024f46e5562d..faa24f5c78b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java @@ -40,6 +40,10 @@ public class ResourceProvider { @JsonProperty(value = "requiredPermissions") private RequiredPermissions requiredPermissions; + /** Creates an instance of ResourceProvider class. */ + public ResourceProvider() { + } + /** * Get the provider property: Provider name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java index 6ed4515163c82..8d8a4234f62d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java @@ -24,6 +24,10 @@ public class ResourceWithEtag extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ResourceWithEtag class. */ + public ResourceWithEtag() { + } + /** * Get the etag property: Etag of the azure resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java index 21b538e67f101..9f5f260775fe4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java @@ -22,6 +22,10 @@ public class SampleQueries { @JsonProperty(value = "query") private String query; + /** Creates an instance of SampleQueries class. */ + public SampleQueries() { + } + /** * Get the description property: The sample query description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java index 5d5575688e635..5debb8fd9a84c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private ScheduledAlertRuleProperties innerProperties; + /** Creates an instance of ScheduledAlertRule class. */ + public ScheduledAlertRule() { + } + /** * Get the innerProperties property: Scheduled alert rule properties. * @@ -519,6 +523,29 @@ public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDet return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java index 181410c28e15a..6f87af4aca6d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java @@ -75,6 +75,16 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of ScheduledAlertRuleCommonProperties class. */ + public ScheduledAlertRuleCommonProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -275,6 +285,27 @@ public ScheduledAlertRuleCommonProperties withAlertDetailsOverride(AlertDetailsO return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -290,5 +321,8 @@ public void validate() { if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java index 143d98192d0da..166b63a356469 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private ScheduledAlertRuleTemplateProperties innerProperties; + /** Creates an instance of ScheduledAlertRuleTemplate class. */ + public ScheduledAlertRuleTemplate() { + } + /** * Get the innerProperties property: Scheduled alert rule template properties. * @@ -470,6 +474,30 @@ public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleTemplate object itself. + */ + public ScheduledAlertRuleTemplate withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java index 3052a35d0c5c9..21f4fc0f0b0c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java @@ -25,6 +25,10 @@ public final class SecurityAlert extends EntityInner { @JsonProperty(value = "properties") private SecurityAlertProperties innerProperties; + /** Creates an instance of SecurityAlert class. */ + public SecurityAlert() { + } + /** * Get the innerProperties property: SecurityAlert entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java index 3613253e952af..9ab3a972e6e6a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java @@ -22,6 +22,10 @@ public final class SecurityAlertPropertiesConfidenceReasonsItem { @JsonProperty(value = "reasonType", access = JsonProperty.Access.WRITE_ONLY) private String reasonType; + /** Creates an instance of SecurityAlertPropertiesConfidenceReasonsItem class. */ + public SecurityAlertPropertiesConfidenceReasonsItem() { + } + /** * Get the reason property: The reason's description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java index a34da5bbcc1a6..18476bc7bf7c9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.OffsetDateTime; +import java.util.List; /** Represents security alert timeline item. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @@ -70,6 +71,22 @@ public final class SecurityAlertTimelineItem extends EntityTimelineItem { @JsonProperty(value = "alertType", required = true) private String alertType; + /* + * The intent of the alert. + */ + @JsonProperty(value = "intent", access = JsonProperty.Access.WRITE_ONLY) + private KillChainIntent intent; + + /* + * The techniques of the alert. + */ + @JsonProperty(value = "techniques") + private List techniques; + + /** Creates an instance of SecurityAlertTimelineItem class. */ + public SecurityAlertTimelineItem() { + } + /** * Get the azureResourceId property: The alert azure resource id. * @@ -250,6 +267,35 @@ public SecurityAlertTimelineItem withAlertType(String alertType) { return this; } + /** + * Get the intent property: The intent of the alert. + * + * @return the intent value. + */ + public KillChainIntent intent() { + return this.intent; + } + + /** + * Get the techniques property: The techniques of the alert. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert. + * + * @param techniques the techniques value to set. + * @return the SecurityAlertTimelineItem object itself. + */ + public SecurityAlertTimelineItem withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java index 119f867b58eba..c934ef0402219 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityGroupEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a security group entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SecurityGroup") -@Fluent +@Immutable public final class SecurityGroupEntity extends EntityInner { /* * SecurityGroup entity properties @@ -24,6 +24,10 @@ public final class SecurityGroupEntity extends EntityInner { @JsonProperty(value = "properties") private SecurityGroupEntityProperties innerProperties; + /** Creates an instance of SecurityGroupEntity class. */ + public SecurityGroupEntity() { + } + /** * Get the innerProperties property: SecurityGroup entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java index eb9b7a727ef69..16f1f3a2a2ef2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java @@ -42,12 +42,14 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ - SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -55,14 +57,12 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -71,16 +71,18 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @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 security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ - SecurityMLAnalyticsSetting createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -89,18 +91,16 @@ SecurityMLAnalyticsSetting createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @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 security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSetting createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -108,11 +108,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -120,12 +123,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java index 25eeab69e8b98..1f6989b762024 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java @@ -23,6 +23,10 @@ public final class SecurityMLAnalyticsSettingsDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of SecurityMLAnalyticsSettingsDataSource class. */ + public SecurityMLAnalyticsSettingsDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java index 81074368d1146..4a893dec833a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java @@ -13,6 +13,15 @@ public final class SecurityMLAnalyticsSettingsKind extends ExpandableStringEnum< /** Static value Anomaly for SecurityMLAnalyticsSettingsKind. */ public static final SecurityMLAnalyticsSettingsKind ANOMALY = fromString("Anomaly"); + /** + * Creates a new instance of SecurityMLAnalyticsSettingsKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityMLAnalyticsSettingsKind() { + } + /** * Creates or finds a SecurityMLAnalyticsSettingsKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java index 8b72b6ba1ce9d..da720ca5591bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java @@ -25,6 +25,10 @@ public final class SecurityMLAnalyticsSettingsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SecurityMLAnalyticsSettingsList class. */ + public SecurityMLAnalyticsSettingsList() { + } + /** * Get the nextLink property: URL to fetch the next set of SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java new file mode 100644 index 0000000000000..6185131fba800 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A single sentinel entity mapping. */ +@Fluent +public final class SentinelEntityMapping { + /* + * the column name to be mapped to the SentinelEntities + */ + @JsonProperty(value = "columnName") + private String columnName; + + /** Creates an instance of SentinelEntityMapping class. */ + public SentinelEntityMapping() { + } + + /** + * Get the columnName property: the column name to be mapped to the SentinelEntities. + * + * @return the columnName value. + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the columnName property: the column name to be mapped to the SentinelEntities. + * + * @param columnName the columnName value to set. + * @return the SentinelEntityMapping object itself. + */ + public SentinelEntityMapping withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java index abcc5d92aa343..97d1d3a659b08 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java @@ -15,12 +15,14 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @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 sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ - SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Get Sentinel onboarding state. @@ -28,14 +30,12 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @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 sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -43,11 +43,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Delete Sentinel onboarding state. @@ -55,40 +58,37 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ - SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); /** * Get Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java index 6ec2ac268c710..1b8478d489b8b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java @@ -22,6 +22,15 @@ public final class SettingKind extends ExpandableStringEnum { /** Static value Ueba for SettingKind. */ public static final SettingKind UEBA = fromString("Ueba"); + /** + * Creates a new instance of SettingKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingKind() { + } + /** * Creates or finds a SettingKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java index 94296a654ffb8..456e5b205918b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java @@ -19,6 +19,15 @@ public final class SettingType extends ExpandableStringEnum { /** Static value InfoMessage for SettingType. */ public static final SettingType INFO_MESSAGE = fromString("InfoMessage"); + /** + * Creates a new instance of SettingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingType() { + } + /** * Creates or finds a SettingType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java index f9cb8e47afa61..be00c933f58d0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java @@ -16,6 +16,15 @@ public final class SettingsStatus extends ExpandableStringEnum { /** Static value Flighting for SettingsStatus. */ public static final SettingsStatus FLIGHTING = fromString("Flighting"); + /** + * Creates a new instance of SettingsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingsStatus() { + } + /** * Creates or finds a SettingsStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java index 8fa041261e9ab..e527e9d824cd8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java @@ -25,6 +25,10 @@ public final class SourceControlList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SourceControlList class. */ + public SourceControlList() { + } + /** * Get the nextLink property: URL to fetch the next set of source controls. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java index d7301e3d70cc0..d01a07177d782 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java @@ -41,12 +41,14 @@ public interface SourceControlsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. + * @return a source control byt its identifier along with {@link Response}. */ - SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** * Gets a source control byt its identifier. @@ -54,14 +56,12 @@ public interface SourceControlsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. + * @return a source control byt its identifier. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); + SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); /** * Delete a source control. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sourceControlId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** * Delete a source control. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); + void delete(String resourceGroupName, String workspaceName, String sourceControlId); /** * Gets a source control byt its identifier. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java index 81b1a237ddf02..fe135dfaf18fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java @@ -22,6 +22,15 @@ public final class SourceKind extends ExpandableStringEnum { /** Static value SourceRepository for SourceKind. */ public static final SourceKind SOURCE_REPOSITORY = fromString("SourceRepository"); + /** + * Creates a new instance of SourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceKind() { + } + /** * Creates or finds a SourceKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java index b1e052ce22519..a1ee694bf57dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java @@ -16,6 +16,15 @@ public final class SourceType extends ExpandableStringEnum { /** Static value Remote storage for SourceType. */ public static final SourceType REMOTE_STORAGE = fromString("Remote storage"); + /** + * Creates a new instance of SourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceType() { + } + /** * Creates or finds a SourceType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java new file mode 100644 index 0000000000000..05a882686bdb1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** State of recommendation. */ +public final class State extends ExpandableStringEnum { + /** Static value Active for State. */ + public static final State ACTIVE = fromString("Active"); + + /** Static value Disabled for State. */ + public static final State DISABLED = fromString("Disabled"); + + /** Static value CompletedByUser for State. */ + public static final State COMPLETED_BY_USER = fromString("CompletedByUser"); + + /** Static value CompletedByAction for State. */ + public static final State COMPLETED_BY_ACTION = fromString("CompletedByAction"); + + /** Static value Hidden for State. */ + public static final State HIDDEN = fromString("Hidden"); + + /** + * Creates a new instance of State value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public State() { + } + + /** + * Creates or finds a State from its string representation. + * + * @param name a name to look for. + * @return the corresponding State. + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * Gets known State values. + * + * @return known State values. + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java index e1aa218951eff..573224bc8aad8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SubmissionMailEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +17,7 @@ /** Represents a submission mail entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SubmissionMail") -@Fluent +@Immutable public final class SubmissionMailEntity extends EntityInner { /* * Submission mail entity properties @@ -25,6 +25,10 @@ public final class SubmissionMailEntity extends EntityInner { @JsonProperty(value = "properties") private SubmissionMailEntityProperties innerProperties; + /** Creates an instance of SubmissionMailEntity class. */ + public SubmissionMailEntity() { + } + /** * Get the innerProperties property: Submission mail entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java index e911816eb754d..e0a4460671f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java @@ -19,6 +19,15 @@ public final class SupportTier extends ExpandableStringEnum { /** Static value Community for SupportTier. */ public static final SupportTier COMMUNITY = fromString("Community"); + /** + * Creates a new instance of SupportTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SupportTier() { + } + /** * Creates or finds a SupportTier from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java index 897fc3f44ce7a..d929ff3f5dae5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java @@ -21,6 +21,10 @@ public final class TICheckRequirements extends DataConnectorsCheckRequirements { @JsonProperty(value = "properties") private TICheckRequirementsProperties innerProperties; + /** Creates an instance of TICheckRequirements class. */ + public TICheckRequirements() { + } + /** * Get the innerProperties property: Threat Intelligence Platforms data connector check required properties. * @@ -30,6 +34,29 @@ private TICheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the TICheckRequirements object itself. + */ + public TICheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new TICheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java index 4d49f30e45e97..bddbd2d00a83b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java @@ -23,6 +23,10 @@ public final class TIDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private TIDataConnectorProperties innerProperties; + /** Creates an instance of TIDataConnector class. */ + public TIDataConnector() { + } + /** * Get the innerProperties property: TI (Threat Intelligence) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java index 6615ba9b2f749..728473320a946 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class TIDataConnectorDataTypes { @JsonProperty(value = "indicators", required = true) private TIDataConnectorDataTypesIndicators indicators; + /** Creates an instance of TIDataConnectorDataTypes class. */ + public TIDataConnectorDataTypes() { + } + /** * Get the indicators property: Data type for indicators connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java index a51ae50a528a8..84b7c9e247af0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java @@ -9,6 +9,10 @@ /** Data type for indicators connection. */ @Fluent public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { + /** Creates an instance of TIDataConnectorDataTypesIndicators class. */ + public TIDataConnectorDataTypesIndicators() { + } + /** {@inheritDoc} */ @Override public TIDataConnectorDataTypesIndicators withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java deleted file mode 100644 index 40d641ab84531..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Describes team properties. */ -@Fluent -public final class TeamProperties { - /* - * The name of the team - */ - @JsonProperty(value = "teamName", required = true) - private String teamName; - - /* - * The description of the team - */ - @JsonProperty(value = "teamDescription") - private String teamDescription; - - /* - * List of member IDs to add to the team - */ - @JsonProperty(value = "memberIds") - private List memberIds; - - /* - * List of group IDs to add their members to the team - */ - @JsonProperty(value = "groupIds") - private List groupIds; - - /** - * Get the teamName property: The name of the team. - * - * @return the teamName value. - */ - public String teamName() { - return this.teamName; - } - - /** - * Set the teamName property: The name of the team. - * - * @param teamName the teamName value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - /** - * Get the teamDescription property: The description of the team. - * - * @return the teamDescription value. - */ - public String teamDescription() { - return this.teamDescription; - } - - /** - * Set the teamDescription property: The description of the team. - * - * @param teamDescription the teamDescription value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamDescription(String teamDescription) { - this.teamDescription = teamDescription; - return this; - } - - /** - * Get the memberIds property: List of member IDs to add to the team. - * - * @return the memberIds value. - */ - public List memberIds() { - return this.memberIds; - } - - /** - * Set the memberIds property: List of member IDs to add to the team. - * - * @param memberIds the memberIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withMemberIds(List memberIds) { - this.memberIds = memberIds; - return this; - } - - /** - * Get the groupIds property: List of group IDs to add their members to the team. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: List of group IDs to add their members to the team. - * - * @param groupIds the groupIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (teamName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property teamName in model TeamProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateInstallationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateInstallationProperties.java new file mode 100644 index 0000000000000..c127aa158f55c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateInstallationProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplatePropertiesAutoGenerated; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** template installation properties. */ +@Fluent +public final class TemplateInstallationProperties { + /* + * Template Spec properties. + */ + @JsonProperty(value = "properties") + private TemplatePropertiesAutoGenerated properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** Creates an instance of TemplateInstallationProperties class. */ + public TemplateInstallationProperties() { + } + + /** + * Get the properties property: Template Spec properties. + * + * @return the properties value. + */ + public TemplatePropertiesAutoGenerated properties() { + return this.properties; + } + + /** + * Set the properties property: Template Spec properties. + * + * @param properties the properties value to set. + * @return the TemplateInstallationProperties object itself. + */ + public TemplateInstallationProperties withProperties(TemplatePropertiesAutoGenerated properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TemplateInstallationProperties object itself. + */ + public TemplateInstallationProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateList.java new file mode 100644 index 0000000000000..3bb7b41a4e2aa --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateList.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of all the template. */ +@Fluent +public final class TemplateList { + /* + * Array of templates. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * URL to fetch the next page of template. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TemplateList class. */ + public TemplateList() { + } + + /** + * Get the value property: Array of templates. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of templates. + * + * @param value the value value to set. + * @return the TemplateList object itself. + */ + public TemplateList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to fetch the next page of template. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model TemplateList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TemplateList.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateListAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateListAutoGenerated.java new file mode 100644 index 0000000000000..5faaeb2d0e35f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateListAutoGenerated.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of all the template. */ +@Fluent +public final class TemplateListAutoGenerated { + /* + * Array of templates. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * URL to fetch the next page of template. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TemplateListAutoGenerated class. */ + public TemplateListAutoGenerated() { + } + + /** + * Get the value property: Array of templates. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of templates. + * + * @param value the value value to set. + * @return the TemplateListAutoGenerated object itself. + */ + public TemplateListAutoGenerated withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to fetch the next page of template. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model TemplateListAutoGenerated")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TemplateListAutoGenerated.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModel.java new file mode 100644 index 0000000000000..13748d9c84b86 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModel.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner; +import java.time.LocalDate; +import java.util.List; + +/** An immutable client-side representation of TemplateModel. */ +public interface TemplateModel { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + String contentId(); + + /** + * Gets the parentId property: Full parent resource ID of the content item the template is for. This is the full + * resource ID including the scope (subscription and resource group). + * + * @return the parentId value. + */ + String parentId(); + + /** + * Gets the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + String version(); + + /** + * Gets the displayName property: The display name of the template. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + Kind contentKind(); + + /** + * Gets the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + MetadataSource source(); + + /** + * Gets the author property: The creator of the content item. + * + * @return the author value. + */ + MetadataAuthor author(); + + /** + * Gets the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + MetadataSupport support(); + + /** + * Gets the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + MetadataDependencies dependencies(); + + /** + * Gets the categories property: Categories for the item. + * + * @return the categories value. + */ + MetadataCategories categories(); + + /** + * Gets the providers property: Providers for the content item. + * + * @return the providers value. + */ + List providers(); + + /** + * Gets the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + LocalDate firstPublishDate(); + + /** + * Gets the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + LocalDate lastPublishDate(); + + /** + * Gets the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + String customVersion(); + + /** + * Gets the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + String contentSchemaVersion(); + + /** + * Gets the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + String icon(); + + /** + * Gets the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + List threatAnalysisTactics(); + + /** + * Gets the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + List threatAnalysisTechniques(); + + /** + * Gets the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + List previewImages(); + + /** + * Gets the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + List previewImagesDark(); + + /** + * Gets the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + String packageId(); + + /** + * Gets the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + PackageKind packageKind(); + + /** + * Gets the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + String packageName(); + + /** + * Gets the packagedContent property: the json to deploy. + * + * @return the packagedContent value. + */ + Object packagedContent(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelInner object. + * + * @return the inner object. + */ + TemplateModelInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModelAutoGenerated.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModelAutoGenerated.java new file mode 100644 index 0000000000000..6fec82f2e104e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateModelAutoGenerated.java @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplatePropertiesAutoGenerated; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of TemplateModelAutoGenerated. */ +public interface TemplateModelAutoGenerated { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the contentId property: Static ID for the content. Used to identify dependencies and content from solutions + * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the + * resource name. + * + * @return the contentId value. + */ + String contentId(); + + /** + * Gets the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, + * 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version + * checks. + * + * @return the version value. + */ + String version(); + + /** + * Gets the displayName property: The display name of the template. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the contentKind property: The kind of content the template is for. + * + * @return the contentKind value. + */ + Kind contentKind(); + + /** + * Gets the source property: Source of the content. This is where/how it was created. + * + * @return the source value. + */ + MetadataSource source(); + + /** + * Gets the author property: The creator of the content item. + * + * @return the author value. + */ + MetadataAuthor author(); + + /** + * Gets the support property: Support information for the template - type, name, contact information. + * + * @return the support value. + */ + MetadataSupport support(); + + /** + * Gets the dependencies property: Dependencies for the content item, what other content items it requires to work. + * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an + * id/kind/version can be supplied or operator/criteria for complex formats. + * + * @return the dependencies value. + */ + MetadataDependencies dependencies(); + + /** + * Gets the categories property: Categories for the item. + * + * @return the categories value. + */ + MetadataCategories categories(); + + /** + * Gets the providers property: Providers for the content item. + * + * @return the providers value. + */ + List providers(); + + /** + * Gets the firstPublishDate property: first publish date content item. + * + * @return the firstPublishDate value. + */ + LocalDate firstPublishDate(); + + /** + * Gets the lastPublishDate property: last publish date for the content item. + * + * @return the lastPublishDate value. + */ + LocalDate lastPublishDate(); + + /** + * Gets the customVersion property: The custom version of the content. A optional free text. + * + * @return the customVersion value. + */ + String customVersion(); + + /** + * Gets the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between + * different flow based on the schema version. + * + * @return the contentSchemaVersion value. + */ + String contentSchemaVersion(); + + /** + * Gets the icon property: the icon identifier. this id can later be fetched from the content metadata. + * + * @return the icon value. + */ + String icon(); + + /** + * Gets the threatAnalysisTactics property: the tactics the resource covers. + * + * @return the threatAnalysisTactics value. + */ + List threatAnalysisTactics(); + + /** + * Gets the threatAnalysisTechniques property: the techniques the resource covers, these have to be aligned with the + * tactics being used. + * + * @return the threatAnalysisTechniques value. + */ + List threatAnalysisTechniques(); + + /** + * Gets the previewImages property: preview image file names. These will be taken from the solution artifacts. + * + * @return the previewImages value. + */ + List previewImages(); + + /** + * Gets the previewImagesDark property: preview image file names. These will be taken from the solution artifacts. + * used for dark theme support. + * + * @return the previewImagesDark value. + */ + List previewImagesDark(); + + /** + * Gets the packageId property: the package Id contains this template. + * + * @return the packageId value. + */ + String packageId(); + + /** + * Gets the packageKind property: the packageKind of the package contains this template. + * + * @return the packageKind value. + */ + PackageKind packageKind(); + + /** + * Gets the packageName property: the name of the package contains this template. + * + * @return the packageName value. + */ + String packageName(); + + /** + * Gets the mainTemplate property: The JSON string of the template. + * + * @return the mainTemplate value. + */ + Object mainTemplate(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TemplateModelAutoGeneratedInner object. + * + * @return the inner object. + */ + TemplateModelAutoGeneratedInner innerModel(); + + /** The entirety of the TemplateModelAutoGenerated definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The TemplateModelAutoGenerated definition stages. */ + interface DefinitionStages { + /** The first stage of the TemplateModelAutoGenerated definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the TemplateModelAutoGenerated definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** + * The stage of the TemplateModelAutoGenerated definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + TemplateModelAutoGenerated create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + TemplateModelAutoGenerated create(Context context); + } + /** The stage of the TemplateModelAutoGenerated definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the TemplateModelAutoGenerated definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Template Spec properties.. + * + * @param properties Template Spec properties. + * @return the next definition stage. + */ + WithCreate withProperties(TemplatePropertiesAutoGenerated properties); + } + } + /** + * Begins update for the TemplateModelAutoGenerated resource. + * + * @return the stage of resource update. + */ + TemplateModelAutoGenerated.Update update(); + + /** The template for TemplateModelAutoGenerated update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + TemplateModelAutoGenerated apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + TemplateModelAutoGenerated apply(Context context); + } + /** The TemplateModelAutoGenerated update stages. */ + interface UpdateStages { + /** The stage of the TemplateModelAutoGenerated update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the TemplateModelAutoGenerated update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Template Spec properties.. + * + * @param properties Template Spec properties. + * @return the next definition stage. + */ + Update withProperties(TemplatePropertiesAutoGenerated properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + TemplateModelAutoGenerated refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + TemplateModelAutoGenerated refresh(Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java index f04cc179e840d..5e1474c1eb71a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java @@ -19,6 +19,15 @@ public final class TemplateStatus extends ExpandableStringEnum { /** Static value NotAvailable for TemplateStatus. */ public static final TemplateStatus NOT_AVAILABLE = fromString("NotAvailable"); + /** + * Creates a new instance of TemplateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TemplateStatus() { + } + /** * Creates or finds a TemplateStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java index 9acbec19c77f4..fb95037b9ee03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java @@ -46,6 +46,10 @@ public final class ThreatIntelligence { @JsonProperty(value = "threatType", access = JsonProperty.Access.WRITE_ONLY) private String threatType; + /** Creates an instance of ThreatIntelligence class. */ + public ThreatIntelligence() { + } + /** * Get the confidence property: Confidence (must be between 0 and 1). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java index 924536281280d..270af876c4348 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private ThreatIntelligenceAlertRuleProperties innerProperties; + /** Creates an instance of ThreatIntelligenceAlertRule class. */ + public ThreatIntelligenceAlertRule() { + } + /** * Get the innerProperties property: Threat Intelligence alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java index 734f6a42748a1..ad91fae35db7c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceAlertRuleTemplate extends AlertRuleTemplate @JsonProperty(value = "properties") private ThreatIntelligenceAlertRuleTemplateProperties innerProperties; + /** Creates an instance of ThreatIntelligenceAlertRuleTemplate class. */ + public ThreatIntelligenceAlertRuleTemplate() { + } + /** * Get the innerProperties property: Threat Intelligence alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java index 847257381b591..38a0f63db31c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java @@ -17,6 +17,10 @@ public final class ThreatIntelligenceAppendTags { @JsonProperty(value = "threatIntelligenceTags") private List threatIntelligenceTags; + /** Creates an instance of ThreatIntelligenceAppendTags class. */ + public ThreatIntelligenceAppendTags() { + } + /** * Get the threatIntelligenceTags property: List of tags to be appended. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java index 689e8a88e5646..7a86d8fe30a11 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java @@ -43,6 +43,10 @@ public final class ThreatIntelligenceExternalReference { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map hashes; + /** Creates an instance of ThreatIntelligenceExternalReference class. */ + public ThreatIntelligenceExternalReference() { + } + /** * Get the description property: External reference description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java index 86be0cc60915a..cecf231a67e7b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java @@ -89,6 +89,10 @@ public final class ThreatIntelligenceFilteringCriteria { @JsonProperty(value = "skipToken") private String skipToken; + /** Creates an instance of ThreatIntelligenceFilteringCriteria class. */ + public ThreatIntelligenceFilteringCriteria() { + } + /** * Get the pageSize property: Page size. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java index bb55e69667941..b052bbc4a4bb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java @@ -29,6 +29,10 @@ public final class ThreatIntelligenceGranularMarkingModel { @JsonProperty(value = "selectors") private List selectors; + /** Creates an instance of ThreatIntelligenceGranularMarkingModel class. */ + public ThreatIntelligenceGranularMarkingModel() { + } + /** * Get the language property: Language granular marking model. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java index a9e60f8006600..540eca0eb46cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java @@ -14,25 +14,25 @@ public interface ThreatIntelligenceIndicatorMetrics { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ - ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java index 5ce9f114369e2..cb0c015043d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceIn @JsonProperty(value = "properties") private ThreatIntelligenceIndicatorProperties innerProperties; + /** Creates an instance of ThreatIntelligenceIndicatorModel class. */ + public ThreatIntelligenceIndicatorModel() { + } + /** * Get the innerProperties property: Threat Intelligence Entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java index 464cb4b65fbe0..bf1b6241afe05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java @@ -10,20 +10,6 @@ /** Resource collection API of ThreatIntelligenceIndicators. */ public interface ThreatIntelligenceIndicators { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -43,17 +29,18 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -71,22 +58,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -109,16 +91,22 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -134,6 +122,18 @@ Response createWithResponse( */ Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -175,15 +175,18 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -192,18 +195,15 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -212,16 +212,18 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @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 threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ - ThreatIntelligenceInformation replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -230,16 +232,14 @@ ThreatIntelligenceInformation replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @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 threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ - Response replaceTagsWithResponse( + ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java index 63195abe89bbd..fc8d2b29c70cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java @@ -25,6 +25,10 @@ public final class ThreatIntelligenceInformationList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceInformationList class. */ + public ThreatIntelligenceInformationList() { + } + /** * Get the nextLink property: URL to fetch the next set of information objects. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java index 8a1ba6f2bd1d9..b9da00cd0cc65 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceKillChainPhase { @JsonProperty(value = "phaseName") private String phaseName; + /** Creates an instance of ThreatIntelligenceKillChainPhase class. */ + public ThreatIntelligenceKillChainPhase() { + } + /** * Get the killChainName property: Kill chainName name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java index 2cb0c00e17c5a..b1a55af9a16e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java @@ -35,6 +35,10 @@ public final class ThreatIntelligenceMetric { @JsonProperty(value = "sourceMetrics") private List sourceMetrics; + /** Creates an instance of ThreatIntelligenceMetric class. */ + public ThreatIntelligenceMetric() { + } + /** * Get the lastUpdatedTimeUtc property: Last updated indicator metric. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java index 62bd0e31c2fc0..9c4b6e14c4a99 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceMetricEntity { @JsonProperty(value = "metricValue") private Integer metricValue; + /** Creates an instance of ThreatIntelligenceMetricEntity class. */ + public ThreatIntelligenceMetricEntity() { + } + /** * Get the metricName property: Metric name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java index 2d20ceae39ac0..512a2b5cb9072 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java @@ -16,6 +16,10 @@ public final class ThreatIntelligenceMetrics { @JsonProperty(value = "properties") private ThreatIntelligenceMetric properties; + /** Creates an instance of ThreatIntelligenceMetrics class. */ + public ThreatIntelligenceMetrics() { + } + /** * Get the properties property: Threat intelligence metrics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java index 1a80738051c9f..f4b8451c20be6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceParsedPattern { @JsonProperty(value = "patternTypeValues") private List patternTypeValues; + /** Creates an instance of ThreatIntelligenceParsedPattern class. */ + public ThreatIntelligenceParsedPattern() { + } + /** * Get the patternTypeKey property: Pattern type key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java index ead9ca6b88336..9753eba99ef8e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceParsedPatternTypeValue { @JsonProperty(value = "value") private String value; + /** Creates an instance of ThreatIntelligenceParsedPatternTypeValue class. */ + public ThreatIntelligenceParsedPatternTypeValue() { + } + /** * Get the valueType property: Type of the value. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java index 6595128b74d9d..a064accb2a4f0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java @@ -13,6 +13,15 @@ public final class ThreatIntelligenceResourceKindEnum extends ExpandableStringEn /** Static value indicator for ThreatIntelligenceResourceKindEnum. */ public static final ThreatIntelligenceResourceKindEnum INDICATOR = fromString("indicator"); + /** + * Creates a new instance of ThreatIntelligenceResourceKindEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceResourceKindEnum() { + } + /** * Creates or finds a ThreatIntelligenceResourceKindEnum from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java index 7c51d95d08ad6..a09ed7f49e5ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceSortingCriteria { @JsonProperty(value = "sortOrder") private ThreatIntelligenceSortingCriteriaEnum sortOrder; + /** Creates an instance of ThreatIntelligenceSortingCriteria class. */ + public ThreatIntelligenceSortingCriteria() { + } + /** * Get the itemKey property: Column name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java index c5933ebe83428..4440f848cc0b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java @@ -20,6 +20,15 @@ public final class ThreatIntelligenceSortingCriteriaEnum /** Static value descending for ThreatIntelligenceSortingCriteriaEnum. */ public static final ThreatIntelligenceSortingCriteriaEnum DESCENDING = fromString("descending"); + /** + * Creates a new instance of ThreatIntelligenceSortingCriteriaEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceSortingCriteriaEnum() { + } + /** * Creates or finds a ThreatIntelligenceSortingCriteriaEnum from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java index a6e561d9e99ec..b0c802193a4df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java @@ -21,6 +21,10 @@ public final class TiTaxiiCheckRequirements extends DataConnectorsCheckRequireme @JsonProperty(value = "properties") private TiTaxiiCheckRequirementsProperties innerProperties; + /** Creates an instance of TiTaxiiCheckRequirements class. */ + public TiTaxiiCheckRequirements() { + } + /** * Get the innerProperties property: Threat Intelligence TAXII check required properties. * @@ -30,6 +34,29 @@ private TiTaxiiCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the TiTaxiiCheckRequirements object itself. + */ + public TiTaxiiCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new TiTaxiiCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java index 125e1dd55a280..abc44000e104f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java @@ -23,6 +23,10 @@ public final class TiTaxiiDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private TiTaxiiDataConnectorProperties innerProperties; + /** Creates an instance of TiTaxiiDataConnector class. */ + public TiTaxiiDataConnector() { + } + /** * Get the innerProperties property: Threat intelligence TAXII data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java index 22f12b8a6ab9f..520e9eb072dab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class TiTaxiiDataConnectorDataTypes { @JsonProperty(value = "taxiiClient", required = true) private TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient; + /** Creates an instance of TiTaxiiDataConnectorDataTypes class. */ + public TiTaxiiDataConnectorDataTypes() { + } + /** * Get the taxiiClient property: Data type for TAXII connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java index 7b2b40b0a6485..07402e5313caf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java @@ -9,6 +9,10 @@ /** Data type for TAXII connector. */ @Fluent public final class TiTaxiiDataConnectorDataTypesTaxiiClient extends DataConnectorDataTypeCommon { + /** Creates an instance of TiTaxiiDataConnectorDataTypesTaxiiClient class. */ + public TiTaxiiDataConnectorDataTypesTaxiiClient() { + } + /** {@inheritDoc} */ @Override public TiTaxiiDataConnectorDataTypesTaxiiClient withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java index d34ece2d531a3..49301c2fffb26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java @@ -23,6 +23,10 @@ public final class TimelineAggregation { @JsonProperty(value = "kind", required = true) private EntityTimelineKind kind; + /** Creates an instance of TimelineAggregation class. */ + public TimelineAggregation() { + } + /** * Get the count property: the total items found for a kind. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java index e6c563cb369f9..3deb6ab0b32e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java @@ -29,6 +29,10 @@ public final class TimelineError { @JsonProperty(value = "errorMessage", required = true) private String errorMessage; + /** Creates an instance of TimelineError class. */ + public TimelineError() { + } + /** * Get the kind property: the query kind. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java index 7d42bccca4700..0e2fbed3b2ab6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java @@ -30,6 +30,10 @@ public final class TimelineResultsMetadata { @JsonProperty(value = "errors") private List errors; + /** Creates an instance of TimelineResultsMetadata class. */ + public TimelineResultsMetadata() { + } + /** * Get the totalCount property: the total items found for the timeline request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java new file mode 100644 index 0000000000000..b8117c24c87ce --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of TriggeredAnalyticsRuleRun. */ +public interface TriggeredAnalyticsRuleRun { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + OffsetDateTime executionTimeUtc(); + + /** + * Gets the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + String ruleId(); + + /** + * Gets the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + String triggeredAnalyticsRuleRunId(); + + /** + * Gets the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + Map ruleRunAdditionalData(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner object. + * + * @return the inner object. + */ + TriggeredAnalyticsRuleRunInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java new file mode 100644 index 0000000000000..c883a4aa0e7a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of TriggeredAnalyticsRuleRunOperations. */ +public interface TriggeredAnalyticsRuleRunOperations { + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context); + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + TriggeredAnalyticsRuleRun get(String resourceGroupName, String workspaceName, String ruleRunId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java new file mode 100644 index 0000000000000..40a4ddfc0cebb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The triggered analytics rule run array. */ +@Fluent +public final class TriggeredAnalyticsRuleRuns { + /* + * The value property. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TriggeredAnalyticsRuleRuns class. */ + public TriggeredAnalyticsRuleRuns() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the TriggeredAnalyticsRuleRuns object itself. + */ + public TriggeredAnalyticsRuleRuns withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model TriggeredAnalyticsRuleRuns")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRuns.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java index 9bb9323008777..ebeed445bade8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java @@ -16,6 +16,15 @@ public final class TriggersOn extends ExpandableStringEnum { /** Static value Alerts for TriggersOn. */ public static final TriggersOn ALERTS = fromString("Alerts"); + /** + * Creates a new instance of TriggersOn value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersOn() { + } + /** * Creates or finds a TriggersOn from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java index 84c11fc4fc6b0..20aa5497f51e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java @@ -16,6 +16,15 @@ public final class TriggersWhen extends ExpandableStringEnum { /** Static value Updated for TriggersWhen. */ public static final TriggersWhen UPDATED = fromString("Updated"); + /** + * Creates a new instance of TriggersWhen value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersWhen() { + } + /** * Creates or finds a TriggersWhen from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java index 5a79fd5025442..ca29e5d7ff22b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java @@ -23,6 +23,10 @@ public final class Ueba extends SettingsInner { @JsonProperty(value = "properties") private UebaProperties innerProperties; + /** Creates an instance of Ueba class. */ + public Ueba() { + } + /** * Get the innerProperties property: Ueba properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java index 8548886d5a2db..9590f086602ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java @@ -22,6 +22,15 @@ public final class UebaDataSources extends ExpandableStringEnum /** Static value SigninLogs for UebaDataSources. */ public static final UebaDataSources SIGNIN_LOGS = fromString("SigninLogs"); + /** + * Creates a new instance of UebaDataSources value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UebaDataSources() { + } + /** * Creates or finds a UebaDataSources from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java new file mode 100644 index 0000000000000..da5da9ac1aa13 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.Context; +import java.util.List; +import java.util.UUID; + +/** Resource collection API of Updates. */ +public interface Updates { + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java index 0af80094b7e0f..e8975502da54c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.UrlEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a url entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Url") -@Fluent +@Immutable public final class UrlEntity extends EntityInner { /* * Url entity properties @@ -23,6 +23,10 @@ public final class UrlEntity extends EntityInner { @JsonProperty(value = "properties") private UrlEntityProperties innerProperties; + /** Creates an instance of UrlEntity class. */ + public UrlEntity() { + } + /** * Get the innerProperties property: Url entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java index 8d8dc55f03095..000883c8a5f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java @@ -29,6 +29,10 @@ public final class UserInfo { @JsonProperty(value = "objectId") private UUID objectId; + /** Creates an instance of UserInfo class. */ + public UserInfo() { + } + /** * Get the email property: The email of the user. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java index 7b74ced2e0681..2a7a5066bdeea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java @@ -23,6 +23,10 @@ public final class ValidationError { @JsonProperty(value = "errorMessages", access = JsonProperty.Access.WRITE_ONLY) private List errorMessages; + /** Creates an instance of ValidationError class. */ + public ValidationError() { + } + /** * Get the recordIndex property: The number of the record that has the error. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java index 285474b81325a..206f7814f0aa2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java @@ -16,6 +16,15 @@ public final class Version extends ExpandableStringEnum { /** Static value V2 for Version. */ public static final Version V2 = fromString("V2"); + /** + * Creates a new instance of Version value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Version() { + } + /** * Creates or finds a Version from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java index 97bc46f5f4bd7..746fe1d8db214 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java @@ -25,6 +25,10 @@ public final class WatchlistItemList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistItemList class. */ + public WatchlistItemList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlist item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java index 9b56cdba24034..2c03a7964f815 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java @@ -48,12 +48,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ - WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Gets a watchlist, without its watchlist items. @@ -62,14 +64,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. @@ -78,11 +78,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. @@ -91,14 +94,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java index 4e03f77f637e8..4c0e933d47db5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java @@ -25,6 +25,10 @@ public final class WatchlistList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistList class. */ + public WatchlistList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlists. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java index 4e53d746f0644..026f4b39fa712 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java @@ -44,12 +44,14 @@ public interface Watchlists { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ - Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Gets a watchlist, without its watchlist items. @@ -57,14 +59,12 @@ public interface Watchlists { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. @@ -72,11 +72,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. @@ -84,14 +87,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java index 5356e46d32f66..8d9c07b9c859d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,8 @@ public final class WatchlistsCreateOrUpdateHeaders { @JsonProperty(value = "Azure-AsyncOperation") private String azureAsyncOperation; + private static final HttpHeaderName AZURE_ASYNC_OPERATION = HttpHeaderName.fromString("Azure-AsyncOperation"); + // HttpHeaders containing the raw property values. /** * Creates an instance of WatchlistsCreateOrUpdateHeaders class. @@ -24,7 +27,7 @@ public final class WatchlistsCreateOrUpdateHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public WatchlistsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); + this.azureAsyncOperation = rawHeaders.getValue(AZURE_ASYNC_OPERATION); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java index 8105fba3b9de5..fcbaf71f20790 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,8 @@ public final class WatchlistsDeleteHeaders { @JsonProperty(value = "Azure-AsyncOperation") private String azureAsyncOperation; + private static final HttpHeaderName AZURE_ASYNC_OPERATION = HttpHeaderName.fromString("Azure-AsyncOperation"); + // HttpHeaders containing the raw property values. /** * Creates an instance of WatchlistsDeleteHeaders class. @@ -24,7 +27,7 @@ public final class WatchlistsDeleteHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public WatchlistsDeleteHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); + this.azureAsyncOperation = rawHeaders.getValue(AZURE_ASYNC_OPERATION); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java index 8495bcf9e510f..d1be4d11642a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java @@ -34,6 +34,10 @@ public final class Webhook { @JsonProperty(value = "rotateWebhookSecret") private Boolean rotateWebhookSecret; + /** Creates an instance of Webhook class. */ + public Webhook() { + } + /** * Get the webhookId property: Unique identifier for the webhook. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfiguration.java new file mode 100644 index 0000000000000..68e36df7f9d07 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfiguration.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; + +/** An immutable client-side representation of WorkspaceManagerConfiguration. */ +public interface WorkspaceManagerConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Resource Etag. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the mode property: The current mode of the workspace manager configuration. + * + * @return the mode value. + */ + Mode mode(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner + * object. + * + * @return the inner object. + */ + WorkspaceManagerConfigurationInner innerModel(); + + /** The entirety of the WorkspaceManagerConfiguration definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The WorkspaceManagerConfiguration definition stages. */ + interface DefinitionStages { + /** The first stage of the WorkspaceManagerConfiguration definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the WorkspaceManagerConfiguration definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** + * The stage of the WorkspaceManagerConfiguration definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithMode { + /** + * Executes the create request. + * + * @return the created resource. + */ + WorkspaceManagerConfiguration create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + WorkspaceManagerConfiguration create(Context context); + } + /** The stage of the WorkspaceManagerConfiguration definition allowing to specify mode. */ + interface WithMode { + /** + * Specifies the mode property: The current mode of the workspace manager configuration. + * + * @param mode The current mode of the workspace manager configuration. + * @return the next definition stage. + */ + WithCreate withMode(Mode mode); + } + } + /** + * Begins update for the WorkspaceManagerConfiguration resource. + * + * @return the stage of resource update. + */ + WorkspaceManagerConfiguration.Update update(); + + /** The template for WorkspaceManagerConfiguration update. */ + interface Update extends UpdateStages.WithMode { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkspaceManagerConfiguration apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkspaceManagerConfiguration apply(Context context); + } + /** The WorkspaceManagerConfiguration update stages. */ + interface UpdateStages { + /** The stage of the WorkspaceManagerConfiguration update allowing to specify mode. */ + interface WithMode { + /** + * Specifies the mode property: The current mode of the workspace manager configuration. + * + * @param mode The current mode of the workspace manager configuration. + * @return the next definition stage. + */ + Update withMode(Mode mode); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + WorkspaceManagerConfiguration refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + WorkspaceManagerConfiguration refresh(Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurationList.java new file mode 100644 index 0000000000000..f612c25090639 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurationList.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerConfigurationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List all the workspace manager configurations for the workspace. */ +@Fluent +public final class WorkspaceManagerConfigurationList { + /* + * URL to fetch the next set of workspace manager configurations. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /* + * Array of workspace manager configurations. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of WorkspaceManagerConfigurationList class. */ + public WorkspaceManagerConfigurationList() { + } + + /** + * Get the nextLink property: URL to fetch the next set of workspace manager configurations. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Get the value property: Array of workspace manager configurations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of workspace manager configurations. + * + * @param value the value value to set. + * @return the WorkspaceManagerConfigurationList object itself. + */ + public WorkspaceManagerConfigurationList withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model WorkspaceManagerConfigurationList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerConfigurationList.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurations.java new file mode 100644 index 0000000000000..dbbb6d43b9d02 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerConfigurations.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of WorkspaceManagerConfigurations. */ +public interface WorkspaceManagerConfigurations { + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all workspace manager configurations for a Sentinel workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager configurations for a Sentinel workspace as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken, Context context); + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager configuration along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context); + + /** + * Gets a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 workspace manager configuration. + */ + WorkspaceManagerConfiguration get( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName); + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName, Context context); + + /** + * Deletes a workspace manager configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerConfigurationName The name of the workspace manager configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String workspaceManagerConfigurationName); + + /** + * Gets a workspace manager configuration. + * + * @param id the 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 a workspace manager configuration along with {@link Response}. + */ + WorkspaceManagerConfiguration getById(String id); + + /** + * Gets a workspace manager configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager configuration along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a workspace manager configuration. + * + * @param id the 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. + */ + void deleteById(String id); + + /** + * Deletes a workspace manager configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkspaceManagerConfiguration resource. + * + * @param name resource name. + * @return the first stage of the new WorkspaceManagerConfiguration definition. + */ + WorkspaceManagerConfiguration.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMember.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMember.java new file mode 100644 index 0000000000000..483bf08696326 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMember.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; + +/** An immutable client-side representation of WorkspaceManagerMember. */ +public interface WorkspaceManagerMember { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Resource Etag. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @return the targetWorkspaceId value. + */ + String targetWorkspaceId(); + + /** + * Gets the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * + * @return the targetWorkspaceTenantId value. + */ + String targetWorkspaceTenantId(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner object. + * + * @return the inner object. + */ + WorkspaceManagerMemberInner innerModel(); + + /** The entirety of the WorkspaceManagerMember definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The WorkspaceManagerMember definition stages. */ + interface DefinitionStages { + /** The first stage of the WorkspaceManagerMember definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the WorkspaceManagerMember definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** + * The stage of the WorkspaceManagerMember definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTargetWorkspaceId, DefinitionStages.WithTargetWorkspaceTenantId { + /** + * Executes the create request. + * + * @return the created resource. + */ + WorkspaceManagerMember create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + WorkspaceManagerMember create(Context context); + } + /** The stage of the WorkspaceManagerMember definition allowing to specify targetWorkspaceId. */ + interface WithTargetWorkspaceId { + /** + * Specifies the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace + * joining the given Sentinel workspace manager. + * + * @param targetWorkspaceId Fully qualified resource ID of the target Sentinel workspace joining the given + * Sentinel workspace manager. + * @return the next definition stage. + */ + WithCreate withTargetWorkspaceId(String targetWorkspaceId); + } + /** The stage of the WorkspaceManagerMember definition allowing to specify targetWorkspaceTenantId. */ + interface WithTargetWorkspaceTenantId { + /** + * Specifies the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @param targetWorkspaceTenantId Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * @return the next definition stage. + */ + WithCreate withTargetWorkspaceTenantId(String targetWorkspaceTenantId); + } + } + /** + * Begins update for the WorkspaceManagerMember resource. + * + * @return the stage of resource update. + */ + WorkspaceManagerMember.Update update(); + + /** The template for WorkspaceManagerMember update. */ + interface Update extends UpdateStages.WithTargetWorkspaceId, UpdateStages.WithTargetWorkspaceTenantId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkspaceManagerMember apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkspaceManagerMember apply(Context context); + } + /** The WorkspaceManagerMember update stages. */ + interface UpdateStages { + /** The stage of the WorkspaceManagerMember update allowing to specify targetWorkspaceId. */ + interface WithTargetWorkspaceId { + /** + * Specifies the targetWorkspaceId property: Fully qualified resource ID of the target Sentinel workspace + * joining the given Sentinel workspace manager. + * + * @param targetWorkspaceId Fully qualified resource ID of the target Sentinel workspace joining the given + * Sentinel workspace manager. + * @return the next definition stage. + */ + Update withTargetWorkspaceId(String targetWorkspaceId); + } + /** The stage of the WorkspaceManagerMember update allowing to specify targetWorkspaceTenantId. */ + interface WithTargetWorkspaceTenantId { + /** + * Specifies the targetWorkspaceTenantId property: Tenant id of the target Sentinel workspace joining the + * given Sentinel workspace manager. + * + * @param targetWorkspaceTenantId Tenant id of the target Sentinel workspace joining the given Sentinel + * workspace manager. + * @return the next definition stage. + */ + Update withTargetWorkspaceTenantId(String targetWorkspaceTenantId); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + WorkspaceManagerMember refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + WorkspaceManagerMember refresh(Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembers.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembers.java new file mode 100644 index 0000000000000..8b3c50a4e9fd5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembers.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of WorkspaceManagerMembers. */ +public interface WorkspaceManagerMembers { + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all workspace manager members that exist for the given Sentinel workspace manager. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param orderby Sorts the results. Optional. + * @param top Returns only the first n results. Optional. + * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that + * specifies a starting point to use for subsequent calls. Optional. + * @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 all workspace manager members that exist for the given Sentinel workspace manager as paginated response + * with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String orderby, Integer top, String skipToken, Context context); + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager member along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context); + + /** + * Gets a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 workspace manager member. + */ + WorkspaceManagerMember get(String resourceGroupName, String workspaceName, String workspaceManagerMemberName); + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String workspaceManagerMemberName, Context context); + + /** + * Deletes a workspace manager member. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param workspaceManagerMemberName The name of the workspace manager member. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String workspaceManagerMemberName); + + /** + * Gets a workspace manager member. + * + * @param id the 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 a workspace manager member along with {@link Response}. + */ + WorkspaceManagerMember getById(String id); + + /** + * Gets a workspace manager member. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workspace manager member along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a workspace manager member. + * + * @param id the 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. + */ + void deleteById(String id); + + /** + * Deletes a workspace manager member. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkspaceManagerMember resource. + * + * @param name resource name. + * @return the first stage of the new WorkspaceManagerMember definition. + */ + WorkspaceManagerMember.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembersList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembersList.java new file mode 100644 index 0000000000000..8dfb8cfc34104 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WorkspaceManagerMembersList.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.WorkspaceManagerMemberInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of workspace manager members. */ +@Fluent +public final class WorkspaceManagerMembersList { + /* + * URL to fetch the next set of workspace manager members + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /* + * Array of workspace manager members + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of WorkspaceManagerMembersList class. */ + public WorkspaceManagerMembersList() { + } + + /** + * Get the nextLink property: URL to fetch the next set of workspace manager members. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Get the value property: Array of workspace manager members. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of workspace manager members. + * + * @param value the value value to set. + * @return the WorkspaceManagerMembersList object itself. + */ + public WorkspaceManagerMembersList withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model WorkspaceManagerMembersList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceManagerMembersList.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java index 68e39f44ac620..fb0db4fbecb2f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java index 4eade4f804870..ca213bc70844d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -25,6 +23,6 @@ public static void deleteAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java index 3d2f9a3fcd1a7..e4e4b19473921 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -25,6 +23,6 @@ public static void getAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java index 61efbd321ea97..894d361a11e2d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -18,6 +16,9 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java new file mode 100644 index 0000000000000..e371036531cca --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.time.OffsetDateTime; + +/** Samples for AlertRuleOperation TriggerRuleRun. */ +public final class AlertRuleOperationTriggerRuleRunSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json + */ + /** + * Sample code: triggerRuleRun_Post. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggerRuleRunPost(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRuleOperations() + .triggerRuleRun( + "myRg", + "myWorkspace", + "65360bb0-8986-4ade-a89d-af3cf44d28aa", + new AnalyticsRuleRunTrigger().withExecutionTimeUtc(OffsetDateTime.parse("2022-12-22T15:37:03.074Z")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java index 5e2ef04f866cc..c174dcb56d8ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -20,6 +18,7 @@ public static void getAlertRuleTemplateById( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java index 30931adbd1bbc..dcfada858d67b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -18,6 +16,6 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java index df3209f52c0cd..877c2147eacdb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java @@ -4,9 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; +import com.azure.resourcemanager.securityinsights.models.AlertProperty; +import com.azure.resourcemanager.securityinsights.models.AlertPropertyMapping; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -26,6 +27,7 @@ import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; import java.util.Arrays; @@ -35,7 +37,7 @@ /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -254,11 +256,11 @@ public static void createsOrUpdatesAFusionAlertRule( .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -278,11 +280,11 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -350,12 +352,26 @@ public static void createsOrUpdatesAScheduledAlertRule( .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - Context.NONE); + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}") + .withAlertDynamicProperties( + Arrays + .asList( + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_COMPONENT_NAME) + .withValue("ProductComponentNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_NAME) + .withValue("ProductNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.ALERT_LINK) + .withValue("Link")))) + .withSentinelEntitiesMappings( + Arrays.asList(new SentinelEntityMapping().withColumnName("Entities"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json */ /** * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. @@ -574,11 +590,11 @@ public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -619,7 +635,7 @@ public static void createsOrUpdatesANrtAlertRule( Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))) .withEventGroupingSettings( new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java index ae8c5d3527899..42f536577f929 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -19,6 +17,7 @@ public final class AlertRulesDeleteSamples { public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java index 5f59cda357eb7..f799b5cee9106 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -20,11 +18,12 @@ public static void getAScheduledAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -34,11 +33,12 @@ public static void getAScheduledAlertRule( public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -46,11 +46,13 @@ public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights. * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -61,6 +63,10 @@ public static void getAMicrosoftSecurityIncidentCreationRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); + .getWithResponse( + "myRg", + "myWorkspace", + "microsoftSecurityIncidentCreationRuleExample", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java index a76a803ecb342..4cdf74754451b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -17,6 +15,6 @@ public final class AlertRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); + manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java index 0ddbba866ce2c..242869abbcb66 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java index 9931b428f9930..db969336e902f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -20,6 +18,7 @@ public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java index 79bd1f2bf1dd3..ab0ecdacb5b00 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -19,6 +17,7 @@ public final class AutomationRulesGetSamples { public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java index cb067a4161d23..8ca15d52f1935 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -17,6 +15,6 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java index 02135e4b1f24a..7a53ff4f9d5c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -30,6 +29,6 @@ public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.S .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java index 4ee602ef802a8..1f11835f4f54a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java index 90fe86d803f01..9f5872db510bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -25,6 +23,6 @@ public static void deleteTheBookmarkRelation( "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java index 6ae73ac9318f4..cd5115be98544 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -25,6 +23,6 @@ public static void getABookmarkRelation( "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java index c04cb45847c23..515dd4ffb8d09 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -20,6 +18,14 @@ public static void getAllBookmarkRelations( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "2216d0e1-91e3-4902-89fd-d2df8c535096", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java index f54f13ae59da1..65a4b5a9cb390 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java index adaf45b1a342c..a7af0694f9440 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksDeleteSamples { public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java index cca078fc516b2..ada11f7358c5a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksGetSamples { public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java index 7ff9e9471b73b..1321a7a52f590 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -17,6 +15,6 @@ public final class BookmarksListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); + manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationInstallSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationInstallSamples.java new file mode 100644 index 0000000000000..e3dc5e0c8bca0 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationInstallSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.PackageProperties; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ContentPackageOperation Install. */ +public final class ContentPackageOperationInstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/InstallPackage.json + */ + /** + * Sample code: Install a package to the workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void installAPackageToTheWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackageOperations() + .define("str.azure-sentinel-solution-str") + .withExistingWorkspace("myRg", "myWorkspace") + .withTags(mapOf("tag1", "str")) + .withProperties( + new PackageProperties() + .withPackageKind(PackageKind.SOLUTION) + .withVersion("2.0.0") + .withDisplayName("str")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationUninstallSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationUninstallSamples.java new file mode 100644 index 0000000000000..a9858ea17f9f8 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackageOperationUninstallSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ContentPackageOperation Uninstall. */ +public final class ContentPackageOperationUninstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/UninstallPackage.json + */ + /** + * Sample code: Uninstall a package from the workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void uninstallAPackageFromTheWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackageOperations() + .uninstallWithResponse( + "myRg", "myWorkspace", "str.azure-sentinel-solution-str", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesGetSamples.java new file mode 100644 index 0000000000000..75e831346d54d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesGetSamples.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.securityinsights.generated; + +/** Samples for ContentPackages Get. */ +public final class ContentPackagesGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetPackageById.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentPackages() + .getWithResponse( + "myRg", + "myWorkspace", + "str.azure-sentinel-solution-str", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesListSamples.java new file mode 100644 index 0000000000000..3652cad496075 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentPackagesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ContentPackages List. */ +public final class ContentPackagesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetPackages.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.contentPackages().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationDeleteSamples.java new file mode 100644 index 0000000000000..835df105bfd66 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ContentTemplateOperation Delete. */ +public final class ContentTemplateOperationDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/DeleteTemplate.json + */ + /** + * Sample code: Delete metadata. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplateOperations() + .deleteWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationGetSamples.java new file mode 100644 index 0000000000000..d5f5a44f113bb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ContentTemplateOperation Get. */ +public final class ContentTemplateOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetTemplateById.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplateOperations() + .getWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationInstallSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationInstallSamples.java new file mode 100644 index 0000000000000..b27d12f55173b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplateOperationInstallSamples.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.securityinsights.fluent.models.TemplatePropertiesAutoGenerated; +import com.azure.resourcemanager.securityinsights.models.Kind; +import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; +import com.azure.resourcemanager.securityinsights.models.MetadataSource; +import com.azure.resourcemanager.securityinsights.models.MetadataSupport; +import com.azure.resourcemanager.securityinsights.models.PackageKind; +import com.azure.resourcemanager.securityinsights.models.SourceKind; +import com.azure.resourcemanager.securityinsights.models.SupportTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ContentTemplateOperation Install. */ +public final class ContentTemplateOperationInstallSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/InstallTemplate.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) + throws IOException { + manager + .contentTemplateOperations() + .define("str.azure-sentinel-solution-str") + .withExistingWorkspace("myRg", "myWorkspace") + .withTags(mapOf("tag1", "str")) + .withProperties( + new TemplatePropertiesAutoGenerated() + .withContentId("8365ebfe-a381-45b7-ad08-7d818070e11f") + .withVersion("1.0.1") + .withDisplayName("API Protection workbook template") + .withContentKind(Kind.ANALYTICS_RULE) + .withSource( + new MetadataSource() + .withKind(SourceKind.SOLUTION) + .withName("str") + .withSourceId("str.azure-sentinel-solution-str")) + .withAuthor(new MetadataAuthor().withName("Microsoft").withEmail("support@microsoft.com")) + .withSupport( + new MetadataSupport() + .withTier(SupportTier.MICROSOFT) + .withName("Microsoft Corporation") + .withEmail("support@microsoft.com") + .withLink("https://support.microsoft.com/")) + .withPackageId("str.azure-sentinel-solution-str") + .withPackageKind(PackageKind.SOLUTION) + .withPackageName("str") + .withMainTemplate( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"$schema\":\"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\"contentVersion\":\"1.0.1\",\"resources\":[{\"name\":\"8365ebfe-a381-45b7-ad08-7d818070e11f\",\"type\":\"Microsoft.SecurityInsights/AlertRuleTemplates\",\"apiVersion\":\"2022-04-01-preview\",\"kind\":\"Scheduled\",\"location\":\"[parameters('workspace-location')]\",\"properties\":{\"description\":\"Creates" + + " an incident when a large number of Critical/High severity CrowdStrike Falcon" + + " sensor detections is triggered by a single user\",\"displayName\":\"Critical or" + + " High Severity Detections by" + + " User\",\"enabled\":false,\"query\":\"...\",\"queryFrequency\":\"PT1H\",\"queryPeriod\":\"PT1H\",\"severity\":\"High\",\"status\":\"Available\",\"suppressionDuration\":\"PT1H\",\"suppressionEnabled\":false,\"triggerOperator\":\"GreaterThan\",\"triggerThreshold\":0}},{\"name\":\"[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('AnalyticsRule-'," + + " last(split([resourceId('Microsoft.SecurityInsights/AlertRuleTemplates'," + + " 8365ebfe-a381-45b7-ad08-7d818070e11f)],'/'))))]\",\"type\":\"Microsoft.OperationalInsights/workspaces/providers/metadata\",\"apiVersion\":\"2022-01-01-preview\",\"properties\":{\"description\":\"CrowdStrike" + + " Falcon Endpoint Protection Analytics Rule" + + " 1\",\"author\":{\"name\":\"Microsoft\",\"email\":\"support@microsoft.com\"},\"contentId\":\"4465ebde-b381-45f7-ad08-7d818070a11c\",\"kind\":\"AnalyticsRule\",\"parentId\":\"[resourceId('Microsoft.SecurityInsights/AlertRuleTemplates'," + + " 8365ebfe-a381-45b7-ad08-7d818070e11f)]\",\"source\":{\"name\":\"str\",\"kind\":\"Solution\",\"sourceId\":\"str.azure-sentinel-solution-str\"},\"support\":{\"name\":\"Microsoft" + + " Corporation\",\"email\":\"support@microsoft.com\",\"link\":\"https://support.microsoft.com/\",\"tier\":\"Microsoft\"},\"version\":\"1.0.0\"}}]}", + Object.class, + SerializerEncoding.JSON))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplatesListSamples.java new file mode 100644 index 0000000000000..d431ff08141d5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ContentTemplatesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ContentTemplates List. */ +public final class ContentTemplatesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetTemplates.json + */ + /** + * Sample code: Get all installed templates. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllInstalledTemplates( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .contentTemplates() + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java index 236b908d09558..1aeb8e4f5031d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java @@ -4,12 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; @@ -22,7 +22,7 @@ /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -33,11 +33,15 @@ public static void checkRequirementsForOfficeATP( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeAtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json */ /** * Sample code: Check requirements for Office365Project. @@ -48,26 +52,34 @@ public static void checkRequirementsForOffice365Project( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Office365ProjectCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** - * Sample code: Check requirements for AAD. + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection) - no authorization. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAAD( + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtectionNoAuthorization( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -78,11 +90,15 @@ public static void checkRequirementsForMcas( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsIoT.json */ /** * Sample code: Check requirements for IoT. @@ -97,11 +113,11 @@ public static void checkRequirementsForIoT( "myRg", "myWorkspace", new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -112,45 +128,54 @@ public static void checkRequirementsForMdatp( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** - * Sample code: Check requirements for AAD - no authorization. + * Sample code: Check requirements for ASC. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAADNoAuthorization( + public static void checkRequirementsForASC( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftPurviewInformationProtection.json */ /** - * Sample code: Check requirements for ASC. + * Sample code: Check requirements for MicrosoftPurviewInformationProtection. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForASC( + public static void checkRequirementsForMicrosoftPurviewInformationProtection( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() .postWithResponse( "myRg", "myWorkspace", - new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + new MicrosoftPurviewInformationProtectionCheckRequirements() + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -161,11 +186,15 @@ public static void checkRequirementsForMicrosoftThreatProtection( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -176,11 +205,15 @@ public static void checkRequirementsForTITaxii( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TiTaxiiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -191,11 +224,15 @@ public static void checkRequirementsForOfficeIRM( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeIrmCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -206,11 +243,34 @@ public static void checkRequirementsForMicrosoftThreatIntelligence( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MstiCheckRequirements().withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + */ + /** + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection). + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtection( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json */ /** * Sample code: Check requirements for OfficePowerBI. @@ -221,11 +281,15 @@ public static void checkRequirementsForOfficePowerBI( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficePowerBICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -236,26 +300,34 @@ public static void checkRequirementsForDynamics365( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Dynamics365CheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** - * Sample code: Check requirements for AAD - no license. + * Sample code: Check requirements for AADIP (Azure Active Directory Identity Protection) - no license. * * @param manager Entry point to SecurityInsightsManager. */ - public static void checkRequirementsForAADNoLicense( + public static void checkRequirementsForAADIPAzureActiveDirectoryIdentityProtectionNoLicense( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -266,6 +338,10 @@ public static void checkRequirementsForTI( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java index d00218190776a..e0587eb5ea13b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; @@ -15,7 +14,7 @@ /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json */ /** * Sample code: Connect an APIPolling V2 logs data connector. @@ -32,7 +31,7 @@ public static void connectAnAPIPollingV2LogsDataConnector( "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") .withOutputStream("Custom-MyTableRawData") @@ -46,11 +45,11 @@ public static void connectAnAPIPollingV2LogsDataConnector( + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -67,7 +66,7 @@ public static void connectAnAPIPollingDataConnector( "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withRequestConfigUserInputValues( Arrays .asList( @@ -78,6 +77,6 @@ public static void connectAnAPIPollingDataConnector( + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java index 8a4b352fb2740..ec44784f29091 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.Availability; import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; @@ -28,6 +27,18 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesAlerts; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesIncidents; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; +import com.azure.resourcemanager.securityinsights.models.MtpProvider; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -60,7 +71,34 @@ /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MicrosoftPurviewInformationProtectionDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MicrosoftPurviewInformationProtectionConnectorDataTypes() + .withLogs( + new MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() + .withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -84,11 +122,40 @@ public static void createsOrUpdatesAnOffice365DataConnector( new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftThreatProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates a MicrosoftThreatProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MtpDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MtpDataConnectorDataTypes() + .withIncidents(new MtpDataConnectorDataTypesIncidents().withState(DataTypeState.DISABLED)) + .withAlerts(new MtpDataConnectorDataTypesAlerts().withState(DataTypeState.ENABLED))) + .withFilteredProviders( + new MtpFilteredProviders() + .withAlerts(Arrays.asList(MtpProvider.MICROSOFT_DEFENDER_FOR_CLOUD_APPS))) + .withTenantId("178265c4-3136-4ff6-8ed1-b5b62b4cb5f5"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json */ /** * Sample code: Creates or updates an Office PowerBI data connector. @@ -109,11 +176,11 @@ public static void createsOrUpdatesAnOfficePowerBIDataConnector( new OfficePowerBIConnectorDataTypes() .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -135,7 +202,7 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") .withCollectionId("135") .withUsername("--") - .withPassword("--") + .withPassword("fakeTokenPlaceholder") .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withPollingFrequency(PollingFrequency.ONCE_ADAY) .withDataTypes( @@ -143,11 +210,11 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( .withTaxiiClient( new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -168,11 +235,11 @@ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( new TIDataConnectorDataTypes() .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -195,11 +262,11 @@ public static void createsOrUpdatesADynamics365DataConnector( new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() .withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -515,11 +582,11 @@ public static void createsOrUpdatesAGenericUIDataConnector( + "> NOTE: If a longer timeout duration is required, consider" + " upgrading to an [App Service" + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json */ /** * Sample code: Creates or updates an Office365 Project data connector. @@ -540,11 +607,38 @@ public static void createsOrUpdatesAnOffice365ProjectDataConnector( new Office365ProjectConnectorDataTypes() .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateMicrosoftThreatIntelligenceDataConnector.json + */ + /** + * Sample code: Creates or updates a Microsoft Threat Intelligence data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatIntelligenceDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "c345bf40-8509-4ed2-b947-50cb773aaf04", + new MstiDataConnector() + .withDataTypes( + new MstiDataConnectorDataTypes() + .withMicrosoftEmergingThreatFeed( + new MstiDataConnectorDataTypesMicrosoftEmergingThreatFeed() + .withState(DataTypeState.ENABLED) + .withLookbackPeriod("1970-01-01T00:00:00.000Z"))) + .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -652,8 +746,8 @@ public static void createsOrUpdatesAAPIPollingDataConnector( .withAuth( new CodelessConnectorPollingAuthProperties() .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) + .withApiKeyName("fakeTokenPlaceholder") + .withApiKeyIdentifier("fakeTokenPlaceholder")) .withRequest( new CodelessConnectorPollingRequestProperties() .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") @@ -684,6 +778,6 @@ public static void createsOrUpdatesAAPIPollingDataConnector( .withResponse( new CodelessConnectorPollingResponseProperties() .withEventsJsonPaths(Arrays.asList("$")))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java index 54ce6d4bb0bc2..3549d4355e864 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json */ /** * Sample code: Delete an Office365 Project data connector. @@ -20,11 +18,28 @@ public static void deleteAnOffice365ProjectDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Delete an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -35,11 +50,12 @@ public static void deleteAGenericUIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -50,11 +66,12 @@ public static void deleteAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json */ /** * Sample code: Delete an Office PowerBI data connector. @@ -65,11 +82,12 @@ public static void deleteAnOfficePowerBIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -80,6 +98,23 @@ public static void deleteAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DeleteMicrosoftThreatIntelligenceDataConnector.json + */ + /** + * Sample code: Delete an MicrosoftThreatIntelligence data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftThreatIntelligenceDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java index b9727cf73d26c..f05deeea003eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -20,6 +18,7 @@ public static void disconnectAnAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .disconnectWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java index 4e229927f6b95..9f1d801b6ce85 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java @@ -4,12 +4,26 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + */ + /** + * Sample code: Get an AADIP (Azure Active Directory Identity Protection) data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnAADIPAzureActiveDirectoryIdentityProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json */ /** * Sample code: Get an Office365 Project data connector. @@ -20,11 +34,12 @@ public static void getAnOffice365ProjectDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -35,11 +50,12 @@ public static void getAGenericUIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** * Sample code: Get an Office ATP data connector. @@ -50,11 +66,12 @@ public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetIoTById.json */ /** * Sample code: Get a IoT data connector. @@ -65,11 +82,12 @@ public static void getAIoTDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -80,11 +98,12 @@ public static void getAMCASDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -95,11 +114,12 @@ public static void getATITaxiiDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -110,11 +130,12 @@ public static void getAMicrosoftThreatIntelligenceDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -125,11 +146,12 @@ public static void getAASCDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -139,11 +161,12 @@ public static void getAASCDataConnector( public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -154,11 +177,12 @@ public static void getAnAwsCloudTrailDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -169,11 +193,12 @@ public static void getAMDATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -184,26 +209,28 @@ public static void getAMicrosoftThreatProtectionDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftPurviewInformationProtectionDataConnetorById.json */ /** - * Sample code: Get an AAD data connector. + * Sample code: Get a MicrosoftPurviewInformationProtection data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAADDataConnector( + public static void getAMicrosoftPurviewInformationProtectionDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** * Sample code: Get an AATP data connector. @@ -214,11 +241,12 @@ public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** * Sample code: Get a APIPolling data connector. @@ -229,11 +257,12 @@ public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** * Sample code: Get an Office IRM data connector. @@ -244,11 +273,12 @@ public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -259,11 +289,12 @@ public static void getADynamics365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -274,11 +305,12 @@ public static void getAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -289,11 +321,12 @@ public static void getAnAwsS3DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json */ /** * Sample code: Get an Office365 PowerBI data connector. @@ -304,6 +337,7 @@ public static void getAnOffice365PowerBIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java index 962a0a285d9ea..bbb6e4cb7ebf4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -18,6 +16,6 @@ public final class DataConnectorsListSamples { */ public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java index 0bb699a3decd9..7922298ae118d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -18,6 +16,6 @@ public final class DomainWhoisGetSamples { */ public static void getWhoisInformationForASingleDomainName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); + manager.domainWhois().getWithResponse("myRg", "microsoft.com", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java index c18a6971c4014..3d883ad921f3e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -30,6 +29,6 @@ public static void expandAnEntity(com.azure.resourcemanager.securityinsights.Sec .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java index 87a4794ab75b7..62b651a0316fa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import java.time.OffsetDateTime; import java.util.Arrays; @@ -13,7 +12,7 @@ /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -32,6 +31,6 @@ public static void entityInsight(com.azure.resourcemanager.securityinsights.Secu .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withAddDefaultExtendedTimeRange(false) .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java index 03835df0aca65..2ac1ca0ab3fb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -18,11 +16,14 @@ public final class EntitiesGetSamples { */ public static void getASubmissionMailEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -30,11 +31,14 @@ public static void getASubmissionMailEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -42,11 +46,14 @@ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.Secu * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -55,11 +62,14 @@ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights */ public static void getAnIoTDeviceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -68,11 +78,14 @@ public static void getAnIoTDeviceEntity( */ public static void getARegistryKeyEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -80,11 +93,14 @@ public static void getARegistryKeyEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -92,11 +108,14 @@ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights. * @param manager Entry point to SecurityInsightsManager. */ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -105,11 +124,14 @@ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights. */ public static void getASecurityAlertEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -117,11 +139,14 @@ public static void getASecurityAlertEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -129,11 +154,14 @@ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.Secu * @param manager Entry point to SecurityInsightsManager. */ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -142,11 +170,14 @@ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights */ public static void getACloudApplicationEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -154,11 +185,14 @@ public static void getACloudApplicationEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -167,11 +201,14 @@ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.Sec */ public static void getARegistryValueEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -179,11 +216,14 @@ public static void getARegistryValueEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -192,11 +232,14 @@ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.Secu */ public static void getAMailClusterEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -205,11 +248,14 @@ public static void getAMailClusterEntity( */ public static void getASecurityGroupEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -218,11 +264,14 @@ public static void getASecurityGroupEntity( */ public static void getAMailMessageEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -231,11 +280,14 @@ public static void getAMailMessageEntity( */ public static void getAnAzureResourceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -243,11 +295,14 @@ public static void getAnAzureResourceEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -255,6 +310,9 @@ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.Sec * @param manager Entry point to SecurityInsightsManager. */ public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java index 660a3055de2e1..ed2e41cb48f05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; import java.time.OffsetDateTime; /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -29,6 +28,6 @@ public static void entityTimeline(com.azure.resourcemanager.securityinsights.Sec .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withNumberOfBucket(4), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java index 76d03c4060947..6d9d67a6a518d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -17,6 +15,6 @@ public final class EntitiesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); + manager.entities().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java index a07e0a7b42bda..0bdb5b291a47d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -25,6 +24,6 @@ public static void getEntityQuery(com.azure.resourcemanager.securityinsights.Sec "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", EntityItemQueryKind.INSIGHT, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java index 49db6e77c5cc4..64a15d258c888 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -20,6 +18,14 @@ public static void getAllRelationsOfAnEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRunPlaybookSamples.java new file mode 100644 index 0000000000000..8d037f98d8f17 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRunPlaybookSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for Entities RunPlaybook. */ +public final class EntitiesRunPlaybookSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/manualTrigger/Entities_RunPlaybook.json + */ + /** + * Sample code: Entities_RunPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void entitiesRunPlaybook(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .entities() + .runPlaybookWithResponse( + "myRg", "myWorkspace", "72e01a22-5cd2-4139-a149-9f2736ff2ar2", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java index 719027f633537..0435a81db8cbb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; @@ -15,7 +14,7 @@ /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -85,7 +84,7 @@ public static void createsOrUpdatesAnActivityEntityQuery( Arrays.asList("Host_OMSAgentID"))) .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) .withEnabled(true), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java index 9ca8ca1c39648..f6e05de30c670 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -19,6 +17,7 @@ public final class EntityQueriesDeleteSamples { public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java index c5ddd58221cf6..760367311a4aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -20,11 +18,12 @@ public static void getAnActivityEntityQuery( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -35,6 +34,7 @@ public static void getAnExpansionEntityQuery( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java index 3f319789b3675..36b5bcd2f8b8f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -18,6 +17,8 @@ public final class EntityQueriesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); + manager + .entityQueries() + .list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java index 8e1290833c7a6..e5a542e184377 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -20,6 +18,7 @@ public static void getAnActivityEntityQueryTemplate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java index 4648fd151d8b9..8ebd2816ea8a5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant99; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -19,6 +18,8 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); + manager + .entityQueryTemplates() + .list("myRg", "myWorkspace", Constant99.ACTIVITY, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java index de44787f195e4..d2c876e4175e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -24,6 +22,6 @@ public static void getAnEntityRelation(com.azure.resourcemanager.securityinsight "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java index a839ca483bbc9..e42ff9ae97dfe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for FileImports Create. */ public final class FileImportsCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/CreateFileImport.json */ /** * Sample code: Create a file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java index 6e961ca4a8bdb..9e5a287abee74 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports Delete. */ public final class FileImportsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/DeleteFileImport.json */ /** * Sample code: Delete a file import. @@ -17,6 +15,8 @@ public final class FileImportsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .fileImports() + .delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java index cf0ff15ffb5b4..9533c61db5239 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports Get. */ public final class FileImportsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/GetFileImportById.json */ /** * Sample code: Get a file import. @@ -19,6 +17,7 @@ public final class FileImportsGetSamples { public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java index 4f080eb0b16ce..87cc6269a3e74 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports List. */ public final class FileImportsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/fileImports/GetFileImports.json */ /** * Sample code: Get all file imports. @@ -19,6 +17,13 @@ public final class FileImportsListSamples { public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java new file mode 100644 index 0000000000000..c02baf171c412 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for GetRecommendations List. */ +public final class GetRecommendationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/GetRecommendations.json + */ + /** + * Sample code: Get Recommendations list. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getRecommendationsList( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getRecommendations().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java new file mode 100644 index 0000000000000..f49f1d0ee63ca --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import java.util.UUID; + +/** Samples for Get SingleRecommendation. */ +public final class GetSingleRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/GetRecommendation.json + */ + /** + * Sample code: Get a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getARecommendation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .gets() + .singleRecommendationWithResponse( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java new file mode 100644 index 0000000000000..ce7300c0dd2af --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for GetTriggeredAnalyticsRuleRuns List. */ +public final class GetTriggeredAnalyticsRuleRunsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRuns_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRuns_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunsGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getTriggeredAnalyticsRuleRuns().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java index 8a16e508a98f1..d0448841977da 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java @@ -7,14 +7,14 @@ /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident comment. + * Sample code: IncidentComments_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncidentComment( + public static void incidentCommentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java index ab58f3db35c55..46d991b2838de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java @@ -4,19 +4,17 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_Delete.json */ /** - * Sample code: Delete the incident comment. + * Sample code: IncidentComments_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteTheIncidentComment( + public static void incidentCommentsDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -25,6 +23,6 @@ public static void deleteTheIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java index b0cc0dbe7c41d..eac4252291d17 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java @@ -4,20 +4,17 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_Get.json */ /** - * Sample code: Get an incident comment. + * Sample code: IncidentComments_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentCommentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() .getWithResponse( @@ -25,6 +22,6 @@ public static void getAnIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java index 3bdb6e55cdb50..7cae65c275d2a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java @@ -4,22 +4,28 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentComments/IncidentComments_List.json */ /** - * Sample code: Get all incident comments. + * Sample code: IncidentComments_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentComments( + public static void incidentCommentsList( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java index 4b99d62695e0c..71c4871f7c6f9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -29,6 +28,6 @@ public static void createsOrUpdatesAnIncidentRelation( new RelationInner() .withRelatedResourceId( "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java index e9f0630456b0b..5ab3011ffcd49 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -25,6 +23,6 @@ public static void deleteTheIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java index 9ca14fce1f49f..5b21a670c5105 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -25,6 +23,6 @@ public static void getAnIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java index 223b77dfe78f9..ce5dc002b12e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -20,6 +18,14 @@ public static void getAllIncidentRelations( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..5954440e5017f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; + +/** Samples for IncidentTasks CreateOrUpdate. */ +public final class IncidentTasksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_CreateOrUpdate.json + */ + /** + * Sample code: IncidentTasks_CreateOrUpdate. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksCreateOrUpdate( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withTitle("Task title") + .withStatus(IncidentTaskStatus.NEW) + .withDescription("Task description") + .create(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java new file mode 100644 index 0000000000000..82844e8444727 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks Delete. */ +public final class IncidentTasksDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Delete.json + */ + /** + * Sample code: IncidentTasks_Delete. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .deleteWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java new file mode 100644 index 0000000000000..0dd566ba574ff --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks Get. */ +public final class IncidentTasksGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Get.json + */ + /** + * Sample code: IncidentTasks_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .getWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java new file mode 100644 index 0000000000000..2b0bbcc7f6167 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks List. */ +public final class IncidentTasksListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTasks/IncidentTasks_List.json + */ + /** + * Sample code: IncidentTasks_List. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java index fac6451584936..b7132b4d6d847 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java @@ -15,30 +15,30 @@ /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident. + * Sample code: Incidents_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncident( + public static void incidentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTitle("My incident") + .withDescription("This is a demo incident") + .withSeverity(IncidentSeverity.HIGH) + .withStatus(IncidentStatus.CLOSED) .withClassification(IncidentClassification.FALSE_POSITIVE) + .withClassificationReason(IncidentClassificationReason.INACCURATE_DATA) .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") + .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java index 1d10ad7288690..4274d5fed859f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java @@ -4,28 +4,26 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentTeam/Incidents_CreateTeam.json */ /** - * Sample code: Creates incident teams group. + * Sample code: Incidents_CreateTeam. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsCreateTeam(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", + "myRg", + "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); + new TeamInformationInner(), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java index 7213c317f62f1..1b74031bc4996 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_Delete.json */ /** - * Sample code: Delete an incident. + * Sample code: Incidents_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java index aaebebca140b2..8f07ed6a74f93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_Get.json */ /** - * Sample code: Get an incident. + * Sample code: Incidents_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java index 521cc7b9a7eaa..8a226bca83dc7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java @@ -4,22 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentAlerts/Incidents_ListAlerts.json */ /** - * Sample code: Get all incident alerts. + * Sample code: Incidents_ListAlerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsListAlerts(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java index 396a34e22e023..11464c2266402 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentBookmarks/Incidents_ListBookmarks.json */ /** - * Sample code: Get all incident bookmarks. + * Sample code: Incidents_ListBookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentBookmarks( + public static void incidentsListBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java index 05dac3dfd2326..94a92af0a9da6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/IncidentEntities/Incidents_ListEntities.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Incidents_ListEntities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void incidentsListEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listEntitiesWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java index 12ee00a614f64..d464d650b34f0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java @@ -4,19 +4,26 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/incidents/Incidents_List.json */ /** - * Sample code: Get all incidents. + * Sample code: Incidents_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + public static void incidentsList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java index 8aff9771734bc..2c61bcffe38db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents RunPlaybook. */ public final class IncidentsRunPlaybookSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json */ /** * Sample code: Incidents_RunPlaybook. @@ -20,6 +18,7 @@ public static void incidentsRunPlaybook( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .runPlaybookWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java index 4c5af0fbd9f2e..3492f9ed16fd6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -18,6 +16,6 @@ public final class IpGeodataGetSamples { */ public static void getGeodataForASingleIPAddress( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java index 2e1c2cff2c935..82993ffdbd6e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java @@ -4,10 +4,9 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; +import com.azure.resourcemanager.securityinsights.models.MetadataDependenciesAutoGenerated; import com.azure.resourcemanager.securityinsights.models.MetadataSource; import com.azure.resourcemanager.securityinsights.models.MetadataSupport; import com.azure.resourcemanager.securityinsights.models.Operator; @@ -19,7 +18,7 @@ /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -36,7 +35,7 @@ public static void createUpdateFullMetadata( .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .withSource( new MetadataSource() .withKind(SourceKind.SOLUTION) @@ -50,34 +49,34 @@ public static void createUpdateFullMetadata( .withEmail("support@microsoft.com") .withLink("https://support.microsoft.com/")) .withDependencies( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withOperator(Operator.AND) .withCriteria( Arrays .asList( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withOperator(Operator.OR) .withCriteria( Arrays .asList( - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withName("Microsoft Defender for Endpoint"), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), - new MetadataDependencies() + .withKind("DataConnector"), + new MetadataDependenciesAutoGenerated() .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withVersion("2.0"))), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) + .withKind("Playbook") .withVersion("1.0"), - new MetadataDependencies() + new MetadataDependenciesAutoGenerated() .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) + .withKind("Parser")))) .withCategories( new MetadataCategories() .withDomains(Arrays.asList("Application", "Security – Insider Threat")) @@ -95,7 +94,7 @@ public static void createUpdateFullMetadata( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -111,7 +110,7 @@ public static void createUpdateMinimalMetadata( .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java index 83b191e5ca95f..540f6d35544b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -17,6 +15,6 @@ public final class MetadataDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java index 9d738dafd0858..c808f327bd38c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -18,6 +16,6 @@ public final class MetadataGetSamples { */ public static void getSingleMetadataByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java index 05d6eb76725f7..d28f0009114aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -17,11 +15,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -30,6 +28,6 @@ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.Sec */ public static void getAllMetadataWithODataFilterOrderbySkipTop( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java index 91f5be55253b7..621da48d50da8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -20,7 +19,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java index 83381c6ff0914..ecfa4341cfef5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -20,6 +18,7 @@ public static void deleteAnOfficeConsent( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java index 82ebecfad7426..16ea6ba744831 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -19,6 +17,7 @@ public final class OfficeConsentsGetSamples { public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java index bff20163b14d3..79d0cb9e5f06e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -18,6 +16,6 @@ public final class OfficeConsentsListSamples { */ public static void getAllOfficeConsents( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); + manager.officeConsents().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java index bd9e0689a55d5..7ddf49e29117d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackageOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackageOperationGetSamples.java new file mode 100644 index 0000000000000..ba7e3bda5604f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackageOperationGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ProductPackageOperation Get. */ +public final class ProductPackageOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetProductPackageById.json + */ + /** + * Sample code: Get a package. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAPackage(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productPackageOperations() + .getWithResponse( + "myRg", "myWorkspace", "str.azure-sentinel-solution-str", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackagesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackagesListSamples.java new file mode 100644 index 0000000000000..e44b163b35295 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductPackagesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ProductPackages List. */ +public final class ProductPackagesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentPackages/GetProductPackages.json + */ + /** + * Sample code: Get all available packages. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllAvailablePackages( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.productPackages().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java index 9b87891b4ad72..d32a68e7ed1ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -18,6 +16,6 @@ public final class ProductSettingsDeleteSamples { */ public static void deleteEyesOnSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java index c48e37a907739..9646ae2de26ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -17,6 +15,6 @@ public final class ProductSettingsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java index e54fd9e369a6e..b08ead6230a29 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -17,6 +15,6 @@ public final class ProductSettingsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.productSettings().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java index d84adcba1067b..90375d12ccf0c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EyesOn; /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -26,6 +25,6 @@ public static void updateEyesOnSettings( "myWorkspace", "EyesOn", new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplateOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplateOperationGetSamples.java new file mode 100644 index 0000000000000..aea645d0ae7c6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplateOperationGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ProductTemplateOperation Get. */ +public final class ProductTemplateOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetProductTemplateById.json + */ + /** + * Sample code: Get a template. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getATemplate(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productTemplateOperations() + .getWithResponse( + "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplatesListSamples.java new file mode 100644 index 0000000000000..00feba4000355 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductTemplatesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for ProductTemplates List. */ +public final class ProductTemplatesListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/contentTemplates/GetProductTemplates.json + */ + /** + * Sample code: Get all installed templates. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllInstalledTemplates( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .productTemplates() + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java index 4f4f433d1c48d..444f7e2cc4fe3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -19,7 +18,7 @@ /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -73,6 +72,6 @@ public static void createsOrUpdatesAAnomalySecurityMLAnalyticsSettings( .withIsDefaultSettings(true) .withAnomalySettingsVersion(0) .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java index 5a7fbfb4f91a4..94fb47d403e1a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -20,6 +18,7 @@ public static void deleteASecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java index fa8f8cd73f740..2a4cfe2027941 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -20,6 +18,6 @@ public static void getAAnomalySecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java index a8eb1f6d60085..f95c4aa9c0ef3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -18,6 +16,6 @@ public final class SecurityMLAnalyticsSettingsListSamples { */ public static void getAllSecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); + manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java index 177a2c21f7abd..5fcbed1576e58 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java index 73d131daaf987..86af136e1009c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesDeleteSamples { */ public static void deleteSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java index 1e61ad09b71bd..0db4514f2147e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesGetSamples { */ public static void getSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java index 089fa7920c926..bda35c7341d75 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -18,6 +16,6 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java index eedc402653a90..14669e837b130 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.RepoType; /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -18,6 +17,8 @@ public final class SourceControlListRepositoriesSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); + manager + .sourceControls() + .listRepositories("myRg", "myWorkspace", RepoType.GITHUB, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java index 3981370a4a6fe..a4d43f517d2d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java @@ -13,7 +13,7 @@ /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java index 3479bbc73c0d5..260b11d30be89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -20,6 +18,7 @@ public static void deleteASourceControl( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java index e311a8036dbac..1f6bd84212303 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -19,6 +17,7 @@ public final class SourceControlsOperationGetSamples { public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java index 348b8fabfa696..3f113b51bc918 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -18,6 +16,6 @@ public final class SourceControlsOperationListSamples { */ public static void getAllSourceControls( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); + manager.sourceControlsOperations().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java index 19453e0a796a1..99c4db46e902f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -27,6 +26,6 @@ public static void appendTagsToAThreatIntelligenceIndicator( "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java index 1934f75a9e79c..d3512ee6d8e0c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -43,6 +42,6 @@ public static void createANewThreatIntelligence( .withValidFrom("2021-09-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java index 6185703dc8aaa..96271a5a471a6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -44,6 +43,6 @@ public static void updateAThreatIntelligenceIndicator( .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java index fe4c1fb359c4b..4e2e7d3a61aa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -20,6 +18,7 @@ public static void deleteAThreatIntelligenceIndicator( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java index 73c9f32e24191..4ba19f2e8007a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -20,6 +18,7 @@ public static void viewAThreatIntelligenceIndicatorByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java index d04ce8551107e..6bc6a1e562e43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -18,6 +16,8 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { */ public static void getThreatIntelligenceIndicatorsMetrics( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager + .threatIntelligenceIndicatorMetrics() + .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java index 487339a28251a..433b58071bf75 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; @@ -13,7 +12,7 @@ /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -37,9 +36,9 @@ public static void queryThreatIntelligenceIndicatorsAsPerFilteringCriteria( Arrays .asList( new ThreatIntelligenceSortingCriteria() - .withItemKey("lastUpdatedTimeUtc") + .withItemKey("fakeTokenPlaceholder") .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java index 96e9c364d8e4a..ec9511b397ca5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -29,6 +28,6 @@ public static void replaceTagsToAThreatIntelligence( new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java index 3ab41f9ce6d62..91dbde556fda3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -20,6 +18,6 @@ public static void getAllThreatIntelligenceIndicators( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java new file mode 100644 index 0000000000000..3379c76b8b8a1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for TriggeredAnalyticsRuleRunOperation Get. */ +public final class TriggeredAnalyticsRuleRunOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRun_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRun_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .triggeredAnalyticsRuleRunOperations() + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java new file mode 100644 index 0000000000000..c334d81819ad5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.State; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for Update Recommendation. */ +public final class UpdateRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/recommendations/PatchRecommendation.json + */ + /** + * Sample code: Creates a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsARecommendation( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .updates() + .recommendation( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + Arrays.asList(new RecommendationPatch().withState(State.ACTIVE)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java index f6508ac2af4a5..66ed85f1fee04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java index 95b63e3a64e9e..f37adbfd23680 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -21,6 +19,10 @@ public static void deleteAWatchlistItem( manager .watchlistItems() .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java index e86b44a1108a0..4139ca292c82d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -20,6 +18,10 @@ public static void getAWatchlistItem(com.azure.resourcemanager.securityinsights. manager .watchlistItems() .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "3f8901fe-63d9-4875-9ad5-9fb3b8105797", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java index 7fe192510721d..d639b8319f1d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -18,6 +16,6 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java index d668e090cc94b..b0237ad8db336 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -36,7 +36,7 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java index 173a9fdce43f9..0ca4c80106060 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -17,6 +15,8 @@ public final class WatchlistsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager + .watchlists() + .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java index 5de292dd4f01a..dc68e3adf4667 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -17,6 +15,6 @@ public final class WatchlistsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java index 1ff890f70c810..f29bfdb9fd894 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -17,6 +15,6 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..baf4c10ba9b93 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.Mode; + +/** Samples for WorkspaceManagerConfigurations CreateOrUpdate. */ +public final class WorkspaceManagerConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/CreateOrUpdateWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Create or Update a workspace manager Configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createOrUpdateAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .define("default") + .withExistingWorkspace("myRg", "myWorkspace") + .withMode(Mode.ENABLED) + .create(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsDeleteSamples.java new file mode 100644 index 0000000000000..711fea7b61746 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerConfigurations Delete. */ +public final class WorkspaceManagerConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/DeleteWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Delete a workspace manager configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsGetSamples.java new file mode 100644 index 0000000000000..99bc591c791bb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerConfigurations Get. */ +public final class WorkspaceManagerConfigurationsGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/GetWorkspaceManagerConfiguration.json + */ + /** + * Sample code: Get a workspace manager configuration. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAWorkspaceManagerConfiguration( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsListSamples.java new file mode 100644 index 0000000000000..cddec0298b09c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerConfigurationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerConfigurations List. */ +public final class WorkspaceManagerConfigurationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerConfigurations/GetAllWorkspaceManagerConfigurations.json + */ + /** + * Sample code: Get all workspace manager configurations for a Sentinel workspace. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllWorkspaceManagerConfigurationsForASentinelWorkspace( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerConfigurations() + .list("myRg", "myWorkspace", null, null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..8947a0c001ed3 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerMembers CreateOrUpdate. */ +public final class WorkspaceManagerMembersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/CreateOrUpdateWorkspaceManagerMember.json + */ + /** + * Sample code: Create or Update a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createOrUpdateAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .define("afbd324f-6c48-459c-8710-8d1e1cd03812") + .withExistingWorkspace("myRg", "myWorkspace") + .withTargetWorkspaceId( + "/subscriptions/7aef9d48-814f-45ad-b644-b0343316e174/resourceGroups/otherRg/providers/Microsoft.OperationalInsights/workspaces/Example_Workspace") + .withTargetWorkspaceTenantId("f676d436-8d16-42db-81b7-ab578e110ccd") + .create(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersDeleteSamples.java new file mode 100644 index 0000000000000..347ca330f641d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerMembers Delete. */ +public final class WorkspaceManagerMembersDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/DeleteWorkspaceManagerMember.json + */ + /** + * Sample code: Delete a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .deleteWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersGetSamples.java new file mode 100644 index 0000000000000..557df532e32f2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerMembers Get. */ +public final class WorkspaceManagerMembersGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/GetWorkspaceManagerMember.json + */ + /** + * Sample code: Get a workspace manager member. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAWorkspaceManagerMember( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .getWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersListSamples.java new file mode 100644 index 0000000000000..37fccecc0951d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WorkspaceManagerMembersListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for WorkspaceManagerMembers List. */ +public final class WorkspaceManagerMembersListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-04-01-preview/examples/workspaceManagerMembers/GetAllWorkspaceManagerMembers.json + */ + /** + * Sample code: Get all workspace manager members. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllWorkspaceManagerMembers( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .workspaceManagerMembers() + .list("myRg", "myWorkspace", null, null, null, com.azure.core.util.Context.NONE); + } +}