diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 72e1cc8528daf..3c294a9124ee1 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.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-07) + +- 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-01. 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 1b93d3a716140..8b42d5e173a7e 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-2021-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-2022-01. 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.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md index 639641490bec5..8c96e9bd6988c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md @@ -118,6 +118,7 @@ - [ListAlerts](#incidents_listalerts) - [ListBookmarks](#incidents_listbookmarks) - [ListEntities](#incidents_listentities) +- [RunPlaybook](#incidents_runplaybook) ## IpGeodata @@ -137,6 +138,10 @@ - [Get](#officeconsents_get) - [List](#officeconsents_list) +## Operations + +- [List](#operations_list) + ## ProductSettings - [Delete](#productsettings_delete) @@ -199,7 +204,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -230,7 +235,7 @@ 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/2021-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -259,7 +264,7 @@ 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/2021-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -288,7 +293,7 @@ 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/2021-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -310,7 +315,7 @@ 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/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -334,7 +339,7 @@ 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/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -362,6 +367,10 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingAggregatio import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.FieldMapping; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem; import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.MatchingMethod; @@ -378,7 +387,7 @@ import java.util.Map; /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -396,12 +405,212 @@ public final class AlertRulesCreateOrUpdateSamples { new FusionAlertRule() .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true), + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -425,7 +634,7 @@ public final class AlertRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -443,13 +652,12 @@ public final class AlertRulesCreateOrUpdateSamples { new ScheduledAlertRule() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDescription("An example for a scheduled rule") - .withQuery("Heartbeat") .withDisplayName("My scheduled rule") .withEnabled(true) .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) - .withSeverity(AlertSeverity.HIGH) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -463,6 +671,14 @@ public final class AlertRulesCreateOrUpdateSamples { .withGroupByAlertDetails(Arrays.asList(AlertDetail.DISPLAY_NAME)) .withGroupByCustomDetails( Arrays.asList("OperatingSystemType", "OperatingSystemName")))) + .withQuery("Heartbeat") + .withQueryFrequency(Duration.parse("PT1H")) + .withQueryPeriod(Duration.parse("P2DT1H30M")) + .withSeverity(AlertSeverity.HIGH) + .withTriggerOperator(TriggerOperator.GREATER_THAN) + .withTriggerThreshold(0) + .withEventGroupingSettings( + new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)) .withCustomDetails(mapOf("OperatingSystemName", "OSName", "OperatingSystemType", "OSType")) .withEntityMappings( Arrays @@ -486,18 +702,235 @@ public final class AlertRulesCreateOrUpdateSamples { .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")) - .withQueryFrequency(Duration.parse("PT1H")) - .withQueryPeriod(Duration.parse("P2DT1H30M")) - .withTriggerOperator(TriggerOperator.GREATER_THAN) - .withTriggerThreshold(0) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + */ + /** + * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRules() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "myFirstFusionRule", + new FusionAlertRule() + .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") + .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -512,7 +945,30 @@ public final class AlertRulesCreateOrUpdateSamples { "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new NrtAlertRule().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), + new NrtAlertRule() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDescription("") + .withQuery( + "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity =" + + " ComputerIP_Hidden") + .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) + .withDisplayName("Rule2") + .withEnabled(true) + .withSuppressionDuration(Duration.parse("PT1H")) + .withSuppressionEnabled(false) + .withSeverity(AlertSeverity.HIGH) + .withIncidentConfiguration( + new IncidentConfiguration() + .withCreateIncident(true) + .withGroupingConfiguration( + new GroupingConfiguration() + .withEnabled(true) + .withReopenClosedIncident(false) + .withLookbackDuration(Duration.parse("PT5H")) + .withMatchingMethod(MatchingMethod.SELECTED) + .withGroupByEntities( + Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))), Context.NONE); } @@ -537,7 +993,7 @@ 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/2021-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -560,7 +1016,7 @@ 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/2021-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -575,7 +1031,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -589,7 +1045,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -601,7 +1057,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -625,7 +1081,7 @@ 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/2021-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -641,74 +1097,30 @@ public final class AlertRulesListSamples { ### AutomationRules_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesActionConfiguration; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedOperator; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedProperty; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesCondition; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesConditionProperties; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookActionConfiguration; +import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.TriggersOn; -import com.azure.resourcemanager.securityinsights.models.TriggersWhen; -import java.util.Arrays; +import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/CreateAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an automation rule. + * Sample code: AutomationRules_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnAutomationRule( + public static void automationRulesCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High severity incidents escalation") - .withOrder(1) - .withTriggeringLogic( - new AutomationRuleTriggeringLogic() - .withIsEnabled(true) - .withTriggersOn(TriggersOn.INCIDENTS) - .withTriggersWhen(TriggersWhen.CREATED) - .withConditions( - Arrays - .asList( - new AutomationRulePropertyValuesCondition() - .withConditionProperties( - new AutomationRulePropertyValuesConditionProperties() - .withPropertyName( - AutomationRulePropertyConditionSupportedProperty - .INCIDENT_RELATED_ANALYTIC_RULE_IDS) - .withOperator(AutomationRulePropertyConditionSupportedOperator.CONTAINS) - .withPropertyValues( - Arrays - .asList( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/fab3d2d4-747f-46a7-8ef0-9c0be8112bf7", - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/8deb8303-e94d-46ff-96e0-5fd94b33df1a")))))) - .withActions( - Arrays - .asList( - new AutomationRuleModifyPropertiesAction() - .withOrder(1) - .withActionConfiguration( - new AutomationRuleModifyPropertiesActionConfiguration() - .withSeverity(IncidentSeverity.HIGH)), - new AutomationRuleRunPlaybookAction() - .withOrder(2) - .withActionConfiguration( - new AutomationRuleRunPlaybookActionConfiguration() - .withLogicAppResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/IncidentPlaybook") - .withTenantId("ee48efaf-50c6-411b-9345-b2bdc3eb4abc")))) + .withDisplayName((String) null) + .withOrder((int) null) + .withTriggeringLogic((AutomationRuleTriggeringLogic) null) + .withActions((List) null) .create(); } } @@ -722,14 +1134,14 @@ 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/2021-09-01-preview/examples/automationRules/DeleteAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** - * Sample code: Delete an automation rule. + * Sample code: AutomationRules_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnAutomationRule( + public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() @@ -746,14 +1158,14 @@ 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/2021-09-01-preview/examples/automationRules/GetAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Get.json */ /** - * Sample code: Get an automation rule. + * Sample code: AutomationRules_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAutomationRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); @@ -769,15 +1181,14 @@ 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/2021-09-01-preview/examples/automationRules/GetAllAutomationRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_List.json */ /** - * Sample code: Get all automation rules. + * Sample code: AutomationRules_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllAutomationRules( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager.automationRules().list("myRg", "myWorkspace", Context.NONE); } } @@ -794,7 +1205,7 @@ import java.util.UUID; /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -823,7 +1234,7 @@ public final class BookmarkOperationExpandSamples { /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. @@ -851,7 +1262,7 @@ 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/2021-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -880,7 +1291,7 @@ 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/2021-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -909,7 +1320,7 @@ 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/2021-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -928,6 +1339,9 @@ public final class BookmarkRelationsListSamples { ### Bookmarks_CreateOrUpdate ```java +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; +import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; import java.util.Arrays; @@ -936,7 +1350,7 @@ import java.util.UUID; /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -959,6 +1373,19 @@ public final class BookmarksCreateOrUpdateSamples { .withQueryResult("Security Event query result") .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) .withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) + .withEntityMappings( + Arrays + .asList( + new BookmarkEntityMappings() + .withEntityType("Account") + .withFieldMappings( + Arrays + .asList( + new EntityFieldMapping() + .withIdentifier("Fullname") + .withValue("johndoe@microsoft.com"))))) + .withTactics(Arrays.asList(AttackTactic.EXECUTION)) + .withTechniques(Arrays.asList("T1609")) .create(); } } @@ -972,7 +1399,7 @@ 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/2021-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -995,7 +1422,7 @@ 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/2021-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1018,7 +1445,7 @@ 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/2021-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1045,7 +1472,7 @@ import java.util.Arrays; /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -1105,11 +1532,17 @@ 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.Office365ProjectConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope; import com.azure.resourcemanager.securityinsights.models.Permissions; import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem; @@ -1131,7 +1564,7 @@ import java.util.Arrays; /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -1159,7 +1592,32 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + */ + /** + * Sample code: Creates or updates an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficePowerBIDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new OfficePowerBIConnectorDataTypes() + .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -1193,7 +1651,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -1218,7 +1676,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -1245,7 +1703,7 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -1565,7 +2023,32 @@ public final class DataConnectorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Creates or updates an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new Office365ProjectDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new Office365ProjectConnectorDataTypes() + .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -1718,7 +2201,22 @@ 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/2021-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Delete an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -1733,7 +2231,7 @@ public final class DataConnectorsDeleteSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -1748,7 +2246,22 @@ public final class DataConnectorsDeleteSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + */ + /** + * Sample code: Delete an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -1772,7 +2285,7 @@ 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/2021-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -1796,7 +2309,22 @@ 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/2021-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + */ + /** + * Sample code: Get an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -1811,14 +2339,14 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office ATP data connector. + * Sample code: Get an Office ATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeATPDataConnector( + public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() @@ -1826,7 +2354,22 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetIoTById.json + */ + /** + * Sample code: Get a IoT data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAIoTDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -1841,7 +2384,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -1856,7 +2399,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -1871,7 +2414,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -1886,7 +2429,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -1900,7 +2443,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -1915,7 +2458,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -1930,7 +2473,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -1945,7 +2488,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -1960,52 +2503,52 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office IRM data connector. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeIRMDataConnector( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** - * Sample code: Get an AATP data connector. + * Sample code: Get a APIPolling data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAATPDataConnector( + public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** - * Sample code: Get a APIPolling data connector. + * Sample code: Get an Office IRM data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAAPIPollingDataConnector( + public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -2020,7 +2563,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -2035,7 +2578,7 @@ public final class DataConnectorsGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -2048,6 +2591,21 @@ public final class DataConnectorsGetSamples { .dataConnectors() .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + */ + /** + * Sample code: Get an Office365 PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365PowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } } ``` @@ -2059,7 +2617,7 @@ 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/2021-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -2080,18 +2638,21 @@ 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.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements; /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -2106,7 +2667,22 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + */ + /** + * Sample code: Check requirements for Office365Project. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOffice365Project( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -2121,7 +2697,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -2136,7 +2712,26 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + */ + /** + * Sample code: Check requirements for IoT. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForIoT( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -2151,7 +2746,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -2166,7 +2761,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -2185,7 +2780,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -2200,7 +2795,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -2215,7 +2810,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -2230,7 +2825,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -2245,7 +2840,22 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + */ + /** + * Sample code: Check requirements for OfficePowerBI. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOfficePowerBI( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -2260,7 +2870,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -2275,7 +2885,7 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -2299,7 +2909,7 @@ 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/2021-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -2324,7 +2934,7 @@ import java.util.UUID; /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -2355,7 +2965,7 @@ 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/2021-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -2368,7 +2978,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -2380,7 +2990,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -2392,7 +3002,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -2405,7 +3015,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -2418,7 +3028,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -2430,7 +3040,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -2442,7 +3052,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -2455,7 +3065,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -2467,7 +3077,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -2479,7 +3089,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -2492,7 +3102,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -2504,7 +3114,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -2517,7 +3127,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -2529,7 +3139,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -2542,7 +3152,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -2555,7 +3165,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -2568,7 +3178,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -2581,7 +3191,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -2593,7 +3203,7 @@ public final class EntitiesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -2618,7 +3228,7 @@ import java.util.UUID; /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -2650,7 +3260,7 @@ 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/2021-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -2672,7 +3282,7 @@ 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/2021-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -2702,7 +3312,7 @@ import java.time.OffsetDateTime; /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -2733,7 +3343,7 @@ 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/2021-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -2763,7 +3373,7 @@ import java.util.Map; /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -2857,7 +3467,7 @@ 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/2021-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -2880,7 +3490,7 @@ 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/2021-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -2895,7 +3505,7 @@ public final class EntityQueriesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -2920,7 +3530,7 @@ 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/2021-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -2941,7 +3551,7 @@ 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/2021-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -2961,12 +3571,12 @@ public final class EntityQueryTemplatesGetSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -2975,7 +3585,7 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant69.ACTIVITY, Context.NONE); + manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant73.ACTIVITY, Context.NONE); } } ``` @@ -2988,7 +3598,7 @@ 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/2021-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -3014,7 +3624,7 @@ public final class EntityRelationsGetRelationSamples { /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/CreateIncidentComment.json */ /** * Sample code: Creates or updates an incident comment. @@ -3041,7 +3651,7 @@ 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/2021-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. @@ -3070,7 +3680,7 @@ 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/2021-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. @@ -3099,7 +3709,7 @@ 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/2021-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. @@ -3124,7 +3734,7 @@ 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/2021-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -3156,7 +3766,7 @@ 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/2021-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -3185,7 +3795,7 @@ 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/2021-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -3214,7 +3824,7 @@ 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/2021-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -3244,7 +3854,7 @@ import java.util.UUID; /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateIncident.json */ /** * Sample code: Creates or updates an incident. @@ -3282,7 +3892,7 @@ import com.azure.resourcemanager.securityinsights.models.TeamProperties; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateTeam.json */ /** * Sample code: Creates incident teams group. @@ -3311,7 +3921,7 @@ 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/2021-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. @@ -3334,7 +3944,7 @@ 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/2021-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. @@ -3357,7 +3967,7 @@ 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/2021-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. @@ -3378,7 +3988,7 @@ 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/2021-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentAlerts.json */ /** * Sample code: Get all incident alerts. @@ -3402,7 +4012,7 @@ 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/2021-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentBookmarks.json */ /** * Sample code: Get all incident bookmarks. @@ -3426,7 +4036,7 @@ 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/2021-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/entities/GetAllIncidentEntities.json */ /** * Sample code: Gets all incident related entities. @@ -3442,6 +4052,30 @@ 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-01-01-preview/examples/manualTrigger/AutomationRules_ManualTriggerPlaybook.json + */ + /** + * Sample code: AutomationRules_ManualTriggerPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void automationRulesManualTriggerPlaybook( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + } +} +``` + ### IpGeodata_Get ```java @@ -3450,7 +4084,7 @@ 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/2021-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -3482,7 +4116,7 @@ import java.util.Arrays; /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -3548,11 +4182,17 @@ public final class MetadataCreateSamples { .withProviders(Arrays.asList("Amazon", "Microsoft")) .withFirstPublishDate(LocalDate.parse("2021-05-18")) .withLastPublishDate(LocalDate.parse("2021-05-18")) + .withCustomVersion("1.0") + .withContentSchemaVersion("2.0") + .withThreatAnalysisTactics(Arrays.asList("reconnaissance", "commandandcontrol")) + .withThreatAnalysisTechniques(Arrays.asList("T1548", "T1548.001")) + .withPreviewImages(Arrays.asList("firstImage.png", "secondImage.jpeg")) + .withPreviewImagesDark(Arrays.asList("firstImageDark.png", "secondImageDark.jpeg")) .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -3582,7 +4222,7 @@ 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/2021-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -3603,7 +4243,7 @@ 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/2021-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -3625,7 +4265,7 @@ 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/2021-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -3637,7 +4277,7 @@ public final class MetadataListSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -3661,7 +4301,7 @@ 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/2021-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -3687,7 +4327,7 @@ 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/2021-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -3711,7 +4351,7 @@ 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/2021-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -3734,7 +4374,7 @@ 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/2021-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -3748,6 +4388,27 @@ 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-01-01-preview/examples/operations/ListOperations.json + */ + /** + * Sample code: Get all operations. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + ### ProductSettings_Delete ```java @@ -3756,7 +4417,7 @@ 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/2021-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -3778,7 +4439,7 @@ 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/2021-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -3799,7 +4460,7 @@ 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/2021-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -3821,7 +4482,7 @@ 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/2021-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -3848,7 +4509,7 @@ public final class ProductSettingsUpdateSamples { /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -3875,7 +4536,7 @@ 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/2021-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -3897,7 +4558,7 @@ 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/2021-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -3919,7 +4580,7 @@ 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/2021-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -3942,7 +4603,7 @@ 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/2021-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -3967,7 +4628,7 @@ import java.util.Arrays; /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. @@ -4012,7 +4673,7 @@ 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/2021-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -4036,7 +4697,7 @@ 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/2021-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -4059,7 +4720,7 @@ 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/2021-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -4083,7 +4744,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -4109,13 +4770,12 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -4131,7 +4791,6 @@ public final class ThreatIntelligenceIndicatorCreateSamples { "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") @@ -4159,13 +4818,12 @@ public final class ThreatIntelligenceIndicatorCreateSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -4180,7 +4838,6 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { "myRg", "myWorkspace", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") @@ -4211,7 +4868,7 @@ 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/2021-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -4235,7 +4892,7 @@ 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/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -4263,7 +4920,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -4300,13 +4957,12 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -4322,7 +4978,6 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), Context.NONE); @@ -4338,7 +4993,7 @@ 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/2021-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -4360,7 +5015,7 @@ 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/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -4386,7 +5041,7 @@ import java.io.IOException; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. @@ -4422,7 +5077,7 @@ 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/2021-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -4447,7 +5102,7 @@ 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/2021-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -4471,7 +5126,7 @@ 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/2021-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -4480,7 +5135,7 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); } } ``` @@ -4488,12 +5143,12 @@ public final class WatchlistItemsListSamples { ### Watchlists_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.Source; +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/2021-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -4509,7 +5164,8 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withNumberOfLinesToSkip(1) .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") @@ -4519,7 +5175,7 @@ public final class WatchlistsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -4535,7 +5191,8 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withItemsSearchKey("header1") .create(); @@ -4551,7 +5208,7 @@ 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/2021-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -4572,7 +5229,7 @@ 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/2021-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -4593,7 +5250,7 @@ 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/2021-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -4601,7 +5258,7 @@ 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", Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); } } ``` diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml index 722a32c1565f5..301510b049b1b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml @@ -13,7 +13,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-2021-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-2022-01. https://github.com/Azure/azure-sdk-for-java 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 278e6696e8f0e..17a567b535d01 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 @@ -107,6 +107,8 @@ public final class SecurityInsightsManager { private AutomationRules automationRules; + private Incidents incidents; + private Bookmarks bookmarks; private BookmarkRelations bookmarkRelations; @@ -117,8 +119,6 @@ public final class SecurityInsightsManager { private DomainWhois domainWhois; - private EntityQueries entityQueries; - private Entities entities; private EntitiesGetTimelines entitiesGetTimelines; @@ -127,7 +127,9 @@ public final class SecurityInsightsManager { private EntityRelations entityRelations; - private Incidents incidents; + private EntityQueries entityQueries; + + private EntityQueryTemplates entityQueryTemplates; private IncidentComments incidentComments; @@ -135,6 +137,8 @@ public final class SecurityInsightsManager { private Metadatas metadatas; + private OfficeConsents officeConsents; + private SentinelOnboardingStates sentinelOnboardingStates; private ProductSettings productSettings; @@ -143,6 +147,12 @@ public final class SecurityInsightsManager { private SourceControlsOperations sourceControlsOperations; + private ThreatIntelligenceIndicators threatIntelligenceIndicators; + + private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; + + private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; + private Watchlists watchlists; private WatchlistItems watchlistItems; @@ -151,18 +161,8 @@ public final class SecurityInsightsManager { private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; - private ThreatIntelligenceIndicators threatIntelligenceIndicators; - - private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; - - private ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics; - private Operations operations; - private OfficeConsents officeConsents; - - private EntityQueryTemplates entityQueryTemplates; - private final SecurityInsights clientObject; private SecurityInsightsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -383,6 +383,14 @@ public AutomationRules automationRules() { return automationRules; } + /** @return Resource collection API of Incidents. */ + public Incidents incidents() { + if (this.incidents == null) { + this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); + } + return incidents; + } + /** @return Resource collection API of Bookmarks. */ public Bookmarks bookmarks() { if (this.bookmarks == null) { @@ -423,14 +431,6 @@ public DomainWhois domainWhois() { return domainWhois; } - /** @return Resource collection API of EntityQueries. */ - public EntityQueries entityQueries() { - if (this.entityQueries == null) { - this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); - } - return entityQueries; - } - /** @return Resource collection API of Entities. */ public Entities entities() { if (this.entities == null) { @@ -463,12 +463,20 @@ public EntityRelations entityRelations() { return entityRelations; } - /** @return Resource collection API of Incidents. */ - public Incidents incidents() { - if (this.incidents == null) { - this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); + /** @return Resource collection API of EntityQueries. */ + public EntityQueries entityQueries() { + if (this.entityQueries == null) { + this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); } - return incidents; + return entityQueries; + } + + /** @return Resource collection API of EntityQueryTemplates. */ + public EntityQueryTemplates entityQueryTemplates() { + if (this.entityQueryTemplates == null) { + this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); + } + return entityQueryTemplates; } /** @return Resource collection API of IncidentComments. */ @@ -495,6 +503,14 @@ public Metadatas metadatas() { return metadatas; } + /** @return Resource collection API of OfficeConsents. */ + public OfficeConsents officeConsents() { + if (this.officeConsents == null) { + this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); + } + return officeConsents; + } + /** @return Resource collection API of SentinelOnboardingStates. */ public SentinelOnboardingStates sentinelOnboardingStates() { if (this.sentinelOnboardingStates == null) { @@ -529,6 +545,34 @@ public SourceControlsOperations sourceControlsOperations() { return sourceControlsOperations; } + /** @return Resource collection API of ThreatIntelligenceIndicators. */ + public ThreatIntelligenceIndicators threatIntelligenceIndicators() { + if (this.threatIntelligenceIndicators == null) { + this.threatIntelligenceIndicators = + new ThreatIntelligenceIndicatorsImpl(clientObject.getThreatIntelligenceIndicators(), this); + } + return threatIntelligenceIndicators; + } + + /** @return Resource collection API of ThreatIntelligenceIndicatorsOperations. */ + public ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations() { + if (this.threatIntelligenceIndicatorsOperations == null) { + this.threatIntelligenceIndicatorsOperations = + new ThreatIntelligenceIndicatorsOperationsImpl( + clientObject.getThreatIntelligenceIndicatorsOperations(), this); + } + return threatIntelligenceIndicatorsOperations; + } + + /** @return Resource collection API of ThreatIntelligenceIndicatorMetrics. */ + public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { + if (this.threatIntelligenceIndicatorMetrics == null) { + this.threatIntelligenceIndicatorMetrics = + new ThreatIntelligenceIndicatorMetricsImpl(clientObject.getThreatIntelligenceIndicatorMetrics(), this); + } + return threatIntelligenceIndicatorMetrics; + } + /** @return Resource collection API of Watchlists. */ public Watchlists watchlists() { if (this.watchlists == null) { @@ -563,34 +607,6 @@ public DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirements return dataConnectorsCheckRequirementsOperations; } - /** @return Resource collection API of ThreatIntelligenceIndicators. */ - public ThreatIntelligenceIndicators threatIntelligenceIndicators() { - if (this.threatIntelligenceIndicators == null) { - this.threatIntelligenceIndicators = - new ThreatIntelligenceIndicatorsImpl(clientObject.getThreatIntelligenceIndicators(), this); - } - return threatIntelligenceIndicators; - } - - /** @return Resource collection API of ThreatIntelligenceIndicatorsOperations. */ - public ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations() { - if (this.threatIntelligenceIndicatorsOperations == null) { - this.threatIntelligenceIndicatorsOperations = - new ThreatIntelligenceIndicatorsOperationsImpl( - clientObject.getThreatIntelligenceIndicatorsOperations(), this); - } - return threatIntelligenceIndicatorsOperations; - } - - /** @return Resource collection API of ThreatIntelligenceIndicatorMetrics. */ - public ThreatIntelligenceIndicatorMetrics threatIntelligenceIndicatorMetrics() { - if (this.threatIntelligenceIndicatorMetrics == null) { - this.threatIntelligenceIndicatorMetrics = - new ThreatIntelligenceIndicatorMetricsImpl(clientObject.getThreatIntelligenceIndicatorMetrics(), this); - } - return threatIntelligenceIndicatorMetrics; - } - /** @return Resource collection API of Operations. */ public Operations operations() { if (this.operations == null) { @@ -599,22 +615,6 @@ public Operations operations() { return operations; } - /** @return Resource collection API of OfficeConsents. */ - public OfficeConsents officeConsents() { - if (this.officeConsents == null) { - this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); - } - return officeConsents; - } - - /** @return Resource collection API of EntityQueryTemplates. */ - public EntityQueryTemplates entityQueryTemplates() { - if (this.entityQueryTemplates == null) { - this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); - } - return entityQueryTemplates; - } - /** * @return Wrapped service client SecurityInsights providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. 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 b12c368e10595..1679ca2138ad0 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 @@ -23,7 +23,7 @@ public interface ActionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); @@ -38,7 +38,7 @@ public interface ActionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByAlertRule( 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 3a0d28ae7b750..c568ee0f23feb 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 @@ -21,7 +21,7 @@ public interface AlertRuleTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface AlertRuleTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rule templates. + * @return all alert rule templates 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/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index 49f5930dfee3e..d40ca296e5fc6 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 @@ -21,7 +21,7 @@ public interface AlertRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface AlertRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rules. + * @return all alert rules 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/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 7548031cd1ded..8bdfc546a32d2 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,33 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets all automation rules. - * - * @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 automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all automation rules. - * - * @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 automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** * Gets the automation rule. * @@ -76,15 +49,13 @@ 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 automationRule The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an automation rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -92,19 +63,19 @@ AutomationRuleInner createOrUpdate( * @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 automationRule The automation rule. + * @param automationRuleToUpsert The automation 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 represents an automation rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, - AutomationRuleInner automationRule, + AutomationRuleInner automationRuleToUpsert, Context context); /** @@ -116,9 +87,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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String automationRuleId); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -130,9 +102,36 @@ 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 the {@link Response}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + + /** + * Gets all automation rules. + * + * @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 automation rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets all automation rules. + * + * @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 automation rules 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/BookmarkRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java index 7c0a3175325ad..e644d527b90a3 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 @@ -22,7 +22,7 @@ public interface BookmarkRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); @@ -43,7 +43,7 @@ public interface BookmarkRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 838f53c9e9b8e..767fec60845b3 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 @@ -21,7 +21,7 @@ public interface BookmarksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface BookmarksClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmarks. + * @return all bookmarks 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/DataConnectorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java index 2d467c010b580..78d1cc36c200c 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 @@ -22,7 +22,7 @@ public interface DataConnectorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface DataConnectorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 data connectors. + * @return all data connectors 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/EntitiesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java index ab94828a4b85a..28404013fdcbe 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 @@ -27,7 +27,7 @@ public interface EntitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -41,7 +41,7 @@ public interface EntitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return all entities 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/EntitiesRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java index 87e689d8d2ac2..10130bd876ab1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java @@ -21,7 +21,7 @@ public interface EntitiesRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String entityId); @@ -42,7 +42,7 @@ public interface EntitiesRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 ef93e7e0a0178..68ba3c6be0c38 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 @@ -23,7 +23,7 @@ public interface EntityQueriesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -38,7 +38,7 @@ public interface EntityQueriesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 aaa8ea4813bcd..fb6a5304bb07e 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.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ public interface EntityQueryTemplatesClient { @@ -22,7 +22,7 @@ public interface EntityQueryTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -37,11 +37,11 @@ public interface EntityQueryTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context); + String resourceGroupName, String workspaceName, Constant73 kind, Context context); /** * Gets an entity query. 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 cf175c6d0278c..c8f34adc35784 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 @@ -22,7 +22,7 @@ public interface IncidentCommentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -43,7 +43,7 @@ public interface IncidentCommentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 282182e897955..8f2125a0506df 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 @@ -22,7 +22,7 @@ public interface IncidentRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -43,7 +43,7 @@ public interface IncidentRelationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 14184afd688f8..12e0bda1f5e85 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 @@ -14,10 +14,46 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; 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 { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + + /** + * 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 com.azure.core.management.exception.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) + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); + /** * Gets all incidents. * @@ -26,7 +62,7 @@ public interface IncidentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -46,7 +82,7 @@ public interface IncidentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 e06c39622edac..a42eaa9112f18 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 @@ -22,7 +22,7 @@ public interface MetadatasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -41,7 +41,7 @@ public interface MetadatasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 31a46647a64d8..09ab2236789b7 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 @@ -21,7 +21,7 @@ public interface OfficeConsentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface OfficeConsentsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 office365 consents. + * @return all office365 consents 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/OperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java index 86e89630ed8a2..c6ad3c2c80362 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(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 05ffac3147e89..89469568f9bbe 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 IncidentsClient object to access its operations. + * + * @return the IncidentsClient object. + */ + IncidentsClient getIncidents(); + /** * Gets the BookmarksClient object to access its operations. * @@ -107,13 +114,6 @@ public interface SecurityInsights { */ DomainWhoisClient getDomainWhois(); - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - EntityQueriesClient getEntityQueries(); - /** * Gets the EntitiesClient object to access its operations. * @@ -143,11 +143,18 @@ public interface SecurityInsights { EntityRelationsClient getEntityRelations(); /** - * Gets the IncidentsClient object to access its operations. + * Gets the EntityQueriesClient object to access its operations. * - * @return the IncidentsClient object. + * @return the EntityQueriesClient object. */ - IncidentsClient getIncidents(); + EntityQueriesClient getEntityQueries(); + + /** + * Gets the EntityQueryTemplatesClient object to access its operations. + * + * @return the EntityQueryTemplatesClient object. + */ + EntityQueryTemplatesClient getEntityQueryTemplates(); /** * Gets the IncidentCommentsClient object to access its operations. @@ -170,6 +177,13 @@ public interface SecurityInsights { */ MetadatasClient getMetadatas(); + /** + * Gets the OfficeConsentsClient object to access its operations. + * + * @return the OfficeConsentsClient object. + */ + OfficeConsentsClient getOfficeConsents(); + /** * Gets the SentinelOnboardingStatesClient object to access its operations. * @@ -199,53 +213,53 @@ public interface SecurityInsights { SourceControlsOperationsClient getSourceControlsOperations(); /** - * Gets the WatchlistsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. * - * @return the WatchlistsClient object. + * @return the ThreatIntelligenceIndicatorsClient object. */ - WatchlistsClient getWatchlists(); + ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators(); /** - * Gets the WatchlistItemsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. * - * @return the WatchlistItemsClient object. + * @return the ThreatIntelligenceIndicatorsOperationsClient object. */ - WatchlistItemsClient getWatchlistItems(); + ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations(); /** - * Gets the DataConnectorsClient object to access its operations. + * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. * - * @return the DataConnectorsClient object. + * @return the ThreatIntelligenceIndicatorMetricsClient object. */ - DataConnectorsClient getDataConnectors(); + ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. + * Gets the WatchlistsClient object to access its operations. * - * @return the DataConnectorsCheckRequirementsOperationsClient object. + * @return the WatchlistsClient object. */ - DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); + WatchlistsClient getWatchlists(); /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. + * Gets the WatchlistItemsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorsClient object. + * @return the WatchlistItemsClient object. */ - ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators(); + WatchlistItemsClient getWatchlistItems(); /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. + * Gets the DataConnectorsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. + * @return the DataConnectorsClient object. */ - ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations(); + DataConnectorsClient getDataConnectors(); /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. + * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. * - * @return the ThreatIntelligenceIndicatorMetricsClient object. + * @return the DataConnectorsCheckRequirementsOperationsClient object. */ - ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics(); + DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); /** * Gets the OperationsClient object to access its operations. @@ -253,18 +267,4 @@ public interface SecurityInsights { * @return the OperationsClient object. */ OperationsClient getOperations(); - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - OfficeConsentsClient getOfficeConsents(); - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - EntityQueryTemplatesClient getEntityQueryTemplates(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java index 0f8de1a7b52e6..df97d27b4605a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java @@ -22,7 +22,7 @@ public interface SourceControlsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); @@ -37,7 +37,7 @@ public interface SourceControlsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listRepositories( 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 8f086d310dbed..cbf7109c8ebbc 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 @@ -21,7 +21,7 @@ public interface SourceControlsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -35,7 +35,7 @@ public interface SourceControlsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 source controls, without source control items. + * @return all source controls, without source control items 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/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 6580255eb016c..d31ccc8559f77 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 @@ -159,7 +159,7 @@ 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 list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable queryIndicators( @@ -177,7 +177,7 @@ PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable queryIndicators( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java index cd5635505a222..bbb61deb6dee1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java @@ -23,7 +23,7 @@ public interface ThreatIntelligenceIndicatorsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -43,7 +43,7 @@ public interface ThreatIntelligenceIndicatorsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( 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 33290efc89926..80ba49f0d3be4 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 @@ -22,7 +22,7 @@ public interface WatchlistItemsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); @@ -33,15 +33,18 @@ public interface WatchlistItemsClient { * @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 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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. 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 a87f7d452c58a..10b174e1207f9 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 @@ -10,6 +10,8 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; +import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; /** An instance of this class provides access to all the operations defined in WatchlistsClient. */ public interface WatchlistsClient { @@ -21,7 +23,7 @@ public interface WatchlistsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,14 +33,18 @@ public interface WatchlistsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. @@ -93,15 +99,18 @@ 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 {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( + WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -117,8 +126,11 @@ WatchlistInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -128,10 +140,10 @@ WatchlistInner 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 a Watchlist in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, 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 e10838758cf7a..96b3db1bbe0ca 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 @@ -15,7 +15,7 @@ import java.time.OffsetDateTime; import java.util.List; -/** Represents an automation rule. */ +/** The AutomationRule model. */ @Fluent public final class AutomationRuleInner extends ResourceWithEtag { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleInner.class); @@ -23,8 +23,8 @@ public final class AutomationRuleInner extends ResourceWithEtag { /* * Automation rule properties */ - @JsonProperty(value = "properties") - private AutomationRuleProperties innerProperties; + @JsonProperty(value = "properties", required = true) + private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); /** * Get the innerProperties property: Automation rule properties. @@ -70,8 +70,8 @@ public AutomationRuleInner withDisplayName(String displayName) { * * @return the order value. */ - public Integer order() { - return this.innerProperties() == null ? null : this.innerProperties().order(); + public int order() { + return this.innerProperties() == null ? 0 : this.innerProperties().order(); } /** @@ -80,7 +80,7 @@ public Integer order() { * @param order the order value to set. * @return the AutomationRuleInner object itself. */ - public AutomationRuleInner withOrder(Integer order) { + public AutomationRuleInner withOrder(int order) { if (this.innerProperties() == null) { this.innerProperties = new AutomationRuleProperties(); } @@ -89,7 +89,7 @@ public AutomationRuleInner withOrder(Integer order) { } /** - * Get the triggeringLogic property: The triggering logic of the automation rule. + * Get the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -98,7 +98,7 @@ public AutomationRuleTriggeringLogic triggeringLogic() { } /** - * Set the triggeringLogic property: The triggering logic of the automation rule. + * Set the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic the triggeringLogic value to set. * @return the AutomationRuleInner object itself. @@ -134,15 +134,6 @@ public AutomationRuleInner withActions(List actions) { return this; } - /** - * Get the createdTimeUtc property: The time the automation rule 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 automation rule was updated. * @@ -153,16 +144,16 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the createdBy property: Describes the client that created the automation rule. + * Get the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - public ClientInfo createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); } /** - * Get the lastModifiedBy property: Describes the client that last updated the automation rule. + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ @@ -170,6 +161,15 @@ public ClientInfo lastModifiedBy() { return this.innerProperties() == null ? null : this.innerProperties().lastModifiedBy(); } + /** + * 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(); + } + /** * Validates the instance. * @@ -178,7 +178,12 @@ public ClientInfo lastModifiedBy() { @Override public void validate() { super.validate(); - if (innerProperties() != null) { + if (innerProperties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AutomationRuleInner")); + } else { innerProperties().validate(); } } 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 a6c625ec75058..ae060c98f2c9b 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 @@ -14,13 +14,13 @@ import java.time.OffsetDateTime; import java.util.List; -/** Describes automation rule properties. */ +/** Automation rule properties. */ @Fluent public final class AutomationRuleProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleProperties.class); /* - * The display name of the automation rule + * The display name of the automation rule */ @JsonProperty(value = "displayName", required = true) private String displayName; @@ -32,7 +32,7 @@ public final class AutomationRuleProperties { private int order; /* - * The triggering logic of the automation rule + * Describes automation rule triggering logic */ @JsonProperty(value = "triggeringLogic", required = true) private AutomationRuleTriggeringLogic triggeringLogic; @@ -43,12 +43,6 @@ public final class AutomationRuleProperties { @JsonProperty(value = "actions", required = true) private List actions; - /* - * The time the automation rule was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - /* * The last time the automation rule was updated */ @@ -56,17 +50,23 @@ public final class AutomationRuleProperties { private OffsetDateTime lastModifiedTimeUtc; /* - * Describes the client that created the automation rule + * The time the automation rule was created */ - @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) - private ClientInfo createdBy; + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; /* - * Describes the client that last updated the automation rule + * Information on the client (user or application) that made some action */ @JsonProperty(value = "lastModifiedBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo lastModifiedBy; + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) + private ClientInfo createdBy; + /** * Get the displayName property: The display name of the automation rule. * @@ -108,7 +108,7 @@ public AutomationRuleProperties withOrder(int order) { } /** - * Get the triggeringLogic property: The triggering logic of the automation rule. + * Get the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -117,7 +117,7 @@ public AutomationRuleTriggeringLogic triggeringLogic() { } /** - * Set the triggeringLogic property: The triggering logic of the automation rule. + * Set the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic the triggeringLogic value to set. * @return the AutomationRuleProperties object itself. @@ -147,15 +147,6 @@ public AutomationRuleProperties withActions(List actions) return this; } - /** - * Get the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - /** * Get the lastModifiedTimeUtc property: The last time the automation rule was updated. * @@ -166,16 +157,16 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the createdBy property: Describes the client that created the automation rule. + * Get the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - public ClientInfo createdBy() { - return this.createdBy; + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; } /** - * Get the lastModifiedBy property: Describes the client that last updated the automation rule. + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ @@ -183,6 +174,15 @@ public ClientInfo lastModifiedBy() { return this.lastModifiedBy; } + /** + * 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; + } + /** * Validates the instance. * @@ -211,11 +211,11 @@ public void validate() { } else { actions().forEach(e -> e.validate()); } - if (createdBy() != null) { - createdBy().validate(); - } if (lastModifiedBy() != null) { lastModifiedBy().validate(); } + if (createdBy() != null) { + createdBy().validate(); + } } } 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 31ebe211aed2e..397f47e3454f1 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 @@ -6,6 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.UserInfo; @@ -340,6 +342,75 @@ public BookmarkInner withIncidentInfo(IncidentInfo incidentInfo) { return this; } + /** + * Get the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings the entityMappings value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: A list of relevant mitre attacks. + * + * @param tactics the tactics value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: A list of relevant mitre techniques. + * + * @param techniques the techniques value to set. + * @return the BookmarkInner object itself. + */ + public BookmarkInner withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new BookmarkProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * Validates the instance. * 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 3af22d683f781..774f00ee38b25 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 @@ -6,6 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -96,6 +98,24 @@ public final class BookmarkProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /* + * Describes the entity mappings of the bookmark + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * A list of relevant mitre attacks + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * A list of relevant mitre techniques + */ + @JsonProperty(value = "techniques") + private List techniques; + /** * Get the created property: The time the bookmark was created. * @@ -356,6 +376,66 @@ public BookmarkProperties withIncidentInfo(IncidentInfo incidentInfo) { return this; } + /** + * Get the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings the entityMappings value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; + return this; + } + + /** + * Get the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: A list of relevant mitre attacks. + * + * @param tactics the tactics value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: A list of relevant mitre techniques. + * + * @param techniques the techniques value to set. + * @return the BookmarkProperties object itself. + */ + public BookmarkProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + /** * Validates the instance. * @@ -381,5 +461,8 @@ public void validate() { if (incidentInfo() != null) { incidentInfo().validate(); } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } } } 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 b5e7cfed64a30..a0018dc5efd50 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 @@ -14,13 +14,16 @@ import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; +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.MstiDataConnector; import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeAtpDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeIrmDataConnector; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.TIDataConnector; import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; @@ -47,11 +50,14 @@ @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class), @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class), + @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class), + @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class), @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpDataConnector.class), @JsonSubTypes.Type(name = "Office365", value = OfficeDataConnector.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TIDataConnector.class), @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiDataConnector.class), + @JsonSubTypes.Type(name = "IOT", value = IoTDataConnector.class), @JsonSubTypes.Type(name = "GenericUI", value = CodelessUiDataConnector.class), @JsonSubTypes.Type(name = "APIPolling", value = CodelessApiPollingDataConnector.class) }) 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 595a10752386d..8b7ba7e021058 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 @@ -8,6 +8,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.FusionScenarioExclusionPattern; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -42,6 +44,18 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "enabled", required = true) private boolean enabled; + /* + * Configuration for all supported source signals in fusion detection. + */ + @JsonProperty(value = "sourceSettings") + private List sourceSettings; + + /* + * Configuration to exclude scenarios in fusion detection. + */ + @JsonProperty(value = "scenarioExclusionPatterns") + private List scenarioExclusionPatterns; + /* * The last time that this alert has been modified. */ @@ -60,6 +74,12 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -118,6 +138,47 @@ public FusionAlertRuleProperties withEnabled(boolean enabled) { return this; } + /** + * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.sourceSettings; + } + + /** + * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleProperties object itself. + */ + public FusionAlertRuleProperties withSourceSettings(List sourceSettings) { + this.sourceSettings = sourceSettings; + return this; + } + + /** + * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @return the scenarioExclusionPatterns value. + */ + public List scenarioExclusionPatterns() { + return this.scenarioExclusionPatterns; + } + + /** + * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. + * @return the FusionAlertRuleProperties object itself. + */ + public FusionAlertRuleProperties withScenarioExclusionPatterns( + List scenarioExclusionPatterns) { + this.scenarioExclusionPatterns = scenarioExclusionPatterns; + return this; + } + /** * Get the lastModifiedUtc property: The last time that this alert has been modified. * @@ -145,6 +206,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * @@ -157,5 +227,11 @@ public void validate() { new IllegalArgumentException( "Missing required property alertRuleTemplateName in model FusionAlertRuleProperties")); } + if (sourceSettings() != null) { + sourceSettings().forEach(e -> e.validate()); + } + if (scenarioExclusionPatterns() != null) { + scenarioExclusionPatterns().forEach(e -> e.validate()); + } } } 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 a493c85ff4271..1cf92c0489d88 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 @@ -7,23 +7,66 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.FusionTemplateSourceSetting; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; /** Fusion alert rule template properties. */ @Fluent -public final class FusionAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { +public final class FusionAlertRuleTemplateProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionAlertRuleTemplateProperties.class); + /* + * the number of alert rules that were created by this template + */ + @JsonProperty(value = "alertRulesCreatedByTemplateCount") + private Integer alertRulesCreatedByTemplateCount; + + /* + * The time that this alert rule template has been added. + */ + @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateUtc; + + /* + * The time that this alert rule template was last updated. + */ + @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdatedDateUtc; + + /* + * The description of the alert rule template. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The display name for alert rule template. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The required data connectors for this template + */ + @JsonProperty(value = "requiredDataConnectors") + private List requiredDataConnectors; + + /* + * The alert rule template status. + */ + @JsonProperty(value = "status") + private TemplateStatus status; + /* * The severity for alerts created by this alert rule. */ - @JsonProperty(value = "severity", required = true) + @JsonProperty(value = "severity") private AlertSeverity severity; /* @@ -32,6 +75,138 @@ public final class FusionAlertRuleTemplateProperties extends AlertRuleTemplatePr @JsonProperty(value = "tactics") private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * All supported source signal configurations consumed in fusion detection. + */ + @JsonProperty(value = "sourceSettings") + private List sourceSettings; + + /** + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * + * @return the alertRulesCreatedByTemplateCount value. + */ + public Integer alertRulesCreatedByTemplateCount() { + return this.alertRulesCreatedByTemplateCount; + } + + /** + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; + return this; + } + + /** + * Get the createdDateUtc property: The time that this alert rule template has been added. + * + * @return the createdDateUtc value. + */ + public OffsetDateTime createdDateUtc() { + return this.createdDateUtc; + } + + /** + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. + * + * @return the lastUpdatedDateUtc value. + */ + public OffsetDateTime lastUpdatedDateUtc() { + return this.lastUpdatedDateUtc; + } + + /** + * Get the description property: The description of the alert rule template. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the alert rule template. + * + * @param description the description value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the displayName property: The display name for alert rule template. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name for alert rule template. + * + * @param displayName the displayName value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the requiredDataConnectors property: The required data connectors for this template. + * + * @return the requiredDataConnectors value. + */ + public List requiredDataConnectors() { + return this.requiredDataConnectors; + } + + /** + * Set the requiredDataConnectors property: The required data connectors for this template. + * + * @param requiredDataConnectors the requiredDataConnectors value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withRequiredDataConnectors( + List requiredDataConnectors) { + this.requiredDataConnectors = requiredDataConnectors; + return this; + } + + /** + * Get the status property: The alert rule template status. + * + * @return the status value. + */ + public TemplateStatus status() { + return this.status; + } + + /** + * Set the status property: The alert rule template status. + * + * @param status the status value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { + this.status = status; + return this; + } + /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -72,40 +247,43 @@ public FusionAlertRuleTemplateProperties withTactics(List tactics) return this; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; + /** + * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.sourceSettings; } - /** {@inheritDoc} */ - @Override - public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); + /** + * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleTemplateProperties object itself. + */ + public FusionAlertRuleTemplateProperties withSourceSettings(List sourceSettings) { + this.sourceSettings = sourceSettings; return this; } @@ -114,14 +292,12 @@ public FusionAlertRuleTemplateProperties withStatus(TemplateStatus status) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); - if (severity() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model FusionAlertRuleTemplateProperties")); + if (requiredDataConnectors() != null) { + requiredDataConnectors().forEach(e -> e.validate()); + } + if (sourceSettings() != null) { + sourceSettings().forEach(e -> e.validate()); } } } 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 new file mode 100644 index 0000000000000..3dc5bab0dacfc --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IoT requirements check properties. */ +@Fluent +public final class IoTCheckRequirementsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTCheckRequirementsProperties.class); + + /* + * The subscription id to connect to, and get the data from. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTCheckRequirementsProperties object itself. + */ + public IoTCheckRequirementsProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + 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/fluent/models/IoTDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java new file mode 100644 index 0000000000000..cc4f86f444462 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; +import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** IoT data connector properties. */ +@Fluent +public final class IoTDataConnectorProperties extends DataConnectorWithAlertsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTDataConnectorProperties.class); + + /* + * The subscription id to connect to, and get the data from. + */ + @JsonProperty(value = "subscriptionId") + private String subscriptionId; + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTDataConnectorProperties object itself. + */ + public IoTDataConnectorProperties withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** {@inheritDoc} */ + @Override + public IoTDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + super.withDataTypes(dataTypes); + 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/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java index 6959672a80687..bd0ca8c4ff88f 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 @@ -60,6 +60,12 @@ public final class MLBehaviorAnalyticsAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -145,6 +151,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * 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 288c148dc9a3e..ea29de0a6ae73 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 @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; @@ -17,7 +17,7 @@ /** MLBehaviorAnalytics alert rule template properties. */ @Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { +public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplateProperties.class); @@ -27,12 +27,6 @@ public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertR @JsonProperty(value = "severity", required = true) private AlertSeverity severity; - /* - * The tactics of the alert rule template. - */ - @JsonProperty(value = "tactics") - private List tactics; - /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -53,23 +47,17 @@ public MLBehaviorAnalyticsAlertRuleTemplateProperties withSeverity(AlertSeverity return this; } - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; + /** {@inheritDoc} */ + @Override + public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; } - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplateProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + /** {@inheritDoc} */ + @Override + public MLBehaviorAnalyticsAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); return this; } 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 23b926bf7937f..684991ee162db 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 @@ -335,6 +335,173 @@ public MetadataModelInner withLastPublishDate(LocalDate 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 MetadataModelInner object itself. + */ + public MetadataModelInner withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + 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 MetadataModelInner object itself. + */ + public MetadataModelInner withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @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 solution template. + * + * @param icon the icon value to set. + * @return the MetadataModelInner object itself. + */ + public MetadataModelInner withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + 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 MetadataModelInner object itself. + */ + public MetadataModelInner withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + 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 MetadataModelInner object itself. + */ + public MetadataModelInner withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + 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 MetadataModelInner object itself. + */ + public MetadataModelInner withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + 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 MetadataModelInner object itself. + */ + public MetadataModelInner withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataProperties(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + /** * Validates the instance. * 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 9ac1834dc3fd8..cecb1c84e54ee 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 @@ -104,6 +104,53 @@ public final class MetadataProperties { @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 solution + * template + */ + @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; + /** * 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 @@ -358,6 +405,152 @@ public MetadataProperties withLastPublishDate(LocalDate 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 MetadataProperties object itself. + */ + public MetadataProperties 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 MetadataProperties object itself. + */ + public MetadataProperties withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @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 solution template. + * + * @param icon the icon value to set. + * @return the MetadataProperties object itself. + */ + public MetadataProperties 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 MetadataProperties object itself. + */ + public MetadataProperties 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 MetadataProperties object itself. + */ + public MetadataProperties 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 MetadataProperties object itself. + */ + public MetadataProperties 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 MetadataProperties object itself. + */ + public MetadataProperties withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + /** * Validates the instance. * 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 1b8e5a26fae19..5d63a774ebba3 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 @@ -104,6 +104,53 @@ public final class MetadataPropertiesPatch { @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 solution + * template + */ + @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; + /** * 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 @@ -358,6 +405,152 @@ public MetadataPropertiesPatch withLastPublishDate(LocalDate 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withContentSchemaVersion(String contentSchemaVersion) { + this.contentSchemaVersion = contentSchemaVersion; + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @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 solution template. + * + * @param icon the icon value to set. + * @return the MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch 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 MetadataPropertiesPatch object itself. + */ + public MetadataPropertiesPatch withPreviewImagesDark(List previewImagesDark) { + this.previewImagesDark = previewImagesDark; + return this; + } + /** * Validates the instance. * 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 92d23051b6250..120df507628b4 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 @@ -38,7 +38,7 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties /* * The alerts' productName on which the cases will be generated */ - @JsonProperty(value = "productFilter", required = true) + @JsonProperty(value = "productFilter") private MicrosoftSecurityProductName productFilter; /* @@ -176,12 +176,5 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withStatus(T @Override public void validate() { super.validate(); - if (productFilter() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property productFilter in model" - + " MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties")); - } } } 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 60491523dceb9..52c0642f1410f 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 @@ -11,112 +11,435 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -import com.azure.resourcemanager.securityinsights.models.QueryBasedAlertRuleProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** Nrt alert rule base property bag. */ @Fluent -public final class NrtAlertRuleProperties extends QueryBasedAlertRuleProperties { +public final class NrtAlertRuleProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRuleProperties.class); - /** {@inheritDoc} */ - @Override + /* + * The Name of the alert rule template used to create this rule. + */ + @JsonProperty(value = "alertRuleTemplateName") + private String alertRuleTemplateName; + + /* + * The version of the alert rule template used to create this rule - in + * format , where all are numbers, for example 0 <1.0.2> + */ + @JsonProperty(value = "templateVersion") + private String templateVersion; + + /* + * The description of the alert rule. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The query that creates alerts for this rule. + */ + @JsonProperty(value = "query", required = true) + private String query; + + /* + * The tactics of the alert rule + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * The display name for alerts created by this alert rule. + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * Determines whether this alert rule is enabled or disabled. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * The last time that this alert rule has been modified. + */ + @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedUtc; + + /* + * The suppression (in ISO 8601 duration format) to wait since last time + * this alert rule been triggered. + */ + @JsonProperty(value = "suppressionDuration", required = true) + private Duration suppressionDuration; + + /* + * Determines whether the suppression for this alert rule is enabled or + * disabled. + */ + @JsonProperty(value = "suppressionEnabled", required = true) + private boolean suppressionEnabled; + + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity", required = true) + private AlertSeverity severity; + + /* + * The settings of the incidents that created from alerts triggered by this + * analytics rule + */ + @JsonProperty(value = "incidentConfiguration") + private IncidentConfiguration incidentConfiguration; + + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + + /** + * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @return the alertRuleTemplateName value. + */ + public String alertRuleTemplateName() { + return this.alertRuleTemplateName; + } + + /** + * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @param alertRuleTemplateName the alertRuleTemplateName value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - super.withAlertRuleTemplateName(alertRuleTemplateName); + this.alertRuleTemplateName = alertRuleTemplateName; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @return the templateVersion value. + */ + public String templateVersion() { + return this.templateVersion; + } + + /** + * Set the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @param templateVersion the templateVersion value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withTemplateVersion(String templateVersion) { - super.withTemplateVersion(templateVersion); + this.templateVersion = templateVersion; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the description property: The description of the alert rule. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the alert rule. + * + * @param description the description value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withDescription(String description) { - super.withDescription(description); + this.description = description; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withQuery(String query) { - super.withQuery(query); + this.query = query; + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the displayName property: The display name for alerts created by this alert rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The display name for alerts created by this alert rule. + * + * @param displayName the displayName value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); + this.displayName = displayName; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @param enabled the enabled value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withEnabled(boolean enabled) { - super.withEnabled(enabled); + this.enabled = enabled; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the lastModifiedUtc property: The last time that this alert rule has been modified. + * + * @return the lastModifiedUtc value. + */ + public OffsetDateTime lastModifiedUtc() { + return this.lastModifiedUtc; + } + + /** + * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @return the suppressionDuration value. + */ + public Duration suppressionDuration() { + return this.suppressionDuration; + } + + /** + * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @param suppressionDuration the suppressionDuration value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - super.withSuppressionDuration(suppressionDuration); + this.suppressionDuration = suppressionDuration; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @return the suppressionEnabled value. + */ + public boolean suppressionEnabled() { + return this.suppressionEnabled; + } + + /** + * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @param suppressionEnabled the suppressionEnabled value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - super.withSuppressionEnabled(suppressionEnabled); + this.suppressionEnabled = suppressionEnabled; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withSeverity(AlertSeverity severity) { - super.withSeverity(severity); + this.severity = severity; return this; } - /** {@inheritDoc} */ - @Override - public NrtAlertRuleProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; + /** + * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @return the incidentConfiguration value. + */ + public IncidentConfiguration incidentConfiguration() { + return this.incidentConfiguration; } - /** {@inheritDoc} */ - @Override + /** + * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @param incidentConfiguration the incidentConfiguration value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - super.withIncidentConfiguration(incidentConfiguration); + this.incidentConfiguration = incidentConfiguration; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withCustomDetails(Map customDetails) { - super.withCustomDetails(customDetails); + this.customDetails = customDetails; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withEntityMappings(List entityMappings) { - super.withEntityMappings(entityMappings); + this.entityMappings = entityMappings; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the NrtAlertRuleProperties object itself. + */ public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - super.withAlertDetailsOverride(alertDetailsOverride); + this.alertDetailsOverride = alertDetailsOverride; return this; } @@ -125,8 +448,37 @@ public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride aler * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (query() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property query in model NrtAlertRuleProperties")); + } + if (displayName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property displayName in model NrtAlertRuleProperties")); + } + if (suppressionDuration() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property suppressionDuration in model NrtAlertRuleProperties")); + } + if (severity() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property severity in model NrtAlertRuleProperties")); + } + if (incidentConfiguration() != null) { + incidentConfiguration().validate(); + } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } + if (alertDetailsOverride() != null) { + alertDetailsOverride().validate(); + } } } 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 bd42d5c6f5abc..9188d14aa9cc7 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 @@ -8,7 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -21,7 +21,7 @@ /** NRT alert rule template properties. */ @Fluent -public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { +public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(NrtAlertRuleTemplateProperties.class); /* @@ -36,12 +36,6 @@ public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplatePrope @JsonProperty(value = "severity") private AlertSeverity severity; - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - /* * The version of this template - in format , where all are numbers. * For example <1.0.2>. @@ -109,26 +103,6 @@ public NrtAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. @@ -211,6 +185,20 @@ public NrtAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverr return this; } + /** {@inheritDoc} */ + @Override + public NrtAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; + } + + /** {@inheritDoc} */ + @Override + public NrtAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); + return this; + } + /** {@inheritDoc} */ @Override public NrtAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( 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 new file mode 100644 index 0000000000000..c64149a2e39ed --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** Office365 Project requirements check properties. */ +@Fluent +public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectCheckRequirementsProperties.class); + + /** {@inheritDoc} */ + @Override + public Office365ProjectCheckRequirementsProperties 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/Office365ProjectDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java new file mode 100644 index 0000000000000..39b04dc9866a2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Office Microsoft Project data connector properties. */ +@Fluent +public final class Office365ProjectDataConnectorProperties extends DataConnectorTenantId { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectDataConnectorProperties.class); + + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private Office365ProjectConnectorDataTypes dataTypes; + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public Office365ProjectConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the Office365ProjectDataConnectorProperties object itself. + */ + public Office365ProjectDataConnectorProperties withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public Office365ProjectDataConnectorProperties 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 Office365ProjectDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..26b803b34f029 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** Office PowerBI requirements check properties. */ +@Fluent +public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBICheckRequirementsProperties.class); + + /** {@inheritDoc} */ + @Override + public OfficePowerBICheckRequirementsProperties 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/OfficePowerBIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java new file mode 100644 index 0000000000000..1ae1b509b3c84 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Office Microsoft PowerBI data connector properties. */ +@Fluent +public final class OfficePowerBIDataConnectorProperties extends DataConnectorTenantId { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBIDataConnectorProperties.class); + + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private OfficePowerBIConnectorDataTypes dataTypes; + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public OfficePowerBIConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the OfficePowerBIDataConnectorProperties object itself. + */ + public OfficePowerBIDataConnectorProperties withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public OfficePowerBIDataConnectorProperties 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 OfficePowerBIDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } +} 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 18a3698bfaa39..02adf8295a958 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 @@ -15,7 +15,6 @@ import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleCommonProperties; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; import java.time.OffsetDateTime; @@ -46,12 +45,6 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "description") private String description; - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - /* * The display name for alerts created by this alert rule. */ @@ -84,18 +77,18 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "suppressionEnabled", required = true) private boolean suppressionEnabled; - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - /* * The tactics of the alert rule */ @JsonProperty(value = "tactics") private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + /* * The settings of the incidents that created from alerts triggered by this * analytics rule @@ -103,26 +96,6 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "incidentConfiguration") private IncidentConfiguration incidentConfiguration; - /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -185,26 +158,6 @@ public ScheduledAlertRuleProperties withDescription(String description) { return this; } - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withQuery(String query) { - this.query = query; - return this; - } - /** * Get the displayName property: The display name for alerts created by this alert rule. * @@ -299,42 +252,42 @@ public ScheduledAlertRuleProperties withSuppressionEnabled(boolean suppressionEn } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the tactics property: The tactics of the alert rule. * - * @return the severity value. + * @return the tactics value. */ - public AlertSeverity severity() { - return this.severity; + public List tactics() { + return this.tactics; } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Set the tactics property: The tactics of the alert rule. * - * @param severity the severity value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRuleProperties object itself. */ - public ScheduledAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = severity; + public ScheduledAlertRuleProperties withTactics(List tactics) { + this.tactics = tactics; return this; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the techniques property: The techniques of the alert rule. * - * @return the tactics value. + * @return the techniques value. */ - public List tactics() { - return this.tactics; + public List techniques() { + return this.techniques; } /** - * Set the tactics property: The tactics of the alert rule. + * Set the techniques property: The techniques of the alert rule. * - * @param tactics the tactics value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRuleProperties object itself. */ - public ScheduledAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; + public ScheduledAlertRuleProperties withTechniques(List techniques) { + this.techniques = techniques; return this; } @@ -360,63 +313,10 @@ public ScheduledAlertRuleProperties withIncidentConfiguration(IncidentConfigurat return this; } - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the ScheduledAlertRuleProperties object itself. - */ - public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withQuery(String query) { + super.withQuery(query); return this; } @@ -434,6 +334,13 @@ public ScheduledAlertRuleProperties withQueryPeriod(Duration queryPeriod) { return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withSeverity(AlertSeverity severity) { + super.withSeverity(severity); + return this; + } + /** {@inheritDoc} */ @Override public ScheduledAlertRuleProperties withTriggerOperator(TriggerOperator triggerOperator) { @@ -455,6 +362,27 @@ public ScheduledAlertRuleProperties withEventGroupingSettings(EventGroupingSetti return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withCustomDetails(Map customDetails) { + super.withCustomDetails(customDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withEntityMappings(List entityMappings) { + super.withEntityMappings(entityMappings); + return this; + } + + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + super.withAlertDetailsOverride(alertDetailsOverride); + return this; + } + /** * Validates the instance. * @@ -478,11 +406,5 @@ public void validate() { if (incidentConfiguration() != null) { incidentConfiguration().validate(); } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } } } 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 fc9447094d189..053d8922c614d 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 @@ -8,7 +8,6 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -19,58 +18,62 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** Scheduled alert rule template properties. */ @Fluent -public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { +public final class ScheduledAlertRuleTemplateProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleTemplateProperties.class); /* - * The query that creates alerts for this rule. + * the number of alert rules that were created by this template */ - @JsonProperty(value = "query") - private String query; + @JsonProperty(value = "alertRulesCreatedByTemplateCount") + private Integer alertRulesCreatedByTemplateCount; /* - * The severity for alerts created by this alert rule. + * The time that this alert rule template has been added. */ - @JsonProperty(value = "severity") - private AlertSeverity severity; + @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateUtc; /* - * The tactics of the alert rule + * The time that this alert rule template was last updated. */ - @JsonProperty(value = "tactics") - private List tactics; + @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdatedDateUtc; /* - * The version of this template - in format , where all are numbers. - * For example <1.0.2>. + * The description of the alert rule template. */ - @JsonProperty(value = "version") - private String version; + @JsonProperty(value = "description") + private String description; /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert + * The display name for alert rule template. */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; + @JsonProperty(value = "displayName") + private String displayName; /* - * Array of the entity mappings of the alert rule + * The required data connectors for this template */ - @JsonProperty(value = "entityMappings") - private List entityMappings; + @JsonProperty(value = "requiredDataConnectors") + private List requiredDataConnectors; /* - * The alert details override settings + * The alert rule template status. */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; + @JsonProperty(value = "status") + private TemplateStatus status; + + /* + * The query that creates alerts for this rule. + */ + @JsonProperty(value = "query") + private String query; /* * The frequency (in ISO 8601 duration format) for this alert rule to run. @@ -84,6 +87,12 @@ public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplat @JsonProperty(value = "queryPeriod") private Duration queryPeriod; + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity") + private AlertSeverity severity; + /* * The operation against the threshold that triggers alert rule. */ @@ -96,151 +105,188 @@ public final class ScheduledAlertRuleTemplateProperties extends AlertRuleTemplat @JsonProperty(value = "triggerThreshold") private Integer triggerThreshold; + /* + * The tactics of the alert rule template + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /* + * The version of this template - in format , where all are numbers. + * For example <1.0.2>. + */ + @JsonProperty(value = "version") + private String version; + /* * The event grouping settings. */ @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + /** - * Get the query property: The query that creates alerts for this rule. + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @return the query value. + * @return the alertRulesCreatedByTemplateCount value. */ - public String query() { - return this.query; + public Integer alertRulesCreatedByTemplateCount() { + return this.alertRulesCreatedByTemplateCount; } /** - * Set the query property: The query that creates alerts for this rule. + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @param query the query value to set. + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withQuery(String query) { - this.query = query; + public ScheduledAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; return this; } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the severity value. + * @return the createdDateUtc value. */ - public AlertSeverity severity() { - return this.severity; + public OffsetDateTime createdDateUtc() { + return this.createdDateUtc; } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplateProperties object itself. + * @return the lastUpdatedDateUtc value. */ - public ScheduledAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; + public OffsetDateTime lastUpdatedDateUtc() { + return this.lastUpdatedDateUtc; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the description property: The description of the alert rule template. * - * @return the tactics value. + * @return the description value. */ - public List tactics() { - return this.tactics; + public String description() { + return this.description; } /** - * Set the tactics property: The tactics of the alert rule. + * Set the description property: The description of the alert rule template. * - * @param tactics the tactics value to set. + * @param description the description value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + public ScheduledAlertRuleTemplateProperties withDescription(String description) { + this.description = description; return this; } /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Get the displayName property: The display name for alert rule template. * - * @return the version value. + * @return the displayName value. */ - public String version() { - return this.version; + public String displayName() { + return this.displayName; } /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Set the displayName property: The display name for alert rule template. * - * @param version the version value to set. + * @param displayName the displayName value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withVersion(String version) { - this.version = version; + public ScheduledAlertRuleTemplateProperties withDisplayName(String displayName) { + this.displayName = displayName; return this; } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Get the requiredDataConnectors property: The required data connectors for this template. * - * @return the customDetails value. + * @return the requiredDataConnectors value. */ - public Map customDetails() { - return this.customDetails; + public List requiredDataConnectors() { + return this.requiredDataConnectors; } /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Set the requiredDataConnectors property: The required data connectors for this template. * - * @param customDetails the customDetails value to set. + * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; + public ScheduledAlertRuleTemplateProperties withRequiredDataConnectors( + List requiredDataConnectors) { + this.requiredDataConnectors = requiredDataConnectors; return this; } /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. + * Get the status property: The alert rule template status. * - * @return the entityMappings value. + * @return the status value. */ - public List entityMappings() { - return this.entityMappings; + public TemplateStatus status() { + return this.status; } /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. + * Set the status property: The alert rule template status. * - * @param entityMappings the entityMappings value to set. + * @param status the status value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; + public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { + this.status = status; return this; } /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; + public String query() { + return this.query; } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. */ - public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; + public ScheduledAlertRuleTemplateProperties withQuery(String query) { + this.query = query; return this; } @@ -284,6 +330,26 @@ public ScheduledAlertRuleTemplateProperties withQueryPeriod(Duration queryPeriod return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -324,6 +390,68 @@ public ScheduledAlertRuleTemplateProperties withTriggerThreshold(Integer trigger return this; } + /** + * Get the tactics property: The tactics of the alert rule template. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule template. + * + * @param tactics the tactics value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + + /** + * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. + * + * @param version the version value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withVersion(String version) { + this.version = version; + return this; + } + /** * Get the eventGroupingSettings property: The event grouping settings. * @@ -344,40 +472,63 @@ public ScheduledAlertRuleTemplateProperties withEventGroupingSettings(EventGroup return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withCustomDetails(Map customDetails) { + this.customDetails = customDetails; return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; return this; } - /** {@inheritDoc} */ - @Override - public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { - super.withStatus(status); + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + this.alertDetailsOverride = alertDetailsOverride; return this; } @@ -386,17 +537,18 @@ public ScheduledAlertRuleTemplateProperties withStatus(TemplateStatus status) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (requiredDataConnectors() != null) { + requiredDataConnectors().forEach(e -> e.validate()); + } + if (eventGroupingSettings() != null) { + eventGroupingSettings().validate(); + } if (entityMappings() != null) { entityMappings().forEach(e -> e.validate()); } if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } } } 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 bb38f600bee9e..b3dee190ab062 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 @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.azure.resourcemanager.securityinsights.models.Version; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -64,6 +67,29 @@ public SourceControlInner withIdPropertiesId(String id) { return this; } + /** + * Get the version property: The version number associated with the source control. + * + * @return the version value. + */ + public Version version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: The version number associated with the source control. + * + * @param version the version value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withVersion(Version version) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + /** * Get the displayName property: The display name of the source control. * @@ -179,6 +205,52 @@ public SourceControlInner withRepository(Repository repository) { return this; } + /** + * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + public RepositoryResourceInfo repositoryResourceInfo() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryResourceInfo(); + } + + /** + * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @param repositoryResourceInfo the repositoryResourceInfo value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withRepositoryResourceInfo(repositoryResourceInfo); + return this; + } + + /** + * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + public DeploymentInfo lastDeploymentInfo() { + return this.innerProperties() == null ? null : this.innerProperties().lastDeploymentInfo(); + } + + /** + * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @param lastDeploymentInfo the lastDeploymentInfo value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withLastDeploymentInfo(lastDeploymentInfo); + return this; + } + /** * Validates the instance. * 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 9083d5b3fd3f4..e2bf6ba3e26b1 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 @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; +import com.azure.resourcemanager.securityinsights.models.Version; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -24,6 +27,12 @@ public final class SourceControlProperties { @JsonProperty(value = "id") private String id; + /* + * The version number associated with the source control + */ + @JsonProperty(value = "version") + private Version version; + /* * The display name of the source control */ @@ -54,6 +63,18 @@ public final class SourceControlProperties { @JsonProperty(value = "repository", required = true) private Repository repository; + /* + * Information regarding the resources created in user's repository. + */ + @JsonProperty(value = "repositoryResourceInfo") + private RepositoryResourceInfo repositoryResourceInfo; + + /* + * Information regarding the latest deployment for the source control. + */ + @JsonProperty(value = "lastDeploymentInfo") + private DeploymentInfo lastDeploymentInfo; + /** * Get the id property: The id (a Guid) of the source control. * @@ -74,6 +95,26 @@ public SourceControlProperties withId(String id) { return this; } + /** + * Get the version property: The version number associated with the source control. + * + * @return the version value. + */ + public Version version() { + return this.version; + } + + /** + * Set the version property: The version number associated with the source control. + * + * @param version the version value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withVersion(Version version) { + this.version = version; + return this; + } + /** * Get the displayName property: The display name of the source control. * @@ -174,6 +215,46 @@ public SourceControlProperties withRepository(Repository repository) { return this; } + /** + * Get the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + public RepositoryResourceInfo repositoryResourceInfo() { + return this.repositoryResourceInfo; + } + + /** + * Set the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @param repositoryResourceInfo the repositoryResourceInfo value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + this.repositoryResourceInfo = repositoryResourceInfo; + return this; + } + + /** + * Get the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + public DeploymentInfo lastDeploymentInfo() { + return this.lastDeploymentInfo; + } + + /** + * Set the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @param lastDeploymentInfo the lastDeploymentInfo value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + this.lastDeploymentInfo = lastDeploymentInfo; + return this; + } + /** * Validates the instance. * @@ -206,5 +287,11 @@ public void validate() { } else { repository().validate(); } + if (repositoryResourceInfo() != null) { + repositoryResourceInfo().validate(); + } + if (lastDeploymentInfo() != null) { + lastDeploymentInfo().validate(); + } } } 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 7e2209e586ae6..445470df17250 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 @@ -60,6 +60,12 @@ public final class ThreatIntelligenceAlertRuleProperties { @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -145,6 +151,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * Validates the instance. * 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 53fe73ec3dd89..2f6c0903eec53 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 @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; +import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateWithMitreProperties; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; @@ -17,7 +17,7 @@ /** Threat Intelligence alert rule template properties. */ @Fluent -public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplatePropertiesBase { +public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceAlertRuleTemplateProperties.class); @@ -27,12 +27,6 @@ public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRu @JsonProperty(value = "severity", required = true) private AlertSeverity severity; - /* - * The tactics of the alert rule template - */ - @JsonProperty(value = "tactics") - private List tactics; - /** * Get the severity property: The severity for alerts created by this alert rule. * @@ -53,23 +47,17 @@ public ThreatIntelligenceAlertRuleTemplateProperties withSeverity(AlertSeverity return this; } - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; + /** {@inheritDoc} */ + @Override + public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { + super.withTactics(tactics); + return this; } - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the ThreatIntelligenceAlertRuleTemplateProperties object itself. - */ - public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; + /** {@inheritDoc} */ + @Override + public ThreatIntelligenceAlertRuleTemplateProperties withTechniques(List techniques) { + super.withTechniques(techniques); return this; } 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 91ebee357d574..5b47442b51049 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 @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -112,21 +112,21 @@ public WatchlistInner withProvider(String provider) { } /** - * Get the source property: The source of the watchlist. + * Get the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - public Source source() { + public String source() { return this.innerProperties() == null ? null : this.innerProperties().source(); } /** - * Set the source property: The source of the watchlist. + * Set the source property: The filename of the watchlist, called 'source'. * * @param source the source value to set. * @return the WatchlistInner object itself. */ - public WatchlistInner withSource(Source source) { + public WatchlistInner withSource(String source) { if (this.innerProperties() == null) { this.innerProperties = new WatchlistProperties(); } @@ -134,6 +134,29 @@ public WatchlistInner withSource(Source source) { return this; } + /** + * Get the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + public SourceType sourceType() { + return this.innerProperties() == null ? null : this.innerProperties().sourceType(); + } + + /** + * Set the sourceType property: The sourceType of the watchlist. + * + * @param sourceType the sourceType value to set. + * @return the WatchlistInner object itself. + */ + public WatchlistInner withSourceType(SourceType sourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new WatchlistProperties(); + } + this.innerProperties().withSourceType(sourceType); + return this; + } + /** * Get the created property: The time the watchlist was created. * @@ -510,29 +533,6 @@ public WatchlistInner withUploadStatus(String uploadStatus) { return this; } - /** - * Get the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - public Integer watchlistItemsCount() { - return this.innerProperties() == null ? null : this.innerProperties().watchlistItemsCount(); - } - - /** - * Set the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount the watchlistItemsCount value to set. - * @return the WatchlistInner object itself. - */ - public WatchlistInner withWatchlistItemsCount(Integer watchlistItemsCount) { - if (this.innerProperties() == null) { - this.innerProperties = new WatchlistProperties(); - } - this.innerProperties().withWatchlistItemsCount(watchlistItemsCount); - return this; - } - /** * Validates the instance. * 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 e9024eb000a93..bc4c89f488c40 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 @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -38,10 +38,16 @@ public final class WatchlistProperties { private String provider; /* - * The source of the watchlist + * The filename of the watchlist, called 'source' */ - @JsonProperty(value = "source", required = true) - private Source source; + @JsonProperty(value = "source") + private String source; + + /* + * The sourceType of the watchlist + */ + @JsonProperty(value = "sourceType") + private SourceType sourceType; /* * The time the watchlist was created @@ -146,12 +152,6 @@ public final class WatchlistProperties { @JsonProperty(value = "uploadStatus") private String uploadStatus; - /* - * The number of Watchlist Items in the Watchlist - */ - @JsonProperty(value = "watchlistItemsCount") - private Integer watchlistItemsCount; - /** * Get the watchlistId property: The id (a Guid) of the watchlist. * @@ -213,25 +213,45 @@ public WatchlistProperties withProvider(String provider) { } /** - * Get the source property: The source of the watchlist. + * Get the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - public Source source() { + public String source() { return this.source; } /** - * Set the source property: The source of the watchlist. + * Set the source property: The filename of the watchlist, called 'source'. * * @param source the source value to set. * @return the WatchlistProperties object itself. */ - public WatchlistProperties withSource(Source source) { + public WatchlistProperties withSource(String source) { this.source = source; return this; } + /** + * Get the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + public SourceType sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType property: The sourceType of the watchlist. + * + * @param sourceType the sourceType value to set. + * @return the WatchlistProperties object itself. + */ + public WatchlistProperties withSourceType(SourceType sourceType) { + this.sourceType = sourceType; + return this; + } + /** * Get the created property: The time the watchlist was created. * @@ -560,26 +580,6 @@ public WatchlistProperties withUploadStatus(String uploadStatus) { return this; } - /** - * Get the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - public Integer watchlistItemsCount() { - return this.watchlistItemsCount; - } - - /** - * Set the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount the watchlistItemsCount value to set. - * @return the WatchlistProperties object itself. - */ - public WatchlistProperties withWatchlistItemsCount(Integer watchlistItemsCount) { - this.watchlistItemsCount = watchlistItemsCount; - return this; - } - /** * Validates the instance. * @@ -596,11 +596,6 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property provider in model WatchlistProperties")); } - if (source() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property source in model WatchlistProperties")); - } if (createdBy() != null) { createdBy().validate(); } 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 6af30a5c8ee8a..9e6a6c8208ec1 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 @@ -275,7 +275,7 @@ private Mono> listByAlertRuleSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAlertRuleAsync( @@ -295,7 +295,7 @@ private PagedFlux listByAlertRuleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByAlertRuleAsync( @@ -314,7 +314,7 @@ private PagedFlux listByAlertRuleAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAlertRule( @@ -332,7 +332,7 @@ public PagedIterable listByAlertRule( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByAlertRule( 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 9c3dfbb498c97..f528a8ebf7b89 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 @@ -222,7 +222,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -239,7 +239,7 @@ private PagedFlux listAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -257,7 +257,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -273,7 +273,7 @@ public PagedIterable list(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 34d972d74ac24..ce3c83f3673b4 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 @@ -256,7 +256,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 alert rules. + * @return all alert rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -273,7 +273,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 alert rules. + * @return all alert rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -290,7 +290,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -306,7 +306,7 @@ public PagedIterable list(String resourceGroupName, String works * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java index 9f20e40e9d252..799bf683c8a8d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRuleImpl.java @@ -61,22 +61,22 @@ public List actions() { } } - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - public OffsetDateTime lastModifiedTimeUtc() { return this.innerModel().lastModifiedTimeUtc(); } - public ClientInfo createdBy() { - return this.innerModel().createdBy(); + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); } public ClientInfo lastModifiedBy() { return this.innerModel().lastModifiedBy(); } + public ClientInfo createdBy() { + return this.innerModel().createdBy(); + } + public AutomationRuleInner innerModel() { return this.innerObject; } @@ -181,11 +181,6 @@ public AutomationRule refresh(Context context) { return this; } - public AutomationRuleImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - public AutomationRuleImpl withDisplayName(String displayName) { this.innerModel().withDisplayName(displayName); return this; @@ -205,4 +200,9 @@ public AutomationRuleImpl withActions(List actions) { this.innerModel().withActions(actions); return this; } + + public AutomationRuleImpl withEtag(String etag) { + this.innerModel().withEtag(etag); + return this; + } } 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 838c59389f1ad..e2ae293b14f82 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 @@ -65,64 +65,64 @@ private interface AutomationRulesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("automationRuleId") String automationRuleId, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( + @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("automationRuleId") String automationRuleId, + @BodyParam("application/json") AutomationRuleInner automationRuleToUpsert, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Put( + @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("automationRuleId") String automationRuleId, - @BodyParam("application/json") AutomationRuleInner automationRule, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Delete( + @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules/{automationRuleId}") - @ExpectedResponses({200, 204}) + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/automationRules") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("automationRuleId") String automationRuleId, @HeaderParam("Accept") String accept, Context context); @@ -138,18 +138,19 @@ Mono> listNext( } /** - * Gets all automation rules. + * 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 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 automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -169,45 +170,42 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (automationRuleId == null) { + return Mono + .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list( + .get( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + automationRuleId, 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 automation rules. + * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the automation rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -227,107 +225,101 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (automationRuleId == null) { + return Mono + .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( + .get( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + automationRuleId, accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all automation rules. - * - * @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 automation rules. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + context); } /** - * Gets all automation rules. + * 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 context The context to associate with this operation. + * @param automationRuleId Automation 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 all automation rules. + * @return the automation rule on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** - * Gets all automation rules. + * 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 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 automation rules. + * @return the automation rule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { + return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); } /** - * Gets all automation rules. + * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 automation rules. + * @return the automation rule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** - * Gets 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. * @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. - * @return the automation rule 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> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -351,38 +343,47 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } + if (automationRuleToUpsert != null) { + automationRuleToUpsert.validate(); + } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .get( + .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, + automationRuleToUpsert, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets 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. * @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 automation rule 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> getWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -406,35 +407,71 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } + if (automationRuleToUpsert != null) { + automationRuleToUpsert.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .createOrUpdate( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, + automationRuleToUpsert, accept, context); } /** - * Gets 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. * @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. - * @return the automation rule on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( + private Mono createOrUpdateAsync( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 automationRuleId) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) + final AutomationRuleInner automationRuleToUpsert = null; + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -446,7 +483,7 @@ private Mono getAsync( } /** - * Gets 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. @@ -454,46 +491,53 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { - return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId) { + final AutomationRuleInner automationRuleToUpsert = null; + return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).block(); } /** - * Gets 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. * @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 automation rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) + .block(); } /** - * Creates or updates the automation rule. + * 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. - * @param automationRule 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. - * @return represents an automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return any object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -517,49 +561,38 @@ private Mono> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } - if (automationRule == null) { - return Mono.error(new IllegalArgumentException("Parameter automationRule is required and cannot be null.")); - } else { - automationRule.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .createOrUpdate( + .delete( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, - automationRule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates the automation rule. + * 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. - * @param automationRule 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 represents an automation rule along with {@link Response} on successful completion of {@link Mono}. + * @return any object along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRule, - Context context) { + private Mono> deleteWithResponseAsync( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -583,44 +616,36 @@ private Mono> createOrUpdateWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); } - if (automationRule == null) { - return Mono.error(new IllegalArgumentException("Parameter automationRule is required and cannot be null.")); - } else { - automationRule.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .createOrUpdate( + .delete( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, automationRuleId, - automationRule, accept, context); } /** - * Creates or updates the automation rule. + * 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. - * @param automationRule 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. - * @return represents an automation rule on successful completion of {@link Mono}. + * @return any object on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, automationRule) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -630,62 +655,52 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates the automation rule. + * 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. - * @param automationRule 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. - * @return represents an automation rule. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String automationRuleId, AutomationRuleInner automationRule) { - return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRule).block(); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); } /** - * Creates or updates the automation rule. + * 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. - * @param automationRule 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 represents an automation rule along with {@link Response}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRule, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRule, context) - .block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** - * Delete the automation rule. + * Gets all automation rules. * * @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 ManagementException 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}. + * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -705,42 +720,45 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .delete( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - automationRuleId, 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())); } /** - * Delete the automation rule. + * Gets all automation rules. * * @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 {@link Response} on successful completion of {@link Mono}. + * @return all automation rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -760,72 +778,91 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (automationRuleId == null) { - return Mono - .error(new IllegalArgumentException("Parameter automationRuleId is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .delete( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - automationRuleId, accept, - context); + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Delete the automation rule. + * Gets all automation rules. * * @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 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. + * @return all automation rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId) - .flatMap((Response res) -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Delete the automation rule. + * Gets all automation rules. * * @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 all automation rules as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String automationRuleId) { - deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Delete the automation rule. + * Gets all automation rules. + * + * @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 automation rules as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Gets all automation rules. * * @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 {@link Response}. + * @return all automation rules as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); } /** @@ -835,7 +872,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 all the automation rules 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) { @@ -871,7 +908,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 all the automation rules 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/AutomationRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java index 1d2b6dd64ef21..1057d84fd18ae 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 @@ -29,16 +29,6 @@ public AutomationRulesImpl( this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(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 AutomationRuleImpl(inner1, this.manager())); - } - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); if (inner != null) { @@ -63,15 +53,25 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String automationRuleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); } - public Response deleteWithResponse( + public Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(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 AutomationRuleImpl(inner1, this.manager())); + } + public AutomationRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -126,7 +126,7 @@ public Response getByIdWithResponse(String id, Context context) return this.getWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } - public void deleteById(String id) { + public Object deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -150,10 +150,10 @@ public void deleteById(String id) { String .format("The resource ID '%s' is not valid. Missing path segment 'automationRules'.", id))); } - this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE); + return this.deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } - public Response deleteByIdWithResponse(String id, Context context) { + public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java index ca788723989d8..f485c12534683 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java @@ -7,7 +7,9 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.Bookmark; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; import com.azure.resourcemanager.securityinsights.models.IncidentInfo; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; @@ -96,6 +98,33 @@ public IncidentInfo incidentInfo() { return this.innerModel().incidentInfo(); } + public List entityMappings() { + List inner = this.innerModel().entityMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List tactics() { + List inner = this.innerModel().tactics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List techniques() { + List inner = this.innerModel().techniques(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public BookmarkInner innerModel() { return this.innerObject; } @@ -266,4 +295,19 @@ public BookmarkImpl withIncidentInfo(IncidentInfo incidentInfo) { this.innerModel().withIncidentInfo(incidentInfo); return this; } + + public BookmarkImpl withEntityMappings(List entityMappings) { + this.innerModel().withEntityMappings(entityMappings); + return this; + } + + public BookmarkImpl withTactics(List tactics) { + this.innerModel().withTactics(tactics); + return this; + } + + public BookmarkImpl withTechniques(List techniques) { + this.innerModel().withTechniques(techniques); + return this; + } } 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 cd0bf4993fc76..fd5f260e1b041 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 @@ -318,7 +318,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +343,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String bookmarkId) { @@ -372,7 +372,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -400,7 +400,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { @@ -428,7 +428,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 11847a7ceb15f..f57e6056d5c7b 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 @@ -256,7 +256,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -273,7 +273,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -290,7 +290,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -306,7 +306,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 5f5202c17b91e..abdc51d77216e 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 @@ -294,7 +294,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 data connectors. + * @return all data connectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -311,7 +311,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all data connectors. + * @return all data connectors as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -328,7 +328,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -344,7 +344,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 data connectors. + * @return all data connectors as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 a204ff2ce4127..e453875465f74 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 @@ -278,7 +278,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -295,7 +295,7 @@ private PagedFlux listAsync(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -312,7 +312,7 @@ private PagedFlux listAsync(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -328,7 +328,7 @@ public PagedIterable list(String resourceGroupName, String workspac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 66db6a8634aa4..135d41d101dc4 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 @@ -260,7 +260,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -285,7 +285,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String entityId) { @@ -314,7 +314,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -342,7 +342,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { @@ -370,7 +370,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable 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 4926ffd27037b..c3f497ed42950 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 @@ -265,7 +265,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -283,7 +283,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -303,7 +303,7 @@ private PagedFlux listAsync(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 entity queries. + * @return all entity queries as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -321,7 +321,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -339,7 +339,7 @@ public PagedIterable list(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 0756bf9bf9dcf..cad5474a21de1 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 @@ -28,7 +28,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.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; import reactor.core.publisher.Mono; @@ -69,7 +69,7 @@ private interface EntityQueryTemplatesService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, - @QueryParam("kind") Constant69 kind, + @QueryParam("kind") Constant73 kind, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -118,7 +118,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant69 kind) { + String resourceGroupName, String workspaceName, Constant73 kind) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -178,7 +178,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -230,11 +230,11 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant69 kind) { + String resourceGroupName, String workspaceName, Constant73 kind) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -248,11 +248,11 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant69 kind = null; + final Constant73 kind = null; return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -268,11 +268,11 @@ private PagedFlux listAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -286,11 +286,11 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant69 kind = null; + final Constant73 kind = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); } @@ -304,11 +304,11 @@ public PagedIterable list(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); } 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 46d6508ef715d..7a7d2470d7997 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.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -36,7 +36,7 @@ public PagedIterable list(String resourceGroupName, String } public PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context) { + String resourceGroupName, String workspaceName, Constant73 kind, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, kind, context); return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); 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 3928b3680b68f..dc44405b2d971 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 @@ -318,7 +318,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +343,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -373,7 +373,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -401,7 +401,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -429,7 +429,7 @@ public PagedIterable list(String resourceGroupName, 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 all incident comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 379c25dfa6855..de3748fa5781e 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 @@ -318,7 +318,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -343,7 +343,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String incidentId) { @@ -372,7 +372,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations. + * @return all incident relations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -400,7 +400,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -428,7 +428,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 1f7d1a8f8498e..ddfea1a91db13 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,6 +37,7 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; 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; @@ -68,6 +69,24 @@ public final class IncidentsClientImpl implements IncidentsClient { @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") private interface IncidentsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentIdentifier}" + + "/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("incidentIdentifier") String incidentIdentifier, + @BodyParam("application/json") ManualTriggerRequestBody requestBody, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -212,6 +231,224 @@ Mono> listNext( Context context); } + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody 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 (incidentIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter incidentIdentifier 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, + incidentIdentifier, + requestBody, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runPlaybookWithResponseAsync( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody 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 (incidentIdentifier == null) { + return Mono + .error(new IllegalArgumentException("Parameter incidentIdentifier 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, + incidentIdentifier, + requestBody, + accept, + context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) { + final ManualTriggerRequestBody requestBody = null; + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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) + 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(); + } + /** * Gets all incidents. * @@ -364,7 +601,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -382,7 +619,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -410,7 +647,7 @@ private PagedFlux listAsync(String resourceGroupName, String work * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 incidents. + * @return all incidents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -434,7 +671,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -460,7 +697,7 @@ public PagedIterable list(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 d833acc504192..a261516f93480 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 @@ -20,6 +20,7 @@ import com.azure.resourcemanager.securityinsights.models.IncidentBookmarkList; import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; 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; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -38,6 +39,21 @@ 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, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + return this + .serviceClient() + .runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); 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 d115fb44a4973..453e35ddc1e16 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 @@ -97,6 +97,54 @@ 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 MetadataModelInner innerModel() { return this.innerObject; } @@ -330,6 +378,76 @@ public MetadataModelImpl withLastPublishDate(LocalDate lastPublishDate) { } } + public MetadataModelImpl withCustomVersion(String customVersion) { + if (isInCreateMode()) { + this.innerModel().withCustomVersion(customVersion); + return this; + } else { + this.updateMetadataPatch.withCustomVersion(customVersion); + return this; + } + } + + public MetadataModelImpl withContentSchemaVersion(String contentSchemaVersion) { + if (isInCreateMode()) { + this.innerModel().withContentSchemaVersion(contentSchemaVersion); + return this; + } else { + this.updateMetadataPatch.withContentSchemaVersion(contentSchemaVersion); + return this; + } + } + + public MetadataModelImpl withIcon(String icon) { + if (isInCreateMode()) { + this.innerModel().withIcon(icon); + return this; + } else { + this.updateMetadataPatch.withIcon(icon); + return this; + } + } + + public MetadataModelImpl withThreatAnalysisTactics(List threatAnalysisTactics) { + if (isInCreateMode()) { + this.innerModel().withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } else { + this.updateMetadataPatch.withThreatAnalysisTactics(threatAnalysisTactics); + return this; + } + } + + public MetadataModelImpl withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (isInCreateMode()) { + this.innerModel().withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } else { + this.updateMetadataPatch.withThreatAnalysisTechniques(threatAnalysisTechniques); + return this; + } + } + + public MetadataModelImpl withPreviewImages(List previewImages) { + if (isInCreateMode()) { + this.innerModel().withPreviewImages(previewImages); + return this; + } else { + this.updateMetadataPatch.withPreviewImages(previewImages); + return this; + } + } + + public MetadataModelImpl withPreviewImagesDark(List previewImagesDark) { + if (isInCreateMode()) { + this.innerModel().withPreviewImagesDark(previewImagesDark); + return this; + } else { + this.updateMetadataPatch.withPreviewImagesDark(previewImagesDark); + 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/MetadatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java index 1d3d858e697ca..45a887bd3df85 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 @@ -309,7 +309,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -327,7 +327,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -354,7 +354,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all the metadata. + * @return list of all the metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -378,7 +378,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -403,7 +403,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( 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 b7ec797af5a34..b1cfe79e64a9a 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 @@ -238,7 +238,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 office365 consents. + * @return all office365 consents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -255,7 +255,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all office365 consents. + * @return all office365 consents as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -272,7 +272,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -288,7 +288,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 4996538af5701..92d50922f0694 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 @@ -150,7 +150,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -164,7 +164,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -177,7 +177,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -191,7 +192,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { 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 3c668ed365480..ac86c62b807c3 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 @@ -189,6 +189,18 @@ public AutomationRulesClient getAutomationRules() { return this.automationRules; } + /** The IncidentsClient object to access its operations. */ + private final IncidentsClient incidents; + + /** + * Gets the IncidentsClient object to access its operations. + * + * @return the IncidentsClient object. + */ + public IncidentsClient getIncidents() { + return this.incidents; + } + /** The BookmarksClient object to access its operations. */ private final BookmarksClient bookmarks; @@ -249,18 +261,6 @@ public DomainWhoisClient getDomainWhois() { return this.domainWhois; } - /** The EntityQueriesClient object to access its operations. */ - private final EntityQueriesClient entityQueries; - - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - public EntityQueriesClient getEntityQueries() { - return this.entityQueries; - } - /** The EntitiesClient object to access its operations. */ private final EntitiesClient entities; @@ -309,16 +309,28 @@ public EntityRelationsClient getEntityRelations() { return this.entityRelations; } - /** The IncidentsClient object to access its operations. */ - private final IncidentsClient incidents; + /** The EntityQueriesClient object to access its operations. */ + private final EntityQueriesClient entityQueries; /** - * Gets the IncidentsClient object to access its operations. + * Gets the EntityQueriesClient object to access its operations. * - * @return the IncidentsClient object. + * @return the EntityQueriesClient object. */ - public IncidentsClient getIncidents() { - return this.incidents; + public EntityQueriesClient getEntityQueries() { + return this.entityQueries; + } + + /** The EntityQueryTemplatesClient object to access its operations. */ + private final EntityQueryTemplatesClient entityQueryTemplates; + + /** + * Gets the EntityQueryTemplatesClient object to access its operations. + * + * @return the EntityQueryTemplatesClient object. + */ + public EntityQueryTemplatesClient getEntityQueryTemplates() { + return this.entityQueryTemplates; } /** The IncidentCommentsClient object to access its operations. */ @@ -357,6 +369,18 @@ public MetadatasClient getMetadatas() { return this.metadatas; } + /** The OfficeConsentsClient object to access its operations. */ + private final OfficeConsentsClient officeConsents; + + /** + * Gets the OfficeConsentsClient object to access its operations. + * + * @return the OfficeConsentsClient object. + */ + public OfficeConsentsClient getOfficeConsents() { + return this.officeConsents; + } + /** The SentinelOnboardingStatesClient object to access its operations. */ private final SentinelOnboardingStatesClient sentinelOnboardingStates; @@ -405,6 +429,42 @@ public SourceControlsOperationsClient getSourceControlsOperations() { return this.sourceControlsOperations; } + /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; + + /** + * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorsClient object. + */ + public ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators() { + return this.threatIntelligenceIndicators; + } + + /** The ThreatIntelligenceIndicatorsOperationsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorsOperationsClient threatIntelligenceIndicatorsOperations; + + /** + * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorsOperationsClient object. + */ + public ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations() { + return this.threatIntelligenceIndicatorsOperations; + } + + /** The ThreatIntelligenceIndicatorMetricsClient object to access its operations. */ + private final ThreatIntelligenceIndicatorMetricsClient threatIntelligenceIndicatorMetrics; + + /** + * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. + * + * @return the ThreatIntelligenceIndicatorMetricsClient object. + */ + public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics() { + return this.threatIntelligenceIndicatorMetrics; + } + /** The WatchlistsClient object to access its operations. */ private final WatchlistsClient watchlists; @@ -453,42 +513,6 @@ public DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckReq return this.dataConnectorsCheckRequirementsOperations; } - /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; - - /** - * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsClient object. - */ - public ThreatIntelligenceIndicatorsClient getThreatIntelligenceIndicators() { - return this.threatIntelligenceIndicators; - } - - /** The ThreatIntelligenceIndicatorsOperationsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorsOperationsClient threatIntelligenceIndicatorsOperations; - - /** - * Gets the ThreatIntelligenceIndicatorsOperationsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorsOperationsClient object. - */ - public ThreatIntelligenceIndicatorsOperationsClient getThreatIntelligenceIndicatorsOperations() { - return this.threatIntelligenceIndicatorsOperations; - } - - /** The ThreatIntelligenceIndicatorMetricsClient object to access its operations. */ - private final ThreatIntelligenceIndicatorMetricsClient threatIntelligenceIndicatorMetrics; - - /** - * Gets the ThreatIntelligenceIndicatorMetricsClient object to access its operations. - * - * @return the ThreatIntelligenceIndicatorMetricsClient object. - */ - public ThreatIntelligenceIndicatorMetricsClient getThreatIntelligenceIndicatorMetrics() { - return this.threatIntelligenceIndicatorMetrics; - } - /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -501,30 +525,6 @@ public OperationsClient getOperations() { return this.operations; } - /** The OfficeConsentsClient object to access its operations. */ - private final OfficeConsentsClient officeConsents; - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - public OfficeConsentsClient getOfficeConsents() { - return this.officeConsents; - } - - /** The EntityQueryTemplatesClient object to access its operations. */ - private final EntityQueryTemplatesClient entityQueryTemplates; - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. - * - * @return the EntityQueryTemplatesClient object. - */ - public EntityQueryTemplatesClient getEntityQueryTemplates() { - return this.entityQueryTemplates; - } - /** * Initializes an instance of SecurityInsights client. * @@ -547,39 +547,39 @@ public EntityQueryTemplatesClient getEntityQueryTemplates() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-01-preview"; + this.apiVersion = "2022-01-01-preview"; this.alertRules = new AlertRulesClientImpl(this); this.actions = new ActionsClientImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this); this.automationRules = new AutomationRulesClientImpl(this); + this.incidents = new IncidentsClientImpl(this); this.bookmarks = new BookmarksClientImpl(this); this.bookmarkRelations = new BookmarkRelationsClientImpl(this); this.bookmarkOperations = new BookmarkOperationsClientImpl(this); this.ipGeodatas = new IpGeodatasClientImpl(this); this.domainWhois = new DomainWhoisClientImpl(this); - this.entityQueries = new EntityQueriesClientImpl(this); this.entities = new EntitiesClientImpl(this); this.entitiesGetTimelines = new EntitiesGetTimelinesClientImpl(this); this.entitiesRelations = new EntitiesRelationsClientImpl(this); this.entityRelations = new EntityRelationsClientImpl(this); - this.incidents = new IncidentsClientImpl(this); + this.entityQueries = new EntityQueriesClientImpl(this); + this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); this.incidentComments = new IncidentCommentsClientImpl(this); this.incidentRelations = new IncidentRelationsClientImpl(this); this.metadatas = new MetadatasClientImpl(this); + this.officeConsents = new OfficeConsentsClientImpl(this); this.sentinelOnboardingStates = new SentinelOnboardingStatesClientImpl(this); this.productSettings = new ProductSettingsClientImpl(this); this.sourceControls = new SourceControlsClientImpl(this); this.sourceControlsOperations = new SourceControlsOperationsClientImpl(this); + this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); + this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); + this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); this.watchlists = new WatchlistsClientImpl(this); this.watchlistItems = new WatchlistItemsClientImpl(this); this.dataConnectors = new DataConnectorsClientImpl(this); this.dataConnectorsCheckRequirementsOperations = new DataConnectorsCheckRequirementsOperationsClientImpl(this); - this.threatIntelligenceIndicators = new ThreatIntelligenceIndicatorsClientImpl(this); - this.threatIntelligenceIndicatorsOperations = new ThreatIntelligenceIndicatorsOperationsClientImpl(this); - this.threatIntelligenceIndicatorMetrics = new ThreatIntelligenceIndicatorMetricsClientImpl(this); this.operations = new OperationsClientImpl(this); - this.officeConsents = new OfficeConsentsClientImpl(this); - this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java index 34f3f44ce2220..8923bdc0d8b35 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java @@ -8,9 +8,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; import com.azure.resourcemanager.securityinsights.models.ContentType; +import com.azure.resourcemanager.securityinsights.models.DeploymentInfo; import com.azure.resourcemanager.securityinsights.models.RepoType; import com.azure.resourcemanager.securityinsights.models.Repository; +import com.azure.resourcemanager.securityinsights.models.RepositoryResourceInfo; import com.azure.resourcemanager.securityinsights.models.SourceControl; +import com.azure.resourcemanager.securityinsights.models.Version; import java.util.Collections; import java.util.List; @@ -50,6 +53,10 @@ public String idPropertiesId() { return this.innerModel().idPropertiesId(); } + public Version version() { + return this.innerModel().version(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -75,6 +82,14 @@ public Repository repository() { return this.innerModel().repository(); } + public RepositoryResourceInfo repositoryResourceInfo() { + return this.innerModel().repositoryResourceInfo(); + } + + public DeploymentInfo lastDeploymentInfo() { + return this.innerModel().lastDeploymentInfo(); + } + public SourceControlInner innerModel() { return this.innerObject; } @@ -151,6 +166,11 @@ public SourceControlImpl withIdPropertiesId(String idPropertiesId) { return this; } + public SourceControlImpl withVersion(Version version) { + this.innerModel().withVersion(version); + return this; + } + public SourceControlImpl withDisplayName(String displayName) { this.innerModel().withDisplayName(displayName); return this; @@ -175,4 +195,14 @@ public SourceControlImpl withRepository(Repository repository) { this.innerModel().withRepository(repository); return this; } + + public SourceControlImpl withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo) { + this.innerModel().withRepositoryResourceInfo(repositoryResourceInfo); + return this; + } + + public SourceControlImpl withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo) { + this.innerModel().withLastDeploymentInfo(lastDeploymentInfo); + return this; + } } 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 139dbcdcc6707..7a30aaef68445 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 @@ -222,7 +222,7 @@ private Mono> listRepositoriesSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRepositoriesAsync( @@ -242,7 +242,7 @@ private PagedFlux listRepositoriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRepositoriesAsync( @@ -261,7 +261,7 @@ private PagedFlux listRepositoriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listRepositories( @@ -279,7 +279,7 @@ public PagedIterable listRepositories( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable 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 964f227ab7038..bbf6734d32a64 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 @@ -260,7 +260,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -277,7 +277,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { @@ -294,7 +294,7 @@ private PagedFlux listAsync(String resourceGroupName, 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 all source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -310,7 +310,7 @@ public PagedIterable list(String resourceGroupName, String w * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { 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 b43c7bcb3c6aa..1b0ae096e57a9 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 @@ -1063,7 +1063,7 @@ private Mono> queryIndicatorsS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux queryIndicatorsAsync( @@ -1085,7 +1085,7 @@ private PagedFlux queryIndicatorsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux queryIndicatorsAsync( @@ -1109,7 +1109,7 @@ private PagedFlux queryIndicatorsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable queryIndicators( @@ -1130,7 +1130,7 @@ public PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable queryIndicators( 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 25a63690b0033..abffedf3e80ee 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 @@ -251,7 +251,7 @@ private Mono> listSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -269,7 +269,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -297,7 +297,7 @@ private PagedFlux listAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -321,7 +321,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -347,7 +347,7 @@ public PagedIterable list(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java index 5b1862258674d..077a857d33e25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistImpl.java @@ -7,7 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; -import com.azure.resourcemanager.securityinsights.models.Source; +import com.azure.resourcemanager.securityinsights.models.SourceType; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.azure.resourcemanager.securityinsights.models.Watchlist; import java.time.Duration; @@ -52,10 +52,14 @@ public String provider() { return this.innerModel().provider(); } - public Source source() { + public String source() { return this.innerModel().source(); } + public SourceType sourceType() { + return this.innerModel().sourceType(); + } + public OffsetDateTime created() { return this.innerModel().created(); } @@ -125,10 +129,6 @@ public String uploadStatus() { return this.innerModel().uploadStatus(); } - public Integer watchlistItemsCount() { - return this.innerModel().watchlistItemsCount(); - } - public WatchlistInner innerModel() { return this.innerObject; } @@ -252,11 +252,16 @@ public WatchlistImpl withProvider(String provider) { return this; } - public WatchlistImpl withSource(Source source) { + public WatchlistImpl withSource(String source) { this.innerModel().withSource(source); return this; } + public WatchlistImpl withSourceType(SourceType sourceType) { + this.innerModel().withSourceType(sourceType); + return this; + } + public WatchlistImpl withCreated(OffsetDateTime created) { this.innerModel().withCreated(created); return this; @@ -336,9 +341,4 @@ public WatchlistImpl withUploadStatus(String uploadStatus) { this.innerModel().withUploadStatus(uploadStatus); return this; } - - public WatchlistImpl withWatchlistItemsCount(Integer watchlistItemsCount) { - this.innerModel().withWatchlistItemsCount(watchlistItemsCount); - return this; - } } 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 1aa777a13af1e..c2d911f4aa97f 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 @@ -75,6 +75,7 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skipToken") String skipToken, @PathParam("watchlistAlias") String watchlistAlias, @HeaderParam("Accept") String accept, Context context); @@ -151,6 +152,9 @@ Mono> listNext( * @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 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. @@ -158,7 +162,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -192,6 +196,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, watchlistAlias, accept, context)) @@ -213,6 +218,9 @@ private Mono> listSinglePageAsync( * @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 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. @@ -221,7 +229,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -253,6 +261,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, watchlistAlias, accept, context) @@ -267,6 +276,28 @@ private Mono> listSinglePageAsync( null)); } + /** + * Gets all watchlist Items. + * + * @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 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 watchlist Items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * Gets all watchlist Items. * @@ -276,13 +307,14 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( String resourceGroupName, String workspaceName, String watchlistAlias) { + final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias), + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -292,17 +324,20 @@ private PagedFlux listAsync( * @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 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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -315,12 +350,13 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( String resourceGroupName, String workspaceName, String watchlistAlias) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias)); + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken)); } /** @@ -329,16 +365,19 @@ public 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 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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, context)); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, watchlistAlias, skipToken, context)); } /** 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 92310d61d5de0..3c30a198c5247 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 @@ -36,9 +36,9 @@ public PagedIterable list(String resourceGroupName, String worksp } public PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias, context); + this.serviceClient().list(resourceGroupName, workspaceName, watchlistAlias, skipToken, context); return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } 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 8b22d8352493e..72f51ce4c276c 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 @@ -32,6 +32,8 @@ import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; import com.azure.resourcemanager.securityinsights.models.WatchlistList; +import com.azure.resourcemanager.securityinsights.models.WatchlistsCreateOrUpdateResponse; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WatchlistsClient. */ @@ -74,6 +76,7 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @@ -99,7 +102,7 @@ Mono> get( + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -115,7 +118,7 @@ Mono> delete( + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -142,6 +145,9 @@ Mono> listNext( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @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. @@ -149,7 +155,8 @@ Mono> listNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skipToken) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -180,6 +187,7 @@ private Mono> listSinglePageAsync(String resourceG this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, accept, context)) .>map( @@ -199,6 +207,9 @@ private Mono> listSinglePageAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @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. @@ -208,7 +219,7 @@ private Mono> listSinglePageAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + String resourceGroupName, String workspaceName, String skipToken, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -237,6 +248,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, + skipToken, accept, context) .map( @@ -250,6 +262,26 @@ private Mono> listSinglePageAsync( null)); } + /** + * Gets all watchlists, without watchlist items. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @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 watchlists, without watchlist items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + /** * Gets all watchlists, without watchlist items. * @@ -258,12 +290,14 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -271,16 +305,20 @@ private PagedFlux listAsync(String resourceGroupName, String wor * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skipToken, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -292,11 +330,12 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken)); } /** @@ -304,15 +343,19 @@ public PagedIterable list(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 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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items 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)); + public PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skipToken, context)); } /** @@ -488,10 +531,10 @@ 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 the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( + private Mono deleteWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias) { if (this.client.getEndpoint() == null) { return Mono @@ -542,10 +585,10 @@ private Mono> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( + private Mono deleteWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -597,7 +640,7 @@ private Mono> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String watchlistAlias) { return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias) - .flatMap((Response res) -> Mono.empty()); + .flatMap((WatchlistsDeleteResponse res) -> Mono.empty()); } /** @@ -625,17 +668,20 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( + public WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -644,11 +690,10 @@ 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 represents a Watchlist in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { if (this.client.getEndpoint() == null) { return Mono @@ -696,8 +741,11 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -707,11 +755,10 @@ 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 a Watchlist in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, @@ -760,8 +807,11 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -777,7 +827,7 @@ private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist) .flatMap( - (Response res) -> { + (WatchlistsCreateOrUpdateResponse res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -787,8 +837,11 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -806,8 +859,11 @@ public WatchlistInner createOrUpdate( } /** - * Creates or updates a watchlist and its watchlist items (bulk creation, e.g. through text/csv content type). To - * create a Watchlist and its items, we should call this endpoint with rawContent and contentType properties. + * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To + * create a Watchlist and its Items, we should call this endpoint with either rawContent or a valid SAR URI and + * contentType properties. The rawContent is mainly used for small watchlist (content size below 3.8 MB). The SAS + * URI enables the creation of large watchlist, where the content size can go up to 500 MB. The status of processing + * such large file can be polled through the URL returned in Azure-AsyncOperation header. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -817,10 +873,10 @@ public WatchlistInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, 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 02594b305e8dd..11a3677dd484f 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 @@ -13,6 +13,7 @@ import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; import com.azure.resourcemanager.securityinsights.models.Watchlist; import com.azure.resourcemanager.securityinsights.models.Watchlists; +import com.azure.resourcemanager.securityinsights.models.WatchlistsDeleteResponse; import com.fasterxml.jackson.annotation.JsonIgnore; public final class WatchlistsImpl implements Watchlists { @@ -34,8 +35,10 @@ public PagedIterable list(String resourceGroupName, String workspaceN return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); + public PagedIterable list( + String resourceGroupName, String workspaceName, String skipToken, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skipToken, context); return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } @@ -67,7 +70,7 @@ public void delete(String resourceGroupName, String workspaceName, String watchl this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); } - public Response deleteWithResponse( + public WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); } @@ -150,7 +153,7 @@ public void deleteById(String id) { this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { + public WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger 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 new file mode 100644 index 0000000000000..773b24e3825cf --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java @@ -0,0 +1,34 @@ +// 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 ActionType. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value ModifyProperties for ActionType. */ + public static final ActionType MODIFY_PROPERTIES = fromString("ModifyProperties"); + + /** Static value RunPlaybook for ActionType. */ + public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** @return known ActionType values. */ + public static Collection values() { + return values(ActionType.class); + } +} 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 da00cf5da30b9..97de0d03303b9 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 @@ -19,7 +19,7 @@ public interface Actions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ PagedIterable listByAlertRule(String resourceGroupName, String workspaceName, String ruleId); @@ -33,7 +33,7 @@ public interface Actions { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 actions of alert rule. + * @return all actions of alert rule as paginated response with {@link PagedIterable}. */ PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); 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 new file mode 100644 index 0000000000000..cadccb694ed74 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java @@ -0,0 +1,116 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Alert rule template with MITRE property bag. */ +@Fluent +public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePropertiesBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AlertRuleTemplateWithMitreProperties.class); + + /* + * The tactics of the alert rule + */ + @JsonProperty(value = "tactics") + private List tactics; + + /* + * The techniques of the alert rule + */ + @JsonProperty(value = "techniques") + private List techniques; + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.tactics; + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the AlertRuleTemplateWithMitreProperties object itself. + */ + public AlertRuleTemplateWithMitreProperties withTactics(List tactics) { + this.tactics = tactics; + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the AlertRuleTemplateWithMitreProperties object itself. + */ + public AlertRuleTemplateWithMitreProperties withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { + super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withRequiredDataConnectors( + List requiredDataConnectors) { + super.withRequiredDataConnectors(requiredDataConnectors); + return this; + } + + /** {@inheritDoc} */ + @Override + public AlertRuleTemplateWithMitreProperties withStatus(TemplateStatus status) { + super.withStatus(status); + 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/AlertRuleTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java index dd0bfea870dc1..6c1e23964aae5 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 @@ -18,7 +18,7 @@ public interface AlertRuleTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rule templates. + * @return all alert rule templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface AlertRuleTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rule templates. + * @return all alert rule templates 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/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java index 5759a8329e30b..4ce770f0de661 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 @@ -19,7 +19,7 @@ public interface AlertRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rules. + * @return all alert rules as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface AlertRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 alert rules. + * @return all alert rules 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/AttackTactic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java index 3c44b68e78f69..8b1d10dd7be94 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AttackTactic.java @@ -10,6 +10,12 @@ /** Defines values for AttackTactic. */ public final class AttackTactic extends ExpandableStringEnum { + /** Static value Reconnaissance for AttackTactic. */ + public static final AttackTactic RECONNAISSANCE = fromString("Reconnaissance"); + + /** Static value ResourceDevelopment for AttackTactic. */ + public static final AttackTactic RESOURCE_DEVELOPMENT = fromString("ResourceDevelopment"); + /** Static value InitialAccess for AttackTactic. */ public static final AttackTactic INITIAL_ACCESS = fromString("InitialAccess"); @@ -49,6 +55,12 @@ public final class AttackTactic extends ExpandableStringEnum { /** Static value PreAttack for AttackTactic. */ public static final AttackTactic PRE_ATTACK = fromString("PreAttack"); + /** Static value ImpairProcessControl for AttackTactic. */ + public static final AttackTactic IMPAIR_PROCESS_CONTROL = fromString("ImpairProcessControl"); + + /** Static value InhibitResponseFunction for AttackTactic. */ + public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); + /** * 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/AutomationRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java index b4c4a35c77123..a796b4e57a04c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRule.java @@ -62,7 +62,7 @@ public interface AutomationRule { int order(); /** - * Gets the triggeringLogic property: The triggering logic of the automation rule. + * Gets the triggeringLogic property: Describes automation rule triggering logic. * * @return the triggeringLogic value. */ @@ -75,13 +75,6 @@ public interface AutomationRule { */ List actions(); - /** - * Gets the createdTimeUtc property: The time the automation rule was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - /** * Gets the lastModifiedTimeUtc property: The last time the automation rule was updated. * @@ -90,19 +83,26 @@ public interface AutomationRule { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the createdBy property: Describes the client that created the automation rule. + * Gets the createdTimeUtc property: The time the automation rule was created. * - * @return the createdBy value. + * @return the createdTimeUtc value. */ - ClientInfo createdBy(); + OffsetDateTime createdTimeUtc(); /** - * Gets the lastModifiedBy property: Describes the client that last updated the automation rule. + * Gets the lastModifiedBy property: Information on the client (user or application) that made some action. * * @return the lastModifiedBy value. */ ClientInfo lastModifiedBy(); + /** + * Gets the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + ClientInfo createdBy(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.AutomationRuleInner object. * @@ -112,7 +112,13 @@ public interface AutomationRule { /** The entirety of the AutomationRule definition. */ interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithDisplayName, + DefinitionStages.WithOrder, + DefinitionStages.WithTriggeringLogic, + DefinitionStages.WithActions, + DefinitionStages.WithCreate { } /** The AutomationRule definition stages. */ interface DefinitionStages { @@ -128,42 +134,7 @@ interface WithParentResource { * @param workspaceName The name of the workspace. * @return the next definition stage. */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the AutomationRule 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.WithDisplayName, - DefinitionStages.WithOrder, - DefinitionStages.WithTriggeringLogic, - DefinitionStages.WithActions { - /** - * Executes the create request. - * - * @return the created resource. - */ - AutomationRule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AutomationRule create(Context context); - } - /** The stage of the AutomationRule 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); + WithDisplayName withExistingWorkspace(String resourceGroupName, String workspaceName); } /** The stage of the AutomationRule definition allowing to specify displayName. */ interface WithDisplayName { @@ -173,7 +144,7 @@ interface WithDisplayName { * @param displayName The display name of the automation rule. * @return the next definition stage. */ - WithCreate withDisplayName(String displayName); + WithOrder withDisplayName(String displayName); } /** The stage of the AutomationRule definition allowing to specify order. */ interface WithOrder { @@ -183,17 +154,17 @@ interface WithOrder { * @param order The order of execution of the automation rule. * @return the next definition stage. */ - WithCreate withOrder(int order); + WithTriggeringLogic withOrder(int order); } /** The stage of the AutomationRule definition allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: The triggering logic of the automation rule. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * - * @param triggeringLogic The triggering logic of the automation rule. + * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. */ - WithCreate withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); + WithActions withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); } /** The stage of the AutomationRule definition allowing to specify actions. */ interface WithActions { @@ -205,6 +176,36 @@ interface WithActions { */ WithCreate withActions(List actions); } + /** + * The stage of the AutomationRule 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + AutomationRule create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AutomationRule create(Context context); + } + /** The stage of the AutomationRule 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); + } } /** * Begins update for the AutomationRule resource. @@ -270,9 +271,9 @@ interface WithOrder { /** The stage of the AutomationRule update allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: The triggering logic of the automation rule. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * - * @param triggeringLogic The triggering logic of the automation rule. + * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. */ Update withTriggeringLogic(AutomationRuleTriggeringLogic triggeringLogic); 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 aa2f770d00b3e..4bf21c431b4ac 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 @@ -20,21 +20,21 @@ defaultImpl = AutomationRuleAction.class) @JsonTypeName("AutomationRuleAction") @JsonSubTypes({ - @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class), - @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class) + @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class), + @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class) }) @Fluent public class AutomationRuleAction { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleAction.class); /* - * The order of execution of the automation rule action + * The order property. */ @JsonProperty(value = "order", required = true) private int order; /** - * Get the order property: The order of execution of the automation rule action. + * Get the order property: The order property. * * @return the order value. */ @@ -43,7 +43,7 @@ public int order() { } /** - * Set the order property: The order of execution of the automation rule action. + * Set the order property: The order property. * * @param order the order value to set. * @return the AutomationRuleAction object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java deleted file mode 100644 index 547b7c53a00b5..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleActionType.java +++ /dev/null @@ -1,34 +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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AutomationRuleActionType. */ -public final class AutomationRuleActionType extends ExpandableStringEnum { - /** Static value ModifyProperties for AutomationRuleActionType. */ - public static final AutomationRuleActionType MODIFY_PROPERTIES = fromString("ModifyProperties"); - - /** Static value RunPlaybook for AutomationRuleActionType. */ - public static final AutomationRuleActionType RUN_PLAYBOOK = fromString("RunPlaybook"); - - /** - * Creates or finds a AutomationRuleActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleActionType. - */ - @JsonCreator - public static AutomationRuleActionType fromString(String name) { - return fromString(name, AutomationRuleActionType.class); - } - - /** @return known AutomationRuleActionType values. */ - public static Collection values() { - return values(AutomationRuleActionType.class); - } -} 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 ed9426bdab97c..a780e8387f7da 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 @@ -18,7 +18,7 @@ property = "conditionType", defaultImpl = AutomationRuleCondition.class) @JsonTypeName("AutomationRuleCondition") -@JsonSubTypes({@JsonSubTypes.Type(name = "Property", value = AutomationRulePropertyValuesCondition.class)}) +@JsonSubTypes({@JsonSubTypes.Type(name = "Property", value = PropertyConditionProperties.class)}) @Immutable public class AutomationRuleCondition { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleCondition.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java deleted file mode 100644 index 4d7c437eafed1..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleConditionType.java +++ /dev/null @@ -1,31 +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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AutomationRuleConditionType. */ -public final class AutomationRuleConditionType extends ExpandableStringEnum { - /** Static value Property for AutomationRuleConditionType. */ - public static final AutomationRuleConditionType PROPERTY = fromString("Property"); - - /** - * Creates or finds a AutomationRuleConditionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleConditionType. - */ - @JsonCreator - public static AutomationRuleConditionType fromString(String name) { - return fromString(name, AutomationRuleConditionType.class); - } - - /** @return known AutomationRuleConditionType values. */ - public static Collection values() { - return values(AutomationRuleConditionType.class); - } -} 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 1560e1ebf27fb..ddc817919e604 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 @@ -19,28 +19,27 @@ public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAc @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleModifyPropertiesAction.class); /* - * The configuration of the modify properties automation rule action + * The actionConfiguration property. */ - @JsonProperty(value = "actionConfiguration", required = true) - private AutomationRuleModifyPropertiesActionConfiguration actionConfiguration; + @JsonProperty(value = "actionConfiguration") + private IncidentPropertiesAction actionConfiguration; /** - * Get the actionConfiguration property: The configuration of the modify properties automation rule action. + * Get the actionConfiguration property: The actionConfiguration property. * * @return the actionConfiguration value. */ - public AutomationRuleModifyPropertiesActionConfiguration actionConfiguration() { + public IncidentPropertiesAction actionConfiguration() { return this.actionConfiguration; } /** - * Set the actionConfiguration property: The configuration of the modify properties automation rule action. + * Set the actionConfiguration property: The actionConfiguration property. * * @param actionConfiguration the actionConfiguration value to set. * @return the AutomationRuleModifyPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesAction withActionConfiguration( - AutomationRuleModifyPropertiesActionConfiguration actionConfiguration) { + public AutomationRuleModifyPropertiesAction withActionConfiguration(IncidentPropertiesAction actionConfiguration) { this.actionConfiguration = actionConfiguration; return this; } @@ -60,12 +59,7 @@ public AutomationRuleModifyPropertiesAction withOrder(int order) { @Override public void validate() { super.validate(); - if (actionConfiguration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property actionConfiguration in model AutomationRuleModifyPropertiesAction")); - } else { + if (actionConfiguration() != null) { actionConfiguration().validate(); } } 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 0b7ef101a6e7f..55dc7f5cf6e53 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 @@ -25,13 +25,16 @@ public final class AutomationRulePropertyConditionSupportedProperty /** Static value IncidentStatus for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_STATUS = fromString("IncidentStatus"); + /** Static value IncidentRelatedAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_RELATED_ANALYTIC_RULE_IDS = + fromString("IncidentRelatedAnalyticRuleIds"); + /** Static value IncidentTactics for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_TACTICS = fromString("IncidentTactics"); - /** Static value IncidentRelatedAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_RELATED_ANALYTIC_RULE_IDS = - fromString("IncidentRelatedAnalyticRuleIds"); + /** Static value IncidentLabel for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_LABEL = fromString("IncidentLabel"); /** Static value IncidentProviderName for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_PROVIDER_NAME = @@ -66,6 +69,10 @@ public final class AutomationRulePropertyConditionSupportedProperty public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_UPNSUFFIX = fromString("AccountUPNSuffix"); + /** Static value AlertProductNames for AutomationRulePropertyConditionSupportedProperty. */ + public static final AutomationRulePropertyConditionSupportedProperty ALERT_PRODUCT_NAMES = + fromString("AlertProductNames"); + /** Static value AzureResourceResourceId for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty AZURE_RESOURCE_RESOURCE_ID = fromString("AzureResourceResourceId"); 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 008987e3f74d6..c745e5c372d16 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 @@ -8,40 +8,90 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** Describes an automation rule condition that evaluates a property's value. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("Property") +/** The AutomationRulePropertyValuesCondition model. */ @Fluent -public final class AutomationRulePropertyValuesCondition extends AutomationRuleCondition { +public final class AutomationRulePropertyValuesCondition { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRulePropertyValuesCondition.class); /* - * The configuration of the automation rule condition + * The property to evaluate in an automation rule property condition */ - @JsonProperty(value = "conditionProperties", required = true) - private AutomationRulePropertyValuesConditionProperties conditionProperties; + @JsonProperty(value = "propertyName") + private AutomationRulePropertyConditionSupportedProperty propertyName; + + /* + * The operator property. + */ + @JsonProperty(value = "operator") + private AutomationRulePropertyConditionSupportedOperator operator; + + /* + * The propertyValues property. + */ + @JsonProperty(value = "propertyValues") + private List propertyValues; + + /** + * Get the propertyName property: The property to evaluate in an automation rule property condition. + * + * @return the propertyName value. + */ + public AutomationRulePropertyConditionSupportedProperty propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The property to evaluate in an automation rule property condition. + * + * @param propertyName the propertyName value to set. + * @return the AutomationRulePropertyValuesCondition object itself. + */ + public AutomationRulePropertyValuesCondition withPropertyName( + AutomationRulePropertyConditionSupportedProperty propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the operator property: The operator property. + * + * @return the operator value. + */ + public AutomationRulePropertyConditionSupportedOperator operator() { + return this.operator; + } + + /** + * Set the operator property: The operator property. + * + * @param operator the operator value to set. + * @return the AutomationRulePropertyValuesCondition object itself. + */ + public AutomationRulePropertyValuesCondition withOperator( + AutomationRulePropertyConditionSupportedOperator operator) { + this.operator = operator; + return this; + } /** - * Get the conditionProperties property: The configuration of the automation rule condition. + * Get the propertyValues property: The propertyValues property. * - * @return the conditionProperties value. + * @return the propertyValues value. */ - public AutomationRulePropertyValuesConditionProperties conditionProperties() { - return this.conditionProperties; + public List propertyValues() { + return this.propertyValues; } /** - * Set the conditionProperties property: The configuration of the automation rule condition. + * Set the propertyValues property: The propertyValues property. * - * @param conditionProperties the conditionProperties value to set. + * @param propertyValues the propertyValues value to set. * @return the AutomationRulePropertyValuesCondition object itself. */ - public AutomationRulePropertyValuesCondition withConditionProperties( - AutomationRulePropertyValuesConditionProperties conditionProperties) { - this.conditionProperties = conditionProperties; + public AutomationRulePropertyValuesCondition withPropertyValues(List propertyValues) { + this.propertyValues = propertyValues; return this; } @@ -50,17 +100,6 @@ public AutomationRulePropertyValuesCondition withConditionProperties( * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); - if (conditionProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property conditionProperties in model" - + " AutomationRulePropertyValuesCondition")); - } else { - conditionProperties().validate(); - } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java deleted file mode 100644 index b6875a560ebbd..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesConditionProperties.java +++ /dev/null @@ -1,106 +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.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The configuration of the automation rule condition. */ -@Fluent -public final class AutomationRulePropertyValuesConditionProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutomationRulePropertyValuesConditionProperties.class); - - /* - * The property to evaluate - */ - @JsonProperty(value = "propertyName") - private AutomationRulePropertyConditionSupportedProperty propertyName; - - /* - * The operator to use for evaluation the condition - */ - @JsonProperty(value = "operator") - private AutomationRulePropertyConditionSupportedOperator operator; - - /* - * The values to use for evaluating the condition - */ - @JsonProperty(value = "propertyValues") - private List propertyValues; - - /** - * Get the propertyName property: The property to evaluate. - * - * @return the propertyName value. - */ - public AutomationRulePropertyConditionSupportedProperty propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The property to evaluate. - * - * @param propertyName the propertyName value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withPropertyName( - AutomationRulePropertyConditionSupportedProperty propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the operator property: The operator to use for evaluation the condition. - * - * @return the operator value. - */ - public AutomationRulePropertyConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator to use for evaluation the condition. - * - * @param operator the operator value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withOperator( - AutomationRulePropertyConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the propertyValues property: The values to use for evaluating the condition. - * - * @return the propertyValues value. - */ - public List propertyValues() { - return this.propertyValues; - } - - /** - * Set the propertyValues property: The values to use for evaluating the condition. - * - * @param propertyValues the propertyValues value to set. - * @return the AutomationRulePropertyValuesConditionProperties object itself. - */ - public AutomationRulePropertyValuesConditionProperties withPropertyValues(List propertyValues) { - this.propertyValues = propertyValues; - 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/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index c9601a8f96938..2c45971f1f55a 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 @@ -19,28 +19,27 @@ public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleRunPlaybookAction.class); /* - * The configuration of the run playbook automation rule action + * The actionConfiguration property. */ - @JsonProperty(value = "actionConfiguration", required = true) - private AutomationRuleRunPlaybookActionConfiguration actionConfiguration; + @JsonProperty(value = "actionConfiguration") + private PlaybookActionProperties actionConfiguration; /** - * Get the actionConfiguration property: The configuration of the run playbook automation rule action. + * Get the actionConfiguration property: The actionConfiguration property. * * @return the actionConfiguration value. */ - public AutomationRuleRunPlaybookActionConfiguration actionConfiguration() { + public PlaybookActionProperties actionConfiguration() { return this.actionConfiguration; } /** - * Set the actionConfiguration property: The configuration of the run playbook automation rule action. + * Set the actionConfiguration property: The actionConfiguration property. * * @param actionConfiguration the actionConfiguration value to set. * @return the AutomationRuleRunPlaybookAction object itself. */ - public AutomationRuleRunPlaybookAction withActionConfiguration( - AutomationRuleRunPlaybookActionConfiguration actionConfiguration) { + public AutomationRuleRunPlaybookAction withActionConfiguration(PlaybookActionProperties actionConfiguration) { this.actionConfiguration = actionConfiguration; return this; } @@ -60,12 +59,7 @@ public AutomationRuleRunPlaybookAction withOrder(int order) { @Override public void validate() { super.validate(); - if (actionConfiguration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property actionConfiguration in model AutomationRuleRunPlaybookAction")); - } else { + if (actionConfiguration() != null) { actionConfiguration().validate(); } } 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 94162fd712ac5..738f5872d240b 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 @@ -17,7 +17,7 @@ public final class AutomationRuleTriggeringLogic { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRuleTriggeringLogic.class); /* - * Determines whether the automation rule is enabled or disabled. + * Determines whether the automation rule is enabled or disabled */ @JsonProperty(value = "isEnabled", required = true) private boolean isEnabled; @@ -30,13 +30,13 @@ public final class AutomationRuleTriggeringLogic { private OffsetDateTime expirationTimeUtc; /* - * The type of object the automation rule triggers on + * The triggersOn property. */ @JsonProperty(value = "triggersOn", required = true) private TriggersOn triggersOn; /* - * The type of event the automation rule triggers on + * The triggersWhen property. */ @JsonProperty(value = "triggersWhen", required = true) private TriggersWhen triggersWhen; @@ -91,7 +91,7 @@ public AutomationRuleTriggeringLogic withExpirationTimeUtc(OffsetDateTime expira } /** - * Get the triggersOn property: The type of object the automation rule triggers on. + * Get the triggersOn property: The triggersOn property. * * @return the triggersOn value. */ @@ -100,7 +100,7 @@ public TriggersOn triggersOn() { } /** - * Set the triggersOn property: The type of object the automation rule triggers on. + * Set the triggersOn property: The triggersOn property. * * @param triggersOn the triggersOn value to set. * @return the AutomationRuleTriggeringLogic object itself. @@ -111,7 +111,7 @@ public AutomationRuleTriggeringLogic withTriggersOn(TriggersOn triggersOn) { } /** - * Get the triggersWhen property: The type of event the automation rule triggers on. + * Get the triggersWhen property: The triggersWhen property. * * @return the triggersWhen value. */ @@ -120,7 +120,7 @@ public TriggersWhen triggersWhen() { } /** - * Set the triggersWhen property: The type of event the automation rule triggers on. + * Set the triggersWhen property: The triggersWhen property. * * @param triggersWhen the triggersWhen value to set. * @return the AutomationRuleTriggeringLogic object itself. 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 43b638ece23d6..157bf09eeafd3 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 @@ -11,32 +11,35 @@ /** Resource collection API of AutomationRules. */ public interface AutomationRules { /** - * Gets all automation rules. + * 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 all automation rules. + * @return the automation rule. */ - PagedIterable list(String resourceGroupName, String workspaceName); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** - * Gets all automation rules. + * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 automation rules. + * @return the automation rule along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Gets the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -44,12 +47,12 @@ public interface AutomationRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 any object. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** - * Gets the automation rule. + * Delete the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -58,37 +61,35 @@ public interface AutomationRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 any object along with {@link Response}. */ - Response getWithResponse( + Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Delete the automation rule. + * Gets all automation rules. * * @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 all automation rules as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String automationRuleId); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Delete the automation rule. + * Gets all automation rules. * * @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 {@link Response}. + * @return all automation rules as paginated response with {@link PagedIterable}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Gets the automation rule. @@ -120,8 +121,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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}. */ - void deleteById(String id); + Object deleteById(String id); /** * Delete the automation rule. @@ -131,9 +133,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return any object along with {@link Response}. */ - Response deleteByIdWithResponse(String id, Context context); + Response deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new AutomationRule resource. 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 6baa6f31448a8..70b6f17d97608 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 @@ -11,34 +11,25 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List all the automation rules. */ +/** The AutomationRulesList model. */ @Fluent public final class AutomationRulesList { @JsonIgnore private final ClientLogger logger = new ClientLogger(AutomationRulesList.class); /* - * URL to fetch the next set of automation rules. + * The value property. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of automation rules. - */ - @JsonProperty(value = "value", required = true) + @JsonProperty(value = "value") private List value; - /** - * Get the nextLink property: URL to fetch the next set of automation rules. - * - * @return the nextLink value. + /* + * The nextLink property. */ - public String nextLink() { - return this.nextLink; - } + @JsonProperty(value = "nextLink") + private String nextLink; /** - * Get the value property: Array of automation rules. + * Get the value property: The value property. * * @return the value value. */ @@ -47,7 +38,7 @@ public List value() { } /** - * Set the value property: Array of automation rules. + * Set the value property: The value property. * * @param value the value value to set. * @return the AutomationRulesList object itself. @@ -57,17 +48,33 @@ public AutomationRulesList withValue(List 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 AutomationRulesList object itself. + */ + public AutomationRulesList 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) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AutomationRulesList")); - } else { + if (value() != null) { value().forEach(e -> e.validate()); } } 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 new file mode 100644 index 0000000000000..08f3bb8930171 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in Azure DevOps repository. */ +@Fluent +public final class AzureDevOpsResourceInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureDevOpsResourceInfo.class); + + /* + * Id of the pipeline created for the source-control. + */ + @JsonProperty(value = "pipelineId") + private String pipelineId; + + /* + * Id of the service-connection created for the source-control. + */ + @JsonProperty(value = "serviceConnectionId") + private String serviceConnectionId; + + /** + * Get the pipelineId property: Id of the pipeline created for the source-control. + * + * @return the pipelineId value. + */ + public String pipelineId() { + return this.pipelineId; + } + + /** + * Set the pipelineId property: Id of the pipeline created for the source-control. + * + * @param pipelineId the pipelineId value to set. + * @return the AzureDevOpsResourceInfo object itself. + */ + public AzureDevOpsResourceInfo withPipelineId(String pipelineId) { + this.pipelineId = pipelineId; + return this; + } + + /** + * Get the serviceConnectionId property: Id of the service-connection created for the source-control. + * + * @return the serviceConnectionId value. + */ + public String serviceConnectionId() { + return this.serviceConnectionId; + } + + /** + * Set the serviceConnectionId property: Id of the service-connection created for the source-control. + * + * @param serviceConnectionId the serviceConnectionId value to set. + * @return the AzureDevOpsResourceInfo object itself. + */ + public AzureDevOpsResourceInfo withServiceConnectionId(String serviceConnectionId) { + this.serviceConnectionId = serviceConnectionId; + 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/Bookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java index a007b44cfe367..a9e30a649b269 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java @@ -138,6 +138,27 @@ public interface Bookmark { */ IncidentInfo incidentInfo(); + /** + * Gets the entityMappings property: Describes the entity mappings of the bookmark. + * + * @return the entityMappings value. + */ + List entityMappings(); + + /** + * Gets the tactics property: A list of relevant mitre attacks. + * + * @return the tactics value. + */ + List tactics(); + + /** + * Gets the techniques property: A list of relevant mitre techniques. + * + * @return the techniques value. + */ + List techniques(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.BookmarkInner object. * @@ -183,7 +204,10 @@ interface WithCreate DefinitionStages.WithEventTime, DefinitionStages.WithQueryStartTime, DefinitionStages.WithQueryEndTime, - DefinitionStages.WithIncidentInfo { + DefinitionStages.WithIncidentInfo, + DefinitionStages.WithEntityMappings, + DefinitionStages.WithTactics, + DefinitionStages.WithTechniques { /** * Executes the create request. * @@ -339,6 +363,36 @@ interface WithIncidentInfo { */ WithCreate withIncidentInfo(IncidentInfo incidentInfo); } + /** The stage of the Bookmark definition allowing to specify entityMappings. */ + interface WithEntityMappings { + /** + * Specifies the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings Describes the entity mappings of the bookmark. + * @return the next definition stage. + */ + WithCreate withEntityMappings(List entityMappings); + } + /** The stage of the Bookmark definition allowing to specify tactics. */ + interface WithTactics { + /** + * Specifies the tactics property: A list of relevant mitre attacks. + * + * @param tactics A list of relevant mitre attacks. + * @return the next definition stage. + */ + WithCreate withTactics(List tactics); + } + /** The stage of the Bookmark definition allowing to specify techniques. */ + interface WithTechniques { + /** + * Specifies the techniques property: A list of relevant mitre techniques. + * + * @param techniques A list of relevant mitre techniques. + * @return the next definition stage. + */ + WithCreate withTechniques(List techniques); + } } /** * Begins update for the Bookmark resource. @@ -362,7 +416,10 @@ interface Update UpdateStages.WithEventTime, UpdateStages.WithQueryStartTime, UpdateStages.WithQueryEndTime, - UpdateStages.WithIncidentInfo { + UpdateStages.WithIncidentInfo, + UpdateStages.WithEntityMappings, + UpdateStages.WithTactics, + UpdateStages.WithTechniques { /** * Executes the update request. * @@ -520,6 +577,36 @@ interface WithIncidentInfo { */ Update withIncidentInfo(IncidentInfo incidentInfo); } + /** The stage of the Bookmark update allowing to specify entityMappings. */ + interface WithEntityMappings { + /** + * Specifies the entityMappings property: Describes the entity mappings of the bookmark. + * + * @param entityMappings Describes the entity mappings of the bookmark. + * @return the next definition stage. + */ + Update withEntityMappings(List entityMappings); + } + /** The stage of the Bookmark update allowing to specify tactics. */ + interface WithTactics { + /** + * Specifies the tactics property: A list of relevant mitre attacks. + * + * @param tactics A list of relevant mitre attacks. + * @return the next definition stage. + */ + Update withTactics(List tactics); + } + /** The stage of the Bookmark update allowing to specify techniques. */ + interface WithTechniques { + /** + * Specifies the techniques property: A list of relevant mitre techniques. + * + * @param techniques A list of relevant mitre techniques. + * @return the next definition stage. + */ + Update withTechniques(List techniques); + } } /** * Refreshes the resource to sync with Azure. 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 new file mode 100644 index 0000000000000..2f708ee666932 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java @@ -0,0 +1,80 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Describes the entity mappings of a single entity. */ +@Fluent +public final class BookmarkEntityMappings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkEntityMappings.class); + + /* + * The entity type + */ + @JsonProperty(value = "entityType") + private String entityType; + + /* + * Array of fields mapping for that entity type + */ + @JsonProperty(value = "fieldMappings") + private List fieldMappings; + + /** + * Get the entityType property: The entity type. + * + * @return the entityType value. + */ + public String entityType() { + return this.entityType; + } + + /** + * Set the entityType property: The entity type. + * + * @param entityType the entityType value to set. + * @return the BookmarkEntityMappings object itself. + */ + public BookmarkEntityMappings withEntityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get the fieldMappings property: Array of fields mapping for that entity type. + * + * @return the fieldMappings value. + */ + public List fieldMappings() { + return this.fieldMappings; + } + + /** + * Set the fieldMappings property: Array of fields mapping for that entity type. + * + * @param fieldMappings the fieldMappings value to set. + * @return the BookmarkEntityMappings object itself. + */ + public BookmarkEntityMappings withFieldMappings(List fieldMappings) { + this.fieldMappings = fieldMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fieldMappings() != null) { + fieldMappings().forEach(e -> e.validate()); + } + } +} 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 1c935bdd4dccb..dff135096b259 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 @@ -17,7 +17,7 @@ public final class BookmarkList { @JsonIgnore private final ClientLogger logger = new ClientLogger(BookmarkList.class); /* - * URL to fetch the next set of cases. + * URL to fetch the next set of bookmarks. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; @@ -29,7 +29,7 @@ public final class BookmarkList { private List value; /** - * Get the nextLink property: URL to fetch the next set of cases. + * Get the nextLink property: URL to fetch the next set of bookmarks. * * @return the nextLink value. */ 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 9ffbdd90c658e..e1db491640d0e 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 @@ -19,7 +19,7 @@ public interface BookmarkRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); @@ -39,7 +39,7 @@ public interface BookmarkRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmark relations. + * @return all bookmark relations as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 50d94e95df2b9..3b3706f36fd81 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 @@ -18,7 +18,7 @@ public interface Bookmarks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmarks. + * @return all bookmarks as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface Bookmarks { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 bookmarks. + * @return all bookmarks 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/ConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java new file mode 100644 index 0000000000000..3b52ea2c69ddd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ConditionType. */ +public final class ConditionType extends ExpandableStringEnum { + /** Static value Property for ConditionType. */ + public static final ConditionType PROPERTY = fromString("Property"); + + /** + * Creates or finds a ConditionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConditionType. + */ + @JsonCreator + public static ConditionType fromString(String name) { + return fromString(name, ConditionType.class); + } + + /** @return known ConditionType values. */ + public static Collection values() { + return values(ConditionType.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java similarity index 64% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java index 11021b609e3f8..e92b0ae62ec03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant69.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant73.java @@ -7,28 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for Constant69. */ -public enum Constant69 { +/** Defines values for Constant73. */ +public enum Constant73 { /** Enum value Activity. */ ACTIVITY("Activity"); - /** The actual serialized value for a Constant69 instance. */ + /** The actual serialized value for a Constant73 instance. */ private final String value; - Constant69(String value) { + Constant73(String value) { this.value = value; } /** - * Parses a serialized value to a Constant69 instance. + * Parses a serialized value to a Constant73 instance. * * @param value the serialized value to parse. - * @return the parsed Constant69 object, or null if unable to parse. + * @return the parsed Constant73 object, or null if unable to parse. */ @JsonCreator - public static Constant69 fromString(String value) { - Constant69[] items = Constant69.values(); - for (Constant69 item : items) { + public static Constant73 fromString(String value) { + Constant73[] items = Constant73.values(); + for (Constant73 item : items) { if (item.toString().equalsIgnoreCase(value)) { return item; } 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 fc0fac4fb2e05..52d976920e48f 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 @@ -34,6 +34,12 @@ public final class DataConnectorKind extends ExpandableStringEnum list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface DataConnectors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 data connectors. + * @return all data connectors 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/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java index 781543f164852..dc99237fe980d 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 @@ -31,8 +31,11 @@ @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmCheckRequirements.class), + @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectCheckRequirements.class), + @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBICheckRequirements.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TICheckRequirements.class), - @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiCheckRequirements.class) + @JsonSubTypes.Type(name = "ThreatIntelligenceTaxii", value = TiTaxiiCheckRequirements.class), + @JsonSubTypes.Type(name = "IOT", value = IoTCheckRequirements.class) }) @Immutable public class DataConnectorsCheckRequirements { 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 new file mode 100644 index 0000000000000..64c4979adb7ac --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.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.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Description about a deployment. */ +@Fluent +public final class Deployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Deployment.class); + + /* + * Deployment identifier. + */ + @JsonProperty(value = "deploymentId") + private String deploymentId; + + /* + * Current status of the deployment. + */ + @JsonProperty(value = "deploymentState") + private DeploymentState deploymentState; + + /* + * The outcome of the deployment. + */ + @JsonProperty(value = "deploymentResult") + private DeploymentResult deploymentResult; + + /* + * The time when the deployment finished. + */ + @JsonProperty(value = "deploymentTime") + private OffsetDateTime deploymentTime; + + /* + * Url to access repository action logs. + */ + @JsonProperty(value = "deploymentLogsUrl") + private String deploymentLogsUrl; + + /** + * Get the deploymentId property: Deployment identifier. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Set the deploymentId property: Deployment identifier. + * + * @param deploymentId the deploymentId value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; + return this; + } + + /** + * Get the deploymentState property: Current status of the deployment. + * + * @return the deploymentState value. + */ + public DeploymentState deploymentState() { + return this.deploymentState; + } + + /** + * Set the deploymentState property: Current status of the deployment. + * + * @param deploymentState the deploymentState value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentState(DeploymentState deploymentState) { + this.deploymentState = deploymentState; + return this; + } + + /** + * Get the deploymentResult property: The outcome of the deployment. + * + * @return the deploymentResult value. + */ + public DeploymentResult deploymentResult() { + return this.deploymentResult; + } + + /** + * Set the deploymentResult property: The outcome of the deployment. + * + * @param deploymentResult the deploymentResult value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentResult(DeploymentResult deploymentResult) { + this.deploymentResult = deploymentResult; + return this; + } + + /** + * Get the deploymentTime property: The time when the deployment finished. + * + * @return the deploymentTime value. + */ + public OffsetDateTime deploymentTime() { + return this.deploymentTime; + } + + /** + * Set the deploymentTime property: The time when the deployment finished. + * + * @param deploymentTime the deploymentTime value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentTime(OffsetDateTime deploymentTime) { + this.deploymentTime = deploymentTime; + return this; + } + + /** + * Get the deploymentLogsUrl property: Url to access repository action logs. + * + * @return the deploymentLogsUrl value. + */ + public String deploymentLogsUrl() { + return this.deploymentLogsUrl; + } + + /** + * Set the deploymentLogsUrl property: Url to access repository action logs. + * + * @param deploymentLogsUrl the deploymentLogsUrl value to set. + * @return the Deployment object itself. + */ + public Deployment withDeploymentLogsUrl(String deploymentLogsUrl) { + this.deploymentLogsUrl = deploymentLogsUrl; + 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/DeploymentFetchStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java new file mode 100644 index 0000000000000..e88a29f0d670e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java @@ -0,0 +1,37 @@ +// 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 DeploymentFetchStatus. */ +public final class DeploymentFetchStatus extends ExpandableStringEnum { + /** Static value Success for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus SUCCESS = fromString("Success"); + + /** Static value Unauthorized for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus UNAUTHORIZED = fromString("Unauthorized"); + + /** Static value NotFound for DeploymentFetchStatus. */ + public static final DeploymentFetchStatus NOT_FOUND = fromString("NotFound"); + + /** + * Creates or finds a DeploymentFetchStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentFetchStatus. + */ + @JsonCreator + public static DeploymentFetchStatus fromString(String name) { + return fromString(name, DeploymentFetchStatus.class); + } + + /** @return known DeploymentFetchStatus values. */ + public static Collection values() { + return values(DeploymentFetchStatus.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java new file mode 100644 index 0000000000000..14acd5f7c364c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java @@ -0,0 +1,105 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information regarding a deployment. */ +@Fluent +public final class DeploymentInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentInfo.class); + + /* + * Status while fetching the last deployment. + */ + @JsonProperty(value = "deploymentFetchStatus") + private DeploymentFetchStatus deploymentFetchStatus; + + /* + * Deployment information. + */ + @JsonProperty(value = "deployment") + private Deployment deployment; + + /* + * Additional details about the deployment that can be shown to the user. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the deploymentFetchStatus property: Status while fetching the last deployment. + * + * @return the deploymentFetchStatus value. + */ + public DeploymentFetchStatus deploymentFetchStatus() { + return this.deploymentFetchStatus; + } + + /** + * Set the deploymentFetchStatus property: Status while fetching the last deployment. + * + * @param deploymentFetchStatus the deploymentFetchStatus value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withDeploymentFetchStatus(DeploymentFetchStatus deploymentFetchStatus) { + this.deploymentFetchStatus = deploymentFetchStatus; + return this; + } + + /** + * Get the deployment property: Deployment information. + * + * @return the deployment value. + */ + public Deployment deployment() { + return this.deployment; + } + + /** + * Set the deployment property: Deployment information. + * + * @param deployment the deployment value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withDeployment(Deployment deployment) { + this.deployment = deployment; + return this; + } + + /** + * Get the message property: Additional details about the deployment that can be shown to the user. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Additional details about the deployment that can be shown to the user. + * + * @param message the message value to set. + * @return the DeploymentInfo object itself. + */ + public DeploymentInfo withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deployment() != null) { + deployment().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java new file mode 100644 index 0000000000000..723ac5fda8275 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java @@ -0,0 +1,37 @@ +// 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 DeploymentResult. */ +public final class DeploymentResult extends ExpandableStringEnum { + /** Static value Success for DeploymentResult. */ + public static final DeploymentResult SUCCESS = fromString("Success"); + + /** Static value Canceled for DeploymentResult. */ + public static final DeploymentResult CANCELED = fromString("Canceled"); + + /** Static value Failed for DeploymentResult. */ + public static final DeploymentResult FAILED = fromString("Failed"); + + /** + * Creates or finds a DeploymentResult from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentResult. + */ + @JsonCreator + public static DeploymentResult fromString(String name) { + return fromString(name, DeploymentResult.class); + } + + /** @return known DeploymentResult values. */ + public static Collection values() { + return values(DeploymentResult.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java new file mode 100644 index 0000000000000..8298199aa2710 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeploymentState. */ +public final class DeploymentState extends ExpandableStringEnum { + /** Static value In_Progress for DeploymentState. */ + public static final DeploymentState IN_PROGRESS = fromString("In_Progress"); + + /** Static value Completed for DeploymentState. */ + public static final DeploymentState COMPLETED = fromString("Completed"); + + /** Static value Queued for DeploymentState. */ + public static final DeploymentState QUEUED = fromString("Queued"); + + /** Static value Canceling for DeploymentState. */ + public static final DeploymentState CANCELING = fromString("Canceling"); + + /** + * Creates or finds a DeploymentState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentState. + */ + @JsonCreator + public static DeploymentState fromString(String name) { + return fromString(name, DeploymentState.class); + } + + /** @return known DeploymentState values. */ + public static Collection values() { + return values(DeploymentState.class); + } +} 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 2030a199ee30b..182172f2a926e 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 @@ -18,7 +18,7 @@ public interface Entities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return all entities as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface Entities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. + * @return all entities 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/EntitiesRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java index 8cee4f709b9d1..aa1daf59c56e6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java @@ -18,7 +18,7 @@ public interface EntitiesRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String entityId); @@ -38,7 +38,7 @@ public interface EntitiesRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations of an entity. + * @return all relations of an entity as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 new file mode 100644 index 0000000000000..680954c21ecc4 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Map identifiers of a single entity. */ +@Fluent +public final class EntityFieldMapping { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EntityFieldMapping.class); + + /* + * Alert V3 identifier + */ + @JsonProperty(value = "identifier") + private String identifier; + + /* + * The value of the identifier + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the identifier property: Alert V3 identifier. + * + * @return the identifier value. + */ + public String identifier() { + return this.identifier; + } + + /** + * Set the identifier property: Alert V3 identifier. + * + * @param identifier the identifier value to set. + * @return the EntityFieldMapping object itself. + */ + public EntityFieldMapping withIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the value property: The value of the identifier. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the identifier. + * + * @param value the value value to set. + * @return the EntityFieldMapping object itself. + */ + public EntityFieldMapping 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/EntityQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java index 50d839a5b6eea..d0f22a8e74b05 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 @@ -18,7 +18,7 @@ public interface EntityQueries { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,7 +32,7 @@ public interface EntityQueries { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity queries. + * @return all entity queries as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); 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 76bb341cc9684..2d5356f7af94c 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 @@ -18,7 +18,7 @@ public interface EntityQueryTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -32,10 +32,10 @@ public interface EntityQueryTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 entity query templates. + * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, Constant69 kind, Context context); + String resourceGroupName, String workspaceName, Constant73 kind, Context context); /** * Gets an entity query. 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 fb5a2c11ea87a..198adf629250d 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 @@ -108,6 +108,53 @@ public FusionAlertRule withEnabled(Boolean enabled) { return this; } + /** + * Get the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); + } + + /** + * Set the sourceSettings property: Configuration for all supported source signals in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRule object itself. + */ + public FusionAlertRule withSourceSettings(List sourceSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleProperties(); + } + this.innerProperties().withSourceSettings(sourceSettings); + return this; + } + + /** + * Get the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @return the scenarioExclusionPatterns value. + */ + public List scenarioExclusionPatterns() { + return this.innerProperties() == null ? null : this.innerProperties().scenarioExclusionPatterns(); + } + + /** + * Set the scenarioExclusionPatterns property: Configuration to exclude scenarios in fusion detection. + * + * @param scenarioExclusionPatterns the scenarioExclusionPatterns value to set. + * @return the FusionAlertRule object itself. + */ + public FusionAlertRule withScenarioExclusionPatterns( + List scenarioExclusionPatterns) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleProperties(); + } + this.innerProperties().withScenarioExclusionPatterns(scenarioExclusionPatterns); + return this; + } + /** * Get the lastModifiedUtc property: The last time that this alert has been modified. * @@ -135,6 +182,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * 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 77ae4505b164f..0e9c953ffea2f 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 @@ -37,52 +37,6 @@ private FusionAlertRuleTemplateProperties innerProperties() { return this.innerProperties; } - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule template. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule template. - * - * @param tactics the tactics value to set. - * @return the FusionAlertRuleTemplate object itself. - */ - public FusionAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new FusionAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * @@ -107,21 +61,21 @@ public FusionAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer aler } /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the lastUpdatedDateUtc value. + * @return the createdDateUtc value. */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); + public OffsetDateTime createdDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); } /** - * Get the createdDateUtc property: The time that this alert rule template has been added. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @return the createdDateUtc value. + * @return the lastUpdatedDateUtc value. */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); + public OffsetDateTime lastUpdatedDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); } /** @@ -171,7 +125,7 @@ public FusionAlertRuleTemplate withDisplayName(String displayName) { } /** - * Get the requiredDataConnectors property: The required data sources for this template. + * Get the requiredDataConnectors property: The required data connectors for this template. * * @return the requiredDataConnectors value. */ @@ -180,7 +134,7 @@ public List requiredDataConnectors() { } /** - * Set the requiredDataConnectors property: The required data sources for this template. + * Set the requiredDataConnectors property: The required data connectors for this template. * * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the FusionAlertRuleTemplate object itself. @@ -217,6 +171,98 @@ public FusionAlertRuleTemplate withStatus(TemplateStatus status) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule template. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule template. + * + * @param tactics the tactics value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + + /** + * Get the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @return the sourceSettings value. + */ + public List sourceSettings() { + return this.innerProperties() == null ? null : this.innerProperties().sourceSettings(); + } + + /** + * Set the sourceSettings property: All supported source signal configurations consumed in fusion detection. + * + * @param sourceSettings the sourceSettings value to set. + * @return the FusionAlertRuleTemplate object itself. + */ + public FusionAlertRuleTemplate withSourceSettings(List sourceSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new FusionAlertRuleTemplateProperties(); + } + this.innerProperties().withSourceSettings(sourceSettings); + return this; + } + /** * Validates the instance. * 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 new file mode 100644 index 0000000000000..ec7e86ec07018 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java @@ -0,0 +1,88 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a Fusion scenario exclusion patterns in Fusion detection. */ +@Fluent +public final class FusionScenarioExclusionPattern { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionScenarioExclusionPattern.class); + + /* + * Scenario exclusion pattern. + */ + @JsonProperty(value = "exclusionPattern", required = true) + private String exclusionPattern; + + /* + * DateTime when scenario exclusion pattern is added in UTC. + */ + @JsonProperty(value = "dateAddedInUTC", required = true) + private String dateAddedInUtc; + + /** + * Get the exclusionPattern property: Scenario exclusion pattern. + * + * @return the exclusionPattern value. + */ + public String exclusionPattern() { + return this.exclusionPattern; + } + + /** + * Set the exclusionPattern property: Scenario exclusion pattern. + * + * @param exclusionPattern the exclusionPattern value to set. + * @return the FusionScenarioExclusionPattern object itself. + */ + public FusionScenarioExclusionPattern withExclusionPattern(String exclusionPattern) { + this.exclusionPattern = exclusionPattern; + return this; + } + + /** + * Get the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. + * + * @return the dateAddedInUtc value. + */ + public String dateAddedInUtc() { + return this.dateAddedInUtc; + } + + /** + * Set the dateAddedInUtc property: DateTime when scenario exclusion pattern is added in UTC. + * + * @param dateAddedInUtc the dateAddedInUtc value to set. + * @return the FusionScenarioExclusionPattern object itself. + */ + public FusionScenarioExclusionPattern withDateAddedInUtc(String dateAddedInUtc) { + this.dateAddedInUtc = dateAddedInUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exclusionPattern() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property exclusionPattern in model FusionScenarioExclusionPattern")); + } + if (dateAddedInUtc() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dateAddedInUtc in model FusionScenarioExclusionPattern")); + } + } +} 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 new file mode 100644 index 0000000000000..1ad060644fdca --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java @@ -0,0 +1,118 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents a supported source signal configuration in Fusion detection. */ +@Fluent +public final class FusionSourceSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionSourceSettings.class); + + /* + * Determines whether this source signal is enabled or disabled in Fusion + * detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * Name of the Fusion source signal. Refer to Fusion alert rule template + * for supported values. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /* + * Configuration for all source subtypes under this source signal consumed + * in fusion detection. + */ + @JsonProperty(value = "sourceSubTypes") + private List sourceSubTypes; + + /** + * Get the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported + * values. + * + * @return the sourceName value. + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set the sourceName property: Name of the Fusion source signal. Refer to Fusion alert rule template for supported + * values. + * + * @param sourceName the sourceName value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * Get the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in + * fusion detection. + * + * @return the sourceSubTypes value. + */ + public List sourceSubTypes() { + return this.sourceSubTypes; + } + + /** + * Set the sourceSubTypes property: Configuration for all source subtypes under this source signal consumed in + * fusion detection. + * + * @param sourceSubTypes the sourceSubTypes value to set. + * @return the FusionSourceSettings object itself. + */ + public FusionSourceSettings withSourceSubTypes(List sourceSubTypes) { + this.sourceSubTypes = sourceSubTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sourceName in model FusionSourceSettings")); + } + if (sourceSubTypes() != null) { + sourceSubTypes().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 0000000000000..a9552af0a8215 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java @@ -0,0 +1,140 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a supported source subtype configuration under a source signal in Fusion detection. */ +@Fluent +public final class FusionSourceSubTypeSetting { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionSourceSubTypeSetting.class); + + /* + * Determines whether this source subtype under source signal is enabled or + * disabled in Fusion detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /* + * The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + */ + @JsonProperty(value = "sourceSubTypeName", required = true) + private String sourceSubTypeName; + + /* + * The display name of source subtype under a source signal consumed in + * Fusion detection. + */ + @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSubTypeDisplayName; + + /* + * Severity configuration for a source subtype consumed in fusion + * detection. + */ + @JsonProperty(value = "severityFilters", required = true) + private FusionSubTypeSeverityFilter severityFilters; + + /** + * Get the enabled property: Determines whether this source subtype under source signal is enabled or disabled in + * Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this source subtype under source signal is enabled or disabled in + * Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + * + * @return the sourceSubTypeName value. + */ + public String sourceSubTypeName() { + return this.sourceSubTypeName; + } + + /** + * Set the sourceSubTypeName property: The Name of the source subtype under a given source signal in Fusion + * detection. Refer to Fusion alert rule template for supported values. + * + * @param sourceSubTypeName the sourceSubTypeName value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withSourceSubTypeName(String sourceSubTypeName) { + this.sourceSubTypeName = sourceSubTypeName; + return this; + } + + /** + * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in + * Fusion detection. + * + * @return the sourceSubTypeDisplayName value. + */ + public String sourceSubTypeDisplayName() { + return this.sourceSubTypeDisplayName; + } + + /** + * Get the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. + * + * @return the severityFilters value. + */ + public FusionSubTypeSeverityFilter severityFilters() { + return this.severityFilters; + } + + /** + * Set the severityFilters property: Severity configuration for a source subtype consumed in fusion detection. + * + * @param severityFilters the severityFilters value to set. + * @return the FusionSourceSubTypeSetting object itself. + */ + public FusionSourceSubTypeSetting withSeverityFilters(FusionSubTypeSeverityFilter severityFilters) { + this.severityFilters = severityFilters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceSubTypeName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceSubTypeName in model FusionSourceSubTypeSetting")); + } + if (severityFilters() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severityFilters in model FusionSourceSubTypeSetting")); + } else { + severityFilters().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..2de4a7e760c91 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java @@ -0,0 +1,73 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents severity configuration for a source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionSubTypeSeverityFilter { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionSubTypeSeverityFilter.class); + + /* + * Determines whether this source subtype supports severity configuration + * or not. + */ + @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isSupported; + + /* + * Individual Severity configuration settings for a given source subtype + * consumed in Fusion detection. + */ + @JsonProperty(value = "filters") + private List filters; + + /** + * Get the isSupported property: Determines whether this source subtype supports severity configuration or not. + * + * @return the isSupported value. + */ + public Boolean isSupported() { + return this.isSupported; + } + + /** + * Get the filters property: Individual Severity configuration settings for a given source subtype consumed in + * Fusion detection. + * + * @return the filters value. + */ + public List filters() { + return this.filters; + } + + /** + * Set the filters property: Individual Severity configuration settings for a given source subtype consumed in + * Fusion detection. + * + * @param filters the filters value to set. + * @return the FusionSubTypeSeverityFilter object itself. + */ + public FusionSubTypeSeverityFilter withFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filters() != null) { + filters().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 0000000000000..cd286f369c3fd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a Severity filter setting for a given source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionSubTypeSeverityFiltersItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionSubTypeSeverityFiltersItem.class); + + /* + * The Severity for a given source subtype consumed in Fusion detection. + */ + @JsonProperty(value = "severity", required = true) + private AlertSeverity severity; + + /* + * Determines whether this severity is enabled or disabled for this source + * subtype consumed in Fusion detection. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * Get the severity property: The Severity for a given source subtype consumed in Fusion detection. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The Severity for a given source subtype consumed in Fusion detection. + * + * @param severity the severity value to set. + * @return the FusionSubTypeSeverityFiltersItem object itself. + */ + public FusionSubTypeSeverityFiltersItem withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + + /** + * Get the enabled property: Determines whether this severity is enabled or disabled for this source subtype + * consumed in Fusion detection. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Determines whether this severity is enabled or disabled for this source subtype + * consumed in Fusion detection. + * + * @param enabled the enabled value to set. + * @return the FusionSubTypeSeverityFiltersItem object itself. + */ + public FusionSubTypeSeverityFiltersItem withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (severity() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severity in model FusionSubTypeSeverityFiltersItem")); + } + } +} 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 new file mode 100644 index 0000000000000..2ed6b90a7e693 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents a source signal consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSourceSetting { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionTemplateSourceSetting.class); + + /* + * The name of a source signal consumed in Fusion detection. + */ + @JsonProperty(value = "sourceName", required = true) + private String sourceName; + + /* + * All supported source subtypes under this source signal consumed in + * fusion detection. + */ + @JsonProperty(value = "sourceSubTypes") + private List sourceSubTypes; + + /** + * Get the sourceName property: The name of a source signal consumed in Fusion detection. + * + * @return the sourceName value. + */ + public String sourceName() { + return this.sourceName; + } + + /** + * Set the sourceName property: The name of a source signal consumed in Fusion detection. + * + * @param sourceName the sourceName value to set. + * @return the FusionTemplateSourceSetting object itself. + */ + public FusionTemplateSourceSetting withSourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * Get the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion + * detection. + * + * @return the sourceSubTypes value. + */ + public List sourceSubTypes() { + return this.sourceSubTypes; + } + + /** + * Set the sourceSubTypes property: All supported source subtypes under this source signal consumed in fusion + * detection. + * + * @param sourceSubTypes the sourceSubTypes value to set. + * @return the FusionTemplateSourceSetting object itself. + */ + public FusionTemplateSourceSetting withSourceSubTypes(List sourceSubTypes) { + this.sourceSubTypes = sourceSubTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceName in model FusionTemplateSourceSetting")); + } + if (sourceSubTypes() != null) { + sourceSubTypes().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 0000000000000..da06a439d0d8a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java @@ -0,0 +1,113 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Represents a source subtype under a source signal consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSourceSubType { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionTemplateSourceSubType.class); + + /* + * The name of source subtype under a source signal consumed in Fusion + * detection. + */ + @JsonProperty(value = "sourceSubTypeName", required = true) + private String sourceSubTypeName; + + /* + * The display name of source subtype under a source signal consumed in + * Fusion detection. + */ + @JsonProperty(value = "sourceSubTypeDisplayName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSubTypeDisplayName; + + /* + * Severity configuration available for a source subtype consumed in fusion + * detection. + */ + @JsonProperty(value = "severityFilter", required = true) + private FusionTemplateSubTypeSeverityFilter severityFilter; + + /** + * Get the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion + * detection. + * + * @return the sourceSubTypeName value. + */ + public String sourceSubTypeName() { + return this.sourceSubTypeName; + } + + /** + * Set the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion + * detection. + * + * @param sourceSubTypeName the sourceSubTypeName value to set. + * @return the FusionTemplateSourceSubType object itself. + */ + public FusionTemplateSourceSubType withSourceSubTypeName(String sourceSubTypeName) { + this.sourceSubTypeName = sourceSubTypeName; + return this; + } + + /** + * Get the sourceSubTypeDisplayName property: The display name of source subtype under a source signal consumed in + * Fusion detection. + * + * @return the sourceSubTypeDisplayName value. + */ + public String sourceSubTypeDisplayName() { + return this.sourceSubTypeDisplayName; + } + + /** + * Get the severityFilter property: Severity configuration available for a source subtype consumed in fusion + * detection. + * + * @return the severityFilter value. + */ + public FusionTemplateSubTypeSeverityFilter severityFilter() { + return this.severityFilter; + } + + /** + * Set the severityFilter property: Severity configuration available for a source subtype consumed in fusion + * detection. + * + * @param severityFilter the severityFilter value to set. + * @return the FusionTemplateSourceSubType object itself. + */ + public FusionTemplateSourceSubType withSeverityFilter(FusionTemplateSubTypeSeverityFilter severityFilter) { + this.severityFilter = severityFilter; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceSubTypeName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sourceSubTypeName in model FusionTemplateSourceSubType")); + } + if (severityFilter() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property severityFilter in model FusionTemplateSourceSubType")); + } else { + severityFilter().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..58da1a2c0b302 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents severity configurations available for a source subtype consumed in Fusion detection. */ +@Fluent +public final class FusionTemplateSubTypeSeverityFilter { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FusionTemplateSubTypeSeverityFilter.class); + + /* + * Determines whether severity configuration is supported for this source + * subtype consumed in Fusion detection. + */ + @JsonProperty(value = "isSupported", required = true) + private boolean isSupported; + + /* + * List of all supported severities for this source subtype consumed in + * Fusion detection. + */ + @JsonProperty(value = "severityFilters") + private List severityFilters; + + /** + * Get the isSupported property: Determines whether severity configuration is supported for this source subtype + * consumed in Fusion detection. + * + * @return the isSupported value. + */ + public boolean isSupported() { + return this.isSupported; + } + + /** + * Set the isSupported property: Determines whether severity configuration is supported for this source subtype + * consumed in Fusion detection. + * + * @param isSupported the isSupported value to set. + * @return the FusionTemplateSubTypeSeverityFilter object itself. + */ + public FusionTemplateSubTypeSeverityFilter withIsSupported(boolean isSupported) { + this.isSupported = isSupported; + return this; + } + + /** + * Get the severityFilters property: List of all supported severities for this source subtype consumed in Fusion + * detection. + * + * @return the severityFilters value. + */ + public List severityFilters() { + return this.severityFilters; + } + + /** + * Set the severityFilters property: List of all supported severities for this source subtype consumed in Fusion + * detection. + * + * @param severityFilters the severityFilters value to set. + * @return the FusionTemplateSubTypeSeverityFilter object itself. + */ + public FusionTemplateSubTypeSeverityFilter withSeverityFilters(List severityFilters) { + this.severityFilters = severityFilters; + 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/GitHubResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java new file mode 100644 index 0000000000000..76e6e11ccf146 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in GitHub repository. */ +@Fluent +public final class GitHubResourceInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHubResourceInfo.class); + + /* + * GitHub application installation id. + */ + @JsonProperty(value = "appInstallationId") + private String appInstallationId; + + /** + * Get the appInstallationId property: GitHub application installation id. + * + * @return the appInstallationId value. + */ + public String appInstallationId() { + return this.appInstallationId; + } + + /** + * Set the appInstallationId property: GitHub application installation id. + * + * @param appInstallationId the appInstallationId value to set. + * @return the GitHubResourceInfo object itself. + */ + public GitHubResourceInfo withAppInstallationId(String appInstallationId) { + this.appInstallationId = appInstallationId; + 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/IncidentAdditionalData.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java index 196d81f538bf4..7ed1b75ba2597 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 @@ -39,12 +39,25 @@ 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 */ @JsonProperty(value = "tactics", access = JsonProperty.Access.WRITE_ONLY) private List tactics; + /* + * The techniques associated with incident's tactics' + */ + @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) + private List techniques; + /** * Get the alertsCount property: The number of alerts in the incident. * @@ -81,6 +94,15 @@ 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. * @@ -90,6 +112,15 @@ public List tactics() { return this.tactics; } + /** + * Get the techniques property: The techniques associated with incident's tactics'. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + /** * 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 c1eeaeb4dc742..3e39bb7cd39ce 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 @@ -19,7 +19,7 @@ public interface IncidentComments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -39,7 +39,7 @@ public interface IncidentComments { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 comments. + * @return all incident comments as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 d1036f278737c..35ab5f63d0528 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 @@ -13,8 +13,8 @@ public final class IncidentLabelType extends ExpandableStringEnum labels; + @JsonProperty(value = "classificationComment") + private String classificationComment; /* - * Describes a user that the incident is assigned to + * Information on the user an incident is assigned to */ @JsonProperty(value = "owner") private IncidentOwnerInfo owner; /* - * The severity of the incident + * List of labels to add to the incident */ - @JsonProperty(value = "severity") - private IncidentSeverity severity; + @JsonProperty(value = "labels") + private List labels; - /* - * The status of the incident + /** + * Get the severity property: The severity of the incident. + * + * @return the severity value. */ - @JsonProperty(value = "status") - private IncidentStatus status; + public IncidentSeverity severity() { + return this.severity; + } /** - * Get the classification property: The reason the incident was closed. + * Set the severity property: The severity of the incident. * - * @return the classification value. + * @param severity the severity value to set. + * @return the IncidentPropertiesAction object itself. */ - public IncidentClassification classification() { - return this.classification; + public IncidentPropertiesAction withSeverity(IncidentSeverity severity) { + this.severity = severity; + return this; } /** - * Set the classification property: The reason the incident was closed. + * Get the status property: The status of the incident. * - * @param classification the classification value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the status value. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassification(IncidentClassification classification) { - this.classification = classification; + public IncidentStatus status() { + return this.status; + } + + /** + * Set the status property: The status of the incident. + * + * @param status the status value to set. + * @return the IncidentPropertiesAction object itself. + */ + public IncidentPropertiesAction withStatus(IncidentStatus status) { + this.status = status; return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the classification property: The reason the incident was closed. * - * @return the classificationComment value. + * @return the classification value. */ - public String classificationComment() { - return this.classificationComment; + public IncidentClassification classification() { + return this.classification; } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the classification property: The reason the incident was closed. * - * @param classificationComment the classificationComment value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param classification the classification value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; + public IncidentPropertiesAction withClassification(IncidentClassification classification) { + this.classification = classification; return this; } @@ -111,36 +130,35 @@ public IncidentClassificationReason classificationReason() { * Set the classificationReason property: The classification reason the incident was closed with. * * @param classificationReason the classificationReason value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withClassificationReason( - IncidentClassificationReason classificationReason) { + public IncidentPropertiesAction withClassificationReason(IncidentClassificationReason classificationReason) { this.classificationReason = classificationReason; return this; } /** - * Get the labels property: List of labels to add to the incident. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the labels value. + * @return the classificationComment value. */ - public List labels() { - return this.labels; + public String classificationComment() { + return this.classificationComment; } /** - * Set the labels property: List of labels to add to the incident. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @param labels the labels value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param classificationComment the classificationComment value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withLabels(List labels) { - this.labels = labels; + public IncidentPropertiesAction withClassificationComment(String classificationComment) { + this.classificationComment = classificationComment; return this; } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the owner property: Information on the user an incident is assigned to. * * @return the owner value. */ @@ -149,53 +167,33 @@ public IncidentOwnerInfo owner() { } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Set the owner property: Information on the user an incident is assigned to. * * @param owner the owner value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withOwner(IncidentOwnerInfo owner) { + public IncidentPropertiesAction withOwner(IncidentOwnerInfo owner) { this.owner = owner; return this; } /** - * Get the severity property: The severity of the incident. - * - * @return the severity value. - */ - public IncidentSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity of the incident. - * - * @param severity the severity value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. - */ - public AutomationRuleModifyPropertiesActionConfiguration withSeverity(IncidentSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the status property: The status of the incident. + * Get the labels property: List of labels to add to the incident. * - * @return the status value. + * @return the labels value. */ - public IncidentStatus status() { - return this.status; + public List labels() { + return this.labels; } /** - * Set the status property: The status of the incident. + * Set the labels property: List of labels to add to the incident. * - * @param status the status value to set. - * @return the AutomationRuleModifyPropertiesActionConfiguration object itself. + * @param labels the labels value to set. + * @return the IncidentPropertiesAction object itself. */ - public AutomationRuleModifyPropertiesActionConfiguration withStatus(IncidentStatus status) { - this.status = status; + public IncidentPropertiesAction withLabels(List labels) { + this.labels = labels; return this; } @@ -205,11 +203,11 @@ public AutomationRuleModifyPropertiesActionConfiguration withStatus(IncidentStat * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (labels() != null) { - labels().forEach(e -> e.validate()); - } if (owner() != null) { owner().validate(); } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } } } 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 71579109594e7..078c2fce6eb80 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 @@ -20,7 +20,7 @@ public interface IncidentRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); @@ -40,7 +40,7 @@ public interface IncidentRelations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 relations. + * @return all incident relations as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 66063dec857c8..3a2710c7cad6e 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 @@ -10,6 +10,39 @@ /** Resource collection API of Incidents. */ public interface Incidents { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + + /** + * 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 com.azure.core.management.exception.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}. + */ + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); + /** * Gets all incidents. * @@ -18,7 +51,7 @@ public interface Incidents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -37,7 +70,7 @@ public interface Incidents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 incidents. + * @return all incidents as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 new file mode 100644 index 0000000000000..1e040c413e036 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.IoTCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents IoT requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IOT") +@Fluent +public final class IoTCheckRequirements extends DataConnectorsCheckRequirements { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTCheckRequirements.class); + + /* + * IoT requirements check properties. + */ + @JsonProperty(value = "properties") + private IoTCheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: IoT requirements check properties. + * + * @return the innerProperties value. + */ + private IoTCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTCheckRequirements object itself. + */ + public IoTCheckRequirements withSubscriptionId(String subscriptionId) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTCheckRequirementsProperties(); + } + this.innerProperties().withSubscriptionId(subscriptionId); + 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/IoTDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java new file mode 100644 index 0000000000000..947a7c3eedce6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java @@ -0,0 +1,103 @@ +// 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.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.IoTDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents IoT data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("IOT") +@Fluent +public final class IoTDataConnector extends DataConnectorInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IoTDataConnector.class); + + /* + * IoT data connector properties. + */ + @JsonProperty(value = "properties") + private IoTDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: IoT data connector properties. + * + * @return the innerProperties value. + */ + private IoTDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IoTDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.innerProperties() == null ? null : this.innerProperties().subscriptionId(); + } + + /** + * Set the subscriptionId property: The subscription id to connect to, and get the data from. + * + * @param subscriptionId the subscriptionId value to set. + * @return the IoTDataConnector object itself. + */ + public IoTDataConnector withSubscriptionId(String subscriptionId) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTDataConnectorProperties(); + } + this.innerProperties().withSubscriptionId(subscriptionId); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public AlertsDataTypeOfDataConnector 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 IoTDataConnector object itself. + */ + public IoTDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new IoTDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + 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/Kind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java index be9a0df49f6a3..82b2dcd15e142 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 @@ -52,6 +52,15 @@ public final class Kind extends ExpandableStringEnum { /** Static value Solution for Kind. */ public static final Kind SOLUTION = fromString("Solution"); + /** Static value AzureFunction for Kind. */ + public static final Kind AZURE_FUNCTION = fromString("AzureFunction"); + + /** Static value LogicAppsCustomConnector for Kind. */ + public static final Kind LOGIC_APPS_CUSTOM_CONNECTOR = fromString("LogicAppsCustomConnector"); + + /** Static value AutomationRule for Kind. */ + public static final Kind AUTOMATION_RULE = fromString("AutomationRule"); + /** * 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/MLBehaviorAnalyticsAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java index 4df5f08acb440..3ace5ce4f619a 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 @@ -135,6 +135,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * 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 cba55a5dee28b..caf31469885e0 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 @@ -61,7 +61,7 @@ public MLBehaviorAnalyticsAlertRuleTemplate withSeverity(AlertSeverity severity) } /** - * Get the tactics property: The tactics of the alert rule template. + * Get the tactics property: The tactics of the alert rule. * * @return the tactics value. */ @@ -70,7 +70,7 @@ public List tactics() { } /** - * Set the tactics property: The tactics of the alert rule template. + * Set the tactics property: The tactics of the alert rule. * * @param tactics the tactics value to set. * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. @@ -83,6 +83,29 @@ public MLBehaviorAnalyticsAlertRuleTemplate withTactics(List tacti return this; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. + */ + public MLBehaviorAnalyticsAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * 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/ManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java new file mode 100644 index 0000000000000..f7c022e617d8f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.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.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** The ManualTriggerRequestBody model. */ +@Fluent +public final class ManualTriggerRequestBody { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManualTriggerRequestBody.class); + + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /* + * The logicAppsResourceId property. + */ + @JsonProperty(value = "logicAppsResourceId") + private String logicAppsResourceId; + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the ManualTriggerRequestBody object itself. + */ + public ManualTriggerRequestBody withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the logicAppsResourceId property: The logicAppsResourceId property. + * + * @return the logicAppsResourceId value. + */ + public String logicAppsResourceId() { + return this.logicAppsResourceId; + } + + /** + * Set the logicAppsResourceId property: The logicAppsResourceId property. + * + * @param logicAppsResourceId the logicAppsResourceId value to set. + * @return the ManualTriggerRequestBody object itself. + */ + public ManualTriggerRequestBody withLogicAppsResourceId(String logicAppsResourceId) { + this.logicAppsResourceId = logicAppsResourceId; + 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/MetadataModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java index 8a601c815edd4..9a346deb899c3 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 @@ -138,6 +138,58 @@ public interface MetadataModel { */ 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 solution template. + * + * @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 inner com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner object. * @@ -182,7 +234,14 @@ interface WithCreate DefinitionStages.WithCategories, DefinitionStages.WithProviders, DefinitionStages.WithFirstPublishDate, - DefinitionStages.WithLastPublishDate { + DefinitionStages.WithLastPublishDate, + DefinitionStages.WithCustomVersion, + DefinitionStages.WithContentSchemaVersion, + DefinitionStages.WithIcon, + DefinitionStages.WithThreatAnalysisTactics, + DefinitionStages.WithThreatAnalysisTechniques, + DefinitionStages.WithPreviewImages, + DefinitionStages.WithPreviewImagesDark { /** * Executes the create request. * @@ -342,6 +401,84 @@ interface WithLastPublishDate { */ WithCreate withLastPublishDate(LocalDate lastPublishDate); } + /** The stage of the MetadataModel definition allowing to specify customVersion. */ + interface WithCustomVersion { + /** + * Specifies the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion The custom version of the content. A optional free text. + * @return the next definition stage. + */ + WithCreate withCustomVersion(String customVersion); + } + /** The stage of the MetadataModel definition allowing to specify contentSchemaVersion. */ + interface WithContentSchemaVersion { + /** + * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish + * between different flow based on the schema version. + * + * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different + * flow based on the schema version. + * @return the next definition stage. + */ + WithCreate withContentSchemaVersion(String contentSchemaVersion); + } + /** The stage of the MetadataModel definition allowing to specify icon. */ + interface WithIcon { + /** + * Specifies the icon property: the icon identifier. this id can later be fetched from the solution + * template. + * + * @param icon the icon identifier. this id can later be fetched from the solution template. + * @return the next definition stage. + */ + WithCreate withIcon(String icon); + } + /** The stage of the MetadataModel definition allowing to specify threatAnalysisTactics. */ + interface WithThreatAnalysisTactics { + /** + * Specifies the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the tactics the resource covers. + * @return the next definition stage. + */ + WithCreate withThreatAnalysisTactics(List threatAnalysisTactics); + } + /** The stage of the MetadataModel definition allowing to specify threatAnalysisTechniques. */ + interface WithThreatAnalysisTechniques { + /** + * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be + * aligned with the tactics being used. + * + * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the + * tactics being used. + * @return the next definition stage. + */ + WithCreate withThreatAnalysisTechniques(List threatAnalysisTechniques); + } + /** The stage of the MetadataModel definition allowing to specify previewImages. */ + interface WithPreviewImages { + /** + * Specifies the previewImages property: preview image file names. These will be taken from the solution + * artifacts. + * + * @param previewImages preview image file names. These will be taken from the solution artifacts. + * @return the next definition stage. + */ + WithCreate withPreviewImages(List previewImages); + } + /** The stage of the MetadataModel definition allowing to specify previewImagesDark. */ + interface WithPreviewImagesDark { + /** + * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution + * artifacts. used for dark theme support. + * + * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used + * for dark theme support. + * @return the next definition stage. + */ + WithCreate withPreviewImagesDark(List previewImagesDark); + } } /** * Begins update for the MetadataModel resource. @@ -364,7 +501,14 @@ interface Update UpdateStages.WithCategories, UpdateStages.WithProviders, UpdateStages.WithFirstPublishDate, - UpdateStages.WithLastPublishDate { + UpdateStages.WithLastPublishDate, + UpdateStages.WithCustomVersion, + UpdateStages.WithContentSchemaVersion, + UpdateStages.WithIcon, + UpdateStages.WithThreatAnalysisTactics, + UpdateStages.WithThreatAnalysisTechniques, + UpdateStages.WithPreviewImages, + UpdateStages.WithPreviewImagesDark { /** * Executes the update request. * @@ -526,6 +670,84 @@ interface WithLastPublishDate { */ Update withLastPublishDate(LocalDate lastPublishDate); } + /** The stage of the MetadataModel update allowing to specify customVersion. */ + interface WithCustomVersion { + /** + * Specifies the customVersion property: The custom version of the content. A optional free text. + * + * @param customVersion The custom version of the content. A optional free text. + * @return the next definition stage. + */ + Update withCustomVersion(String customVersion); + } + /** The stage of the MetadataModel update allowing to specify contentSchemaVersion. */ + interface WithContentSchemaVersion { + /** + * Specifies the contentSchemaVersion property: Schema version of the content. Can be used to distinguish + * between different flow based on the schema version. + * + * @param contentSchemaVersion Schema version of the content. Can be used to distinguish between different + * flow based on the schema version. + * @return the next definition stage. + */ + Update withContentSchemaVersion(String contentSchemaVersion); + } + /** The stage of the MetadataModel update allowing to specify icon. */ + interface WithIcon { + /** + * Specifies the icon property: the icon identifier. this id can later be fetched from the solution + * template. + * + * @param icon the icon identifier. this id can later be fetched from the solution template. + * @return the next definition stage. + */ + Update withIcon(String icon); + } + /** The stage of the MetadataModel update allowing to specify threatAnalysisTactics. */ + interface WithThreatAnalysisTactics { + /** + * Specifies the threatAnalysisTactics property: the tactics the resource covers. + * + * @param threatAnalysisTactics the tactics the resource covers. + * @return the next definition stage. + */ + Update withThreatAnalysisTactics(List threatAnalysisTactics); + } + /** The stage of the MetadataModel update allowing to specify threatAnalysisTechniques. */ + interface WithThreatAnalysisTechniques { + /** + * Specifies the threatAnalysisTechniques property: the techniques the resource covers, these have to be + * aligned with the tactics being used. + * + * @param threatAnalysisTechniques the techniques the resource covers, these have to be aligned with the + * tactics being used. + * @return the next definition stage. + */ + Update withThreatAnalysisTechniques(List threatAnalysisTechniques); + } + /** The stage of the MetadataModel update allowing to specify previewImages. */ + interface WithPreviewImages { + /** + * Specifies the previewImages property: preview image file names. These will be taken from the solution + * artifacts. + * + * @param previewImages preview image file names. These will be taken from the solution artifacts. + * @return the next definition stage. + */ + Update withPreviewImages(List previewImages); + } + /** The stage of the MetadataModel update allowing to specify previewImagesDark. */ + interface WithPreviewImagesDark { + /** + * Specifies the previewImagesDark property: preview image file names. These will be taken from the solution + * artifacts. used for dark theme support. + * + * @param previewImagesDark preview image file names. These will be taken from the solution artifacts. used + * for dark theme support. + * @return the next definition stage. + */ + Update withPreviewImagesDark(List previewImagesDark); + } } /** * Refreshes the resource to sync with Azure. 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 8d9bdd6f4199b..345dce0eb2f54 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 @@ -329,6 +329,173 @@ public MetadataPatch withLastPublishDate(LocalDate 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 MetadataPatch object itself. + */ + public MetadataPatch withCustomVersion(String customVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + 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 MetadataPatch object itself. + */ + public MetadataPatch withContentSchemaVersion(String contentSchemaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withContentSchemaVersion(contentSchemaVersion); + return this; + } + + /** + * Get the icon property: the icon identifier. this id can later be fetched from the solution template. + * + * @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 solution template. + * + * @param icon the icon value to set. + * @return the MetadataPatch object itself. + */ + public MetadataPatch withIcon(String icon) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + 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 MetadataPatch object itself. + */ + public MetadataPatch withThreatAnalysisTactics(List threatAnalysisTactics) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + 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 MetadataPatch object itself. + */ + public MetadataPatch withThreatAnalysisTechniques(List threatAnalysisTechniques) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + 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 MetadataPatch object itself. + */ + public MetadataPatch withPreviewImages(List previewImages) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + 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 MetadataPatch object itself. + */ + public MetadataPatch withPreviewImagesDark(List previewImagesDark) { + if (this.innerProperties() == null) { + this.innerProperties = new MetadataPropertiesPatch(); + } + this.innerProperties().withPreviewImagesDark(previewImagesDark); + return this; + } + /** * Validates the instance. * 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 f35c008b4586b..b8be150a2a19c 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 @@ -18,7 +18,7 @@ public interface Metadatas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface Metadatas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 metadata. + * @return list of all the metadata as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, 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 833c5896c25d5..bc6d2679ac430 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 @@ -12,6 +12,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; /** Represents NRT alert rule. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @@ -42,6 +46,368 @@ public NrtAlertRule withEtag(String etag) { return this; } + /** + * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @return the alertRuleTemplateName value. + */ + public String alertRuleTemplateName() { + return this.innerProperties() == null ? null : this.innerProperties().alertRuleTemplateName(); + } + + /** + * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. + * + * @param alertRuleTemplateName the alertRuleTemplateName value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); + return this; + } + + /** + * Get the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @return the templateVersion value. + */ + public String templateVersion() { + return this.innerProperties() == null ? null : this.innerProperties().templateVersion(); + } + + /** + * Set the templateVersion property: The version of the alert rule template used to create this rule - in format + * <a.b.c>, where all are numbers, for example 0 <1.0.2>. + * + * @param templateVersion the templateVersion value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTemplateVersion(String templateVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTemplateVersion(templateVersion); + return this; + } + + /** + * Get the description property: The description of the alert rule. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the alert rule. + * + * @param description the description value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withQuery(String query) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withQuery(query); + return this; + } + + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + + /** + * Get the displayName property: The display name for alerts created by this alert rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: The display name for alerts created by this alert rule. + * + * @param displayName the displayName value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: Determines whether this alert rule is enabled or disabled. + * + * @param enabled the enabled value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the lastModifiedUtc property: The last time that this alert rule has been modified. + * + * @return the lastModifiedUtc value. + */ + public OffsetDateTime lastModifiedUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); + } + + /** + * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @return the suppressionDuration value. + */ + public Duration suppressionDuration() { + return this.innerProperties() == null ? null : this.innerProperties().suppressionDuration(); + } + + /** + * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this + * alert rule been triggered. + * + * @param suppressionDuration the suppressionDuration value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSuppressionDuration(Duration suppressionDuration) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSuppressionDuration(suppressionDuration); + return this; + } + + /** + * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @return the suppressionEnabled value. + */ + public Boolean suppressionEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().suppressionEnabled(); + } + + /** + * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or + * disabled. + * + * @param suppressionEnabled the suppressionEnabled value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSuppressionEnabled(suppressionEnabled); + return this; + } + + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + + /** + * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @return the incidentConfiguration value. + */ + public IncidentConfiguration incidentConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().incidentConfiguration(); + } + + /** + * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this + * analytics rule. + * + * @param incidentConfiguration the incidentConfiguration value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withIncidentConfiguration(incidentConfiguration); + return this; + } + + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withCustomDetails(Map customDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withCustomDetails(customDetails); + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + 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 8d6ab80cffbbf..3c22a8fd8b9c6 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 @@ -84,29 +84,6 @@ public NrtAlertRuleTemplate withSeverity(AlertSeverity severity) { return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withTactics(tactics); - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. @@ -201,6 +178,52 @@ public NrtAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertD return this; } + /** + * Get the tactics property: The tactics of the alert rule. + * + * @return the tactics value. + */ + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); + } + + /** + * Set the tactics property: The tactics of the alert rule. + * + * @param tactics the tactics value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withTactics(List tactics) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withTactics(tactics); + return this; + } + + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * 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/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java new file mode 100644 index 0000000000000..b8ee0331b15fa --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office365 Project requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Office365Project") +@Fluent +public final class Office365ProjectCheckRequirements extends DataConnectorsCheckRequirements { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectCheckRequirements.class); + + /* + * Office365 Project requirements check properties. + */ + @JsonProperty(value = "properties") + private Office365ProjectCheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: Office365 Project requirements check properties. + * + * @return the innerProperties value. + */ + private Office365ProjectCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * 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/Office365ProjectConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java new file mode 100644 index 0000000000000..247f714d36c81 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java @@ -0,0 +1,58 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Office Microsoft Project data connector. */ +@Fluent +public final class Office365ProjectConnectorDataTypes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectConnectorDataTypes.class); + + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private Office365ProjectConnectorDataTypesLogs logs; + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public Office365ProjectConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the Office365ProjectConnectorDataTypes object itself. + */ + public Office365ProjectConnectorDataTypes withLogs(Office365ProjectConnectorDataTypesLogs 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 Office365ProjectConnectorDataTypes")); + } else { + logs().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..50509b4aeb5b5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.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; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** Logs data type. */ +@Fluent +public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectConnectorDataTypesLogs.class); + + /** {@inheritDoc} */ + @Override + public Office365ProjectConnectorDataTypesLogs 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/Office365ProjectDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java new file mode 100644 index 0000000000000..91680064bb324 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java @@ -0,0 +1,103 @@ +// 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.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office Microsoft Project data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("Office365Project") +@Fluent +public final class Office365ProjectDataConnector extends DataConnectorInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Office365ProjectDataConnector.class); + + /* + * Office Microsoft Project data connector properties. + */ + @JsonProperty(value = "properties") + private Office365ProjectDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: Office Microsoft Project data connector properties. + * + * @return the innerProperties value. + */ + private Office365ProjectDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public Office365ProjectDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public Office365ProjectConnectorDataTypes 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 Office365ProjectDataConnector object itself. + */ + public Office365ProjectDataConnector withDataTypes(Office365ProjectConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectDataConnectorProperties(); + } + 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 Office365ProjectDataConnector object itself. + */ + public Office365ProjectDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectDataConnectorProperties(); + } + 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/OfficeConsents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java index 5d2cbd593e0de..ed83191305b56 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 @@ -18,7 +18,7 @@ public interface OfficeConsents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 office365 consents. + * @return all office365 consents as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface OfficeConsents { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 office365 consents. + * @return all office365 consents 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/OfficePowerBICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java new file mode 100644 index 0000000000000..fa4709db37d49 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBICheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office PowerBI requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("OfficePowerBI") +@Fluent +public final class OfficePowerBICheckRequirements extends DataConnectorsCheckRequirements { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBICheckRequirements.class); + + /* + * Office Power BI requirements check properties. + */ + @JsonProperty(value = "properties") + private OfficePowerBICheckRequirementsProperties innerProperties; + + /** + * Get the innerProperties property: Office Power BI requirements check properties. + * + * @return the innerProperties value. + */ + private OfficePowerBICheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * 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/OfficePowerBIConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java new file mode 100644 index 0000000000000..5a14285e5ea73 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java @@ -0,0 +1,58 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Office Microsoft PowerBI data connector. */ +@Fluent +public final class OfficePowerBIConnectorDataTypes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBIConnectorDataTypes.class); + + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private OfficePowerBIConnectorDataTypesLogs logs; + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public OfficePowerBIConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the OfficePowerBIConnectorDataTypes object itself. + */ + public OfficePowerBIConnectorDataTypes withLogs(OfficePowerBIConnectorDataTypesLogs 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 OfficePowerBIConnectorDataTypes")); + } else { + logs().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..4fcf57942de0f --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.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; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** Logs data type. */ +@Fluent +public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBIConnectorDataTypesLogs.class); + + /** {@inheritDoc} */ + @Override + public OfficePowerBIConnectorDataTypesLogs 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/OfficePowerBIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java new file mode 100644 index 0000000000000..f4dfb48c7cf1c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java @@ -0,0 +1,103 @@ +// 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.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBIDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Office Microsoft PowerBI data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("OfficePowerBI") +@Fluent +public final class OfficePowerBIDataConnector extends DataConnectorInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OfficePowerBIDataConnector.class); + + /* + * Office Microsoft PowerBI data connector properties. + */ + @JsonProperty(value = "properties") + private OfficePowerBIDataConnectorProperties innerProperties; + + /** + * Get the innerProperties property: Office Microsoft PowerBI data connector properties. + * + * @return the innerProperties value. + */ + private OfficePowerBIDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public OfficePowerBIDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public OfficePowerBIConnectorDataTypes 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 OfficePowerBIDataConnector object itself. + */ + public OfficePowerBIDataConnector withDataTypes(OfficePowerBIConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBIDataConnectorProperties(); + } + 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 OfficePowerBIDataConnector object itself. + */ + public OfficePowerBIDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBIDataConnectorProperties(); + } + 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/Operations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java index 16a8948448cda..cb4d4d82cf5c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations available in the SecurityInsights RP. + * @return lists the operations available in the SecurityInsights RP as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java similarity index 71% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java index 7a708979a769a..2b031a0b40457 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookActionConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java @@ -8,12 +8,12 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; -/** The configuration of the run playbook automation rule action. */ +/** The PlaybookActionProperties model. */ @Fluent -public final class AutomationRuleRunPlaybookActionConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutomationRuleRunPlaybookActionConfiguration.class); +public final class PlaybookActionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PlaybookActionProperties.class); /* * The resource id of the playbook resource @@ -25,7 +25,7 @@ public final class AutomationRuleRunPlaybookActionConfiguration { * The tenant id of the playbook resource */ @JsonProperty(value = "tenantId") - private String tenantId; + private UUID tenantId; /** * Get the logicAppResourceId property: The resource id of the playbook resource. @@ -40,9 +40,9 @@ public String logicAppResourceId() { * Set the logicAppResourceId property: The resource id of the playbook resource. * * @param logicAppResourceId the logicAppResourceId value to set. - * @return the AutomationRuleRunPlaybookActionConfiguration object itself. + * @return the PlaybookActionProperties object itself. */ - public AutomationRuleRunPlaybookActionConfiguration withLogicAppResourceId(String logicAppResourceId) { + public PlaybookActionProperties withLogicAppResourceId(String logicAppResourceId) { this.logicAppResourceId = logicAppResourceId; return this; } @@ -52,7 +52,7 @@ public AutomationRuleRunPlaybookActionConfiguration withLogicAppResourceId(Strin * * @return the tenantId value. */ - public String tenantId() { + public UUID tenantId() { return this.tenantId; } @@ -60,9 +60,9 @@ public String tenantId() { * Set the tenantId property: The tenant id of the playbook resource. * * @param tenantId the tenantId value to set. - * @return the AutomationRuleRunPlaybookActionConfiguration object itself. + * @return the PlaybookActionProperties object itself. */ - public AutomationRuleRunPlaybookActionConfiguration withTenantId(String tenantId) { + public PlaybookActionProperties withTenantId(UUID tenantId) { this.tenantId = tenantId; return this; } 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 new file mode 100644 index 0000000000000..fb0ef14666938 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.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.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Describes an automation rule condition that evaluates a property's value. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") +@JsonTypeName("Property") +@Fluent +public final class PropertyConditionProperties extends AutomationRuleCondition { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PropertyConditionProperties.class); + + /* + * The conditionProperties property. + */ + @JsonProperty(value = "conditionProperties") + private AutomationRulePropertyValuesCondition conditionProperties; + + /** + * Get the conditionProperties property: The conditionProperties property. + * + * @return the conditionProperties value. + */ + public AutomationRulePropertyValuesCondition conditionProperties() { + return this.conditionProperties; + } + + /** + * Set the conditionProperties property: The conditionProperties property. + * + * @param conditionProperties the conditionProperties value to set. + * @return the PropertyConditionProperties object itself. + */ + public PropertyConditionProperties withConditionProperties( + AutomationRulePropertyValuesCondition conditionProperties) { + this.conditionProperties = conditionProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (conditionProperties() != null) { + conditionProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java deleted file mode 100644 index 679f98e22be25..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleProperties.java +++ /dev/null @@ -1,443 +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.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Query based alert rule base property bag. */ -@Fluent -public class QueryBasedAlertRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryBasedAlertRuleProperties.class); - - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName") - private String alertRuleTemplateName; - - /* - * The version of the alert rule template used to create this rule - in - * format , where all are numbers, for example 0 <1.0.2> - */ - @JsonProperty(value = "templateVersion") - private String templateVersion; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * Determines whether this alert rule is enabled or disabled. - */ - @JsonProperty(value = "enabled", required = true) - private boolean enabled; - - /* - * The last time that this alert rule has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The suppression (in ISO 8601 duration format) to wait since last time - * this alert rule been triggered. - */ - @JsonProperty(value = "suppressionDuration", required = true) - private Duration suppressionDuration; - - /* - * Determines whether the suppression for this alert rule is enabled or - * disabled. - */ - @JsonProperty(value = "suppressionEnabled", required = true) - private boolean suppressionEnabled; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - - /* - * The settings of the incidents that created from alerts triggered by this - * analytics rule - */ - @JsonProperty(value = "incidentConfiguration") - private IncidentConfiguration incidentConfiguration; - - /* - * Dictionary of string key-value pairs of columns to be attached to the - * alert - */ - @JsonProperty(value = "customDetails") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map customDetails; - - /* - * Array of the entity mappings of the alert rule - */ - @JsonProperty(value = "entityMappings") - private List entityMappings; - - /* - * The alert details override settings - */ - @JsonProperty(value = "alertDetailsOverride") - private AlertDetailsOverride alertDetailsOverride; - - /** - * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @return the alertRuleTemplateName value. - */ - public String alertRuleTemplateName() { - return this.alertRuleTemplateName; - } - - /** - * Set the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. - * - * @param alertRuleTemplateName the alertRuleTemplateName value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @return the templateVersion value. - */ - public String templateVersion() { - return this.templateVersion; - } - - /** - * Set the templateVersion property: The version of the alert rule template used to create this rule - in format - * <a.b.c>, where all are numbers, for example 0 <1.0.2>. - * - * @param templateVersion the templateVersion value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withTemplateVersion(String templateVersion) { - this.templateVersion = templateVersion; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the alert rule. - * - * @param description the description value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name for alerts created by this alert rule. - * - * @param displayName the displayName value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this alert rule is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert rule has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @return the suppressionDuration value. - */ - public Duration suppressionDuration() { - return this.suppressionDuration; - } - - /** - * Set the suppressionDuration property: The suppression (in ISO 8601 duration format) to wait since last time this - * alert rule been triggered. - * - * @param suppressionDuration the suppressionDuration value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSuppressionDuration(Duration suppressionDuration) { - this.suppressionDuration = suppressionDuration; - return this; - } - - /** - * Get the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @return the suppressionEnabled value. - */ - public boolean suppressionEnabled() { - return this.suppressionEnabled; - } - - /** - * Set the suppressionEnabled property: Determines whether the suppression for this alert rule is enabled or - * disabled. - * - * @param suppressionEnabled the suppressionEnabled value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSuppressionEnabled(boolean suppressionEnabled) { - this.suppressionEnabled = suppressionEnabled; - return this; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The severity for alerts created by this alert rule. - * - * @param severity the severity value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - - /** - * Get the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @return the incidentConfiguration value. - */ - public IncidentConfiguration incidentConfiguration() { - return this.incidentConfiguration; - } - - /** - * Set the incidentConfiguration property: The settings of the incidents that created from alerts triggered by this - * analytics rule. - * - * @param incidentConfiguration the incidentConfiguration value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withIncidentConfiguration(IncidentConfiguration incidentConfiguration) { - this.incidentConfiguration = incidentConfiguration; - return this; - } - - /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.customDetails; - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withCustomDetails(Map customDetails) { - this.customDetails = customDetails; - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.entityMappings; - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withEntityMappings(List entityMappings) { - this.entityMappings = entityMappings; - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. - * - * @return the alertDetailsOverride value. - */ - public AlertDetailsOverride alertDetailsOverride() { - return this.alertDetailsOverride; - } - - /** - * Set the alertDetailsOverride property: The alert details override settings. - * - * @param alertDetailsOverride the alertDetailsOverride value to set. - * @return the QueryBasedAlertRuleProperties object itself. - */ - public QueryBasedAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model QueryBasedAlertRuleProperties")); - } - if (suppressionDuration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property suppressionDuration in model QueryBasedAlertRuleProperties")); - } - if (incidentConfiguration() != null) { - incidentConfiguration().validate(); - } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } - if (alertDetailsOverride() != null) { - alertDetailsOverride().validate(); - } - } -} 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 bca982c124547..37f597d33e947 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 @@ -29,12 +29,6 @@ public class QueryBasedAlertRuleTemplateProperties { @JsonProperty(value = "severity") private AlertSeverity severity; - /* - * The tactics of the alert rule - */ - @JsonProperty(value = "tactics") - private List tactics; - /* * The version of this template - in format , where all are numbers. * For example <1.0.2>. @@ -102,26 +96,6 @@ public QueryBasedAlertRuleTemplateProperties withSeverity(AlertSeverity severity return this; } - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - public List tactics() { - return this.tactics; - } - - /** - * Set the tactics property: The tactics of the alert rule. - * - * @param tactics the tactics value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withTactics(List tactics) { - this.tactics = tactics; - return this; - } - /** * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For * example <1.0.2>. 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 new file mode 100644 index 0000000000000..9a0bcef6371d7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java @@ -0,0 +1,111 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resources created in user's repository for the source-control. */ +@Fluent +public final class RepositoryResourceInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RepositoryResourceInfo.class); + + /* + * The webhook object created for the source-control. + */ + @JsonProperty(value = "webhook") + private Webhook webhook; + + /* + * Resources created in GitHub for this source-control. + */ + @JsonProperty(value = "gitHubResourceInfo") + private GitHubResourceInfo gitHubResourceInfo; + + /* + * Resources created in Azure DevOps for this source-control. + */ + @JsonProperty(value = "azureDevOpsResourceInfo") + private AzureDevOpsResourceInfo azureDevOpsResourceInfo; + + /** + * Get the webhook property: The webhook object created for the source-control. + * + * @return the webhook value. + */ + public Webhook webhook() { + return this.webhook; + } + + /** + * Set the webhook property: The webhook object created for the source-control. + * + * @param webhook the webhook value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withWebhook(Webhook webhook) { + this.webhook = webhook; + return this; + } + + /** + * Get the gitHubResourceInfo property: Resources created in GitHub for this source-control. + * + * @return the gitHubResourceInfo value. + */ + public GitHubResourceInfo gitHubResourceInfo() { + return this.gitHubResourceInfo; + } + + /** + * Set the gitHubResourceInfo property: Resources created in GitHub for this source-control. + * + * @param gitHubResourceInfo the gitHubResourceInfo value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withGitHubResourceInfo(GitHubResourceInfo gitHubResourceInfo) { + this.gitHubResourceInfo = gitHubResourceInfo; + return this; + } + + /** + * Get the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. + * + * @return the azureDevOpsResourceInfo value. + */ + public AzureDevOpsResourceInfo azureDevOpsResourceInfo() { + return this.azureDevOpsResourceInfo; + } + + /** + * Set the azureDevOpsResourceInfo property: Resources created in Azure DevOps for this source-control. + * + * @param azureDevOpsResourceInfo the azureDevOpsResourceInfo value to set. + * @return the RepositoryResourceInfo object itself. + */ + public RepositoryResourceInfo withAzureDevOpsResourceInfo(AzureDevOpsResourceInfo azureDevOpsResourceInfo) { + this.azureDevOpsResourceInfo = azureDevOpsResourceInfo; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (webhook() != null) { + webhook().validate(); + } + if (gitHubResourceInfo() != null) { + gitHubResourceInfo().validate(); + } + if (azureDevOpsResourceInfo() != null) { + azureDevOpsResourceInfo().validate(); + } + } +} 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 36f412347bf4c..85458202275ce 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 @@ -117,29 +117,6 @@ public ScheduledAlertRule withDescription(String description) { return this; } - /** - * Get the query property: The query that creates alerts for this rule. - * - * @return the query value. - */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); - } - - /** - * Set the query property: The query that creates alerts for this rule. - * - * @param query the query value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withQuery(query); - return this; - } - /** * Get the displayName property: The display name for alerts created by this alert rule. * @@ -246,48 +223,48 @@ public ScheduledAlertRule withSuppressionEnabled(Boolean suppressionEnabled) { } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the tactics property: The tactics of the alert rule. * - * @return the severity value. + * @return the tactics value. */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Set the tactics property: The tactics of the alert rule. * - * @param severity the severity value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withSeverity(AlertSeverity severity) { + public ScheduledAlertRule withTactics(List tactics) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withSeverity(severity); + this.innerProperties().withTactics(tactics); return this; } /** - * Get the tactics property: The tactics of the alert rule. + * Get the techniques property: The techniques of the alert rule. * - * @return the tactics value. + * @return the techniques value. */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); } /** - * Set the tactics property: The tactics of the alert rule. + * Set the techniques property: The techniques of the alert rule. * - * @param tactics the tactics value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withTactics(List tactics) { + public ScheduledAlertRule withTechniques(List techniques) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withTactics(tactics); + this.innerProperties().withTechniques(techniques); return this; } @@ -317,71 +294,25 @@ public ScheduledAlertRule withIncidentConfiguration(IncidentConfiguration incide } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @return the customDetails value. - */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); - } - - /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. - * - * @param customDetails the customDetails value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withCustomDetails(customDetails); - return this; - } - - /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. - * - * @return the entityMappings value. - */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); - } - - /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. - * - * @param entityMappings the entityMappings value to set. - * @return the ScheduledAlertRule object itself. - */ - public ScheduledAlertRule withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleProperties(); - } - this.innerProperties().withEntityMappings(entityMappings); - return this; - } - - /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRule object itself. */ - public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + public ScheduledAlertRule withQuery(String query) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleProperties(); } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + this.innerProperties().withQuery(query); return this; } @@ -431,6 +362,29 @@ public ScheduledAlertRule withQueryPeriod(Duration queryPeriod) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -500,6 +454,75 @@ public ScheduledAlertRule withEventGroupingSettings(EventGroupingSettings eventG return this; } + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withCustomDetails(Map customDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withCustomDetails(customDetails); + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withEntityMappings(List entityMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withEntityMappings(entityMappings); + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + 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 00c665103e5bf..ca5f412adca40 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 @@ -7,14 +7,23 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; +import java.util.List; +import java.util.Map; /** Scheduled alert rule template property bag. */ @Fluent public class ScheduledAlertRuleCommonProperties { @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduledAlertRuleCommonProperties.class); + /* + * The query that creates alerts for this rule. + */ + @JsonProperty(value = "query") + private String query; + /* * The frequency (in ISO 8601 duration format) for this alert rule to run. */ @@ -27,6 +36,12 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "queryPeriod") private Duration queryPeriod; + /* + * The severity for alerts created by this alert rule. + */ + @JsonProperty(value = "severity") + private AlertSeverity severity; + /* * The operation against the threshold that triggers alert rule. */ @@ -45,6 +60,46 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Dictionary of string key-value pairs of columns to be attached to the + * alert + */ + @JsonProperty(value = "customDetails") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customDetails; + + /* + * Array of the entity mappings of the alert rule + */ + @JsonProperty(value = "entityMappings") + private List entityMappings; + + /* + * The alert details override settings + */ + @JsonProperty(value = "alertDetailsOverride") + private AlertDetailsOverride alertDetailsOverride; + + /** + * Get the query property: The query that creates alerts for this rule. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: The query that creates alerts for this rule. + * + * @param query the query value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withQuery(String query) { + this.query = query; + return this; + } + /** * Get the queryFrequency property: The frequency (in ISO 8601 duration format) for this alert rule to run. * @@ -85,6 +140,26 @@ public ScheduledAlertRuleCommonProperties withQueryPeriod(Duration queryPeriod) return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.severity; + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withSeverity(AlertSeverity severity) { + this.severity = severity; + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -145,6 +220,66 @@ public ScheduledAlertRuleCommonProperties withEventGroupingSettings(EventGroupin return this; } + /** + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @return the customDetails value. + */ + public Map customDetails() { + return this.customDetails; + } + + /** + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * + * @param customDetails the customDetails value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withCustomDetails(Map customDetails) { + this.customDetails = customDetails; + return this; + } + + /** + * Get the entityMappings property: Array of the entity mappings of the alert rule. + * + * @return the entityMappings value. + */ + public List entityMappings() { + return this.entityMappings; + } + + /** + * Set the entityMappings property: Array of the entity mappings of the alert rule. + * + * @param entityMappings the entityMappings value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withEntityMappings(List entityMappings) { + this.entityMappings = entityMappings; + return this; + } + + /** + * Get the alertDetailsOverride property: The alert details override settings. + * + * @return the alertDetailsOverride value. + */ + public AlertDetailsOverride alertDetailsOverride() { + return this.alertDetailsOverride; + } + + /** + * Set the alertDetailsOverride property: The alert details override settings. + * + * @param alertDetailsOverride the alertDetailsOverride value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + this.alertDetailsOverride = alertDetailsOverride; + return this; + } + /** * Validates the instance. * @@ -154,5 +289,11 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (entityMappings() != null) { + entityMappings().forEach(e -> e.validate()); + } + if (alertDetailsOverride() != null) { + alertDetailsOverride().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 897d8d1edbb95..24e8b5f060c2b 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 @@ -40,165 +40,159 @@ private ScheduledAlertRuleTemplateProperties innerProperties() { } /** - * Get the query property: The query that creates alerts for this rule. + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @return the query value. + * @return the alertRulesCreatedByTemplateCount value. */ - public String query() { - return this.innerProperties() == null ? null : this.innerProperties().query(); + public Integer alertRulesCreatedByTemplateCount() { + return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); } /** - * Set the query property: The query that creates alerts for this rule. + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @param query the query value to set. + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withQuery(String query) { + public ScheduledAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withQuery(query); + this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); return this; } /** - * Get the severity property: The severity for alerts created by this alert rule. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the severity value. + * @return the createdDateUtc value. */ - public AlertSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public OffsetDateTime createdDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); } /** - * Set the severity property: The severity for alerts created by this alert rule. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @param severity the severity value to set. - * @return the ScheduledAlertRuleTemplate object itself. + * @return the lastUpdatedDateUtc value. */ - public ScheduledAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ScheduledAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - return this; + public OffsetDateTime lastUpdatedDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); } /** - * Get the tactics property: The tactics of the alert rule. + * Get the description property: The description of the alert rule template. * - * @return the tactics value. + * @return the description value. */ - public List tactics() { - return this.innerProperties() == null ? null : this.innerProperties().tactics(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the tactics property: The tactics of the alert rule. + * Set the description property: The description of the alert rule template. * - * @param tactics the tactics value to set. + * @param description the description value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withTactics(List tactics) { + public ScheduledAlertRuleTemplate withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withTactics(tactics); + this.innerProperties().withDescription(description); return this; } /** - * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Get the displayName property: The display name for alert rule template. * - * @return the version value. + * @return the displayName value. */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** - * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For - * example <1.0.2>. + * Set the displayName property: The display name for alert rule template. * - * @param version the version value to set. + * @param displayName the displayName value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withVersion(String version) { + public ScheduledAlertRuleTemplate withDisplayName(String displayName) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withVersion(version); + this.innerProperties().withDisplayName(displayName); return this; } /** - * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Get the requiredDataConnectors property: The required data connectors for this template. * - * @return the customDetails value. + * @return the requiredDataConnectors value. */ - public Map customDetails() { - return this.innerProperties() == null ? null : this.innerProperties().customDetails(); + public List requiredDataConnectors() { + return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); } /** - * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. + * Set the requiredDataConnectors property: The required data connectors for this template. * - * @param customDetails the customDetails value to set. + * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withCustomDetails(Map customDetails) { + public ScheduledAlertRuleTemplate withRequiredDataConnectors( + List requiredDataConnectors) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withCustomDetails(customDetails); + this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); return this; } /** - * Get the entityMappings property: Array of the entity mappings of the alert rule. + * Get the status property: The alert rule template status. * - * @return the entityMappings value. + * @return the status value. */ - public List entityMappings() { - return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); + public TemplateStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Set the entityMappings property: Array of the entity mappings of the alert rule. + * Set the status property: The alert rule template status. * - * @param entityMappings the entityMappings value to set. + * @param status the status value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withEntityMappings(List entityMappings) { + public ScheduledAlertRuleTemplate withStatus(TemplateStatus status) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withEntityMappings(entityMappings); + this.innerProperties().withStatus(status); return this; } /** - * Get the alertDetailsOverride property: The alert details override settings. + * Get the query property: The query that creates alerts for this rule. * - * @return the alertDetailsOverride value. + * @return the query value. */ - public AlertDetailsOverride alertDetailsOverride() { - return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); + public String query() { + return this.innerProperties() == null ? null : this.innerProperties().query(); } /** - * Set the alertDetailsOverride property: The alert details override settings. + * Set the query property: The query that creates alerts for this rule. * - * @param alertDetailsOverride the alertDetailsOverride value to set. + * @param query the query value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { + public ScheduledAlertRuleTemplate withQuery(String query) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); + this.innerProperties().withQuery(query); return this; } @@ -248,6 +242,29 @@ public ScheduledAlertRuleTemplate withQueryPeriod(Duration queryPeriod) { return this; } + /** + * Get the severity property: The severity for alerts created by this alert rule. + * + * @return the severity value. + */ + public AlertSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); + } + + /** + * Set the severity property: The severity for alerts created by this alert rule. + * + * @param severity the severity value to set. + * @return the ScheduledAlertRuleTemplate object itself. + */ + public ScheduledAlertRuleTemplate withSeverity(AlertSeverity severity) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withSeverity(severity); + return this; + } + /** * Get the triggerOperator property: The operation against the threshold that triggers alert rule. * @@ -295,159 +312,165 @@ public ScheduledAlertRuleTemplate withTriggerThreshold(Integer triggerThreshold) } /** - * Get the eventGroupingSettings property: The event grouping settings. + * Get the tactics property: The tactics of the alert rule template. * - * @return the eventGroupingSettings value. + * @return the tactics value. */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); + public List tactics() { + return this.innerProperties() == null ? null : this.innerProperties().tactics(); } /** - * Set the eventGroupingSettings property: The event grouping settings. + * Set the tactics property: The tactics of the alert rule template. * - * @param eventGroupingSettings the eventGroupingSettings value to set. + * @param tactics the tactics value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { + public ScheduledAlertRuleTemplate withTactics(List tactics) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); + this.innerProperties().withTactics(tactics); return this; } /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Get the techniques property: The techniques of the alert rule. * - * @return the alertRulesCreatedByTemplateCount value. + * @return the techniques value. */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); } /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Set the techniques property: The techniques of the alert rule. * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. + * @param techniques the techniques value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { + public ScheduledAlertRuleTemplate withTechniques(List techniques) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); + this.innerProperties().withTechniques(techniques); return this; } /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. + * Get the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. * - * @return the lastUpdatedDateUtc value. + * @return the version value. */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** - * Get the createdDateUtc property: The time that this alert rule template has been added. + * Set the version property: The version of this template - in format <a.b.c>, where all are numbers. For + * example <1.0.2>. * - * @return the createdDateUtc value. + * @param version the version value to set. + * @return the ScheduledAlertRuleTemplate object itself. */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); + public ScheduledAlertRuleTemplate withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withVersion(version); + return this; } /** - * Get the description property: The description of the alert rule template. + * Get the eventGroupingSettings property: The event grouping settings. * - * @return the description value. + * @return the eventGroupingSettings value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public EventGroupingSettings eventGroupingSettings() { + return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); } /** - * Set the description property: The description of the alert rule template. + * Set the eventGroupingSettings property: The event grouping settings. * - * @param description the description value to set. + * @param eventGroupingSettings the eventGroupingSettings value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withDescription(String description) { + public ScheduledAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withDescription(description); + this.innerProperties().withEventGroupingSettings(eventGroupingSettings); return this; } /** - * Get the displayName property: The display name for alert rule template. + * Get the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. * - * @return the displayName value. + * @return the customDetails value. */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + public Map customDetails() { + return this.innerProperties() == null ? null : this.innerProperties().customDetails(); } /** - * Set the displayName property: The display name for alert rule template. + * Set the customDetails property: Dictionary of string key-value pairs of columns to be attached to the alert. * - * @param displayName the displayName value to set. + * @param customDetails the customDetails value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withDisplayName(String displayName) { + public ScheduledAlertRuleTemplate withCustomDetails(Map customDetails) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withDisplayName(displayName); + this.innerProperties().withCustomDetails(customDetails); return this; } /** - * Get the requiredDataConnectors property: The required data sources for this template. + * Get the entityMappings property: Array of the entity mappings of the alert rule. * - * @return the requiredDataConnectors value. + * @return the entityMappings value. */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); + public List entityMappings() { + return this.innerProperties() == null ? null : this.innerProperties().entityMappings(); } /** - * Set the requiredDataConnectors property: The required data sources for this template. + * Set the entityMappings property: Array of the entity mappings of the alert rule. * - * @param requiredDataConnectors the requiredDataConnectors value to set. + * @param entityMappings the entityMappings value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { + public ScheduledAlertRuleTemplate withEntityMappings(List entityMappings) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); + this.innerProperties().withEntityMappings(entityMappings); return this; } /** - * Get the status property: The alert rule template status. + * Get the alertDetailsOverride property: The alert details override settings. * - * @return the status value. + * @return the alertDetailsOverride value. */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + public AlertDetailsOverride alertDetailsOverride() { + return this.innerProperties() == null ? null : this.innerProperties().alertDetailsOverride(); } /** - * Set the status property: The alert rule template status. + * Set the alertDetailsOverride property: The alert details override settings. * - * @param status the status value to set. + * @param alertDetailsOverride the alertDetailsOverride value to set. * @return the ScheduledAlertRuleTemplate object itself. */ - public ScheduledAlertRuleTemplate withStatus(TemplateStatus status) { + public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { if (this.innerProperties() == null) { this.innerProperties = new ScheduledAlertRuleTemplateProperties(); } - this.innerProperties().withStatus(status); + this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java deleted file mode 100644 index 16b8c39e003b3..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java +++ /dev/null @@ -1,34 +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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Source. */ -public final class Source extends ExpandableStringEnum { - /** Static value Local file for Source. */ - public static final Source LOCAL_FILE = fromString("Local file"); - - /** Static value Remote storage for Source. */ - public static final Source REMOTE_STORAGE = fromString("Remote storage"); - - /** - * Creates or finds a Source from its string representation. - * - * @param name a name to look for. - * @return the corresponding Source. - */ - @JsonCreator - public static Source fromString(String name) { - return fromString(name, Source.class); - } - - /** @return known Source values. */ - public static Collection values() { - return values(Source.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java index c69e41b8d58c3..6c5a64405d59c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java @@ -53,6 +53,13 @@ public interface SourceControl { */ String idPropertiesId(); + /** + * Gets the version property: The version number associated with the source control. + * + * @return the version value. + */ + Version version(); + /** * Gets the displayName property: The display name of the source control. * @@ -88,6 +95,20 @@ public interface SourceControl { */ Repository repository(); + /** + * Gets the repositoryResourceInfo property: Information regarding the resources created in user's repository. + * + * @return the repositoryResourceInfo value. + */ + RepositoryResourceInfo repositoryResourceInfo(); + + /** + * Gets the lastDeploymentInfo property: Information regarding the latest deployment for the source control. + * + * @return the lastDeploymentInfo value. + */ + DeploymentInfo lastDeploymentInfo(); + /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner object. * @@ -122,11 +143,14 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithEtag, DefinitionStages.WithIdPropertiesId, + DefinitionStages.WithVersion, DefinitionStages.WithDisplayName, DefinitionStages.WithDescription, DefinitionStages.WithRepoType, DefinitionStages.WithContentTypes, - DefinitionStages.WithRepository { + DefinitionStages.WithRepository, + DefinitionStages.WithRepositoryResourceInfo, + DefinitionStages.WithLastDeploymentInfo { /** * Executes the create request. * @@ -162,6 +186,16 @@ interface WithIdPropertiesId { */ WithCreate withIdPropertiesId(String idPropertiesId); } + /** The stage of the SourceControl definition allowing to specify version. */ + interface WithVersion { + /** + * Specifies the version property: The version number associated with the source control. + * + * @param version The version number associated with the source control. + * @return the next definition stage. + */ + WithCreate withVersion(Version version); + } /** The stage of the SourceControl definition allowing to specify displayName. */ interface WithDisplayName { /** @@ -212,6 +246,28 @@ interface WithRepository { */ WithCreate withRepository(Repository repository); } + /** The stage of the SourceControl definition allowing to specify repositoryResourceInfo. */ + interface WithRepositoryResourceInfo { + /** + * Specifies the repositoryResourceInfo property: Information regarding the resources created in user's + * repository.. + * + * @param repositoryResourceInfo Information regarding the resources created in user's repository. + * @return the next definition stage. + */ + WithCreate withRepositoryResourceInfo(RepositoryResourceInfo repositoryResourceInfo); + } + /** The stage of the SourceControl definition allowing to specify lastDeploymentInfo. */ + interface WithLastDeploymentInfo { + /** + * Specifies the lastDeploymentInfo property: Information regarding the latest deployment for the source + * control.. + * + * @param lastDeploymentInfo Information regarding the latest deployment for the source control. + * @return the next definition stage. + */ + WithCreate withLastDeploymentInfo(DeploymentInfo lastDeploymentInfo); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java index 03fb7eaddc501..291568ce34484 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java @@ -18,7 +18,7 @@ public interface SourceControls { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); @@ -32,7 +32,7 @@ public interface SourceControls { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 repositories metadata. + * @return a list of repositories metadata as paginated response with {@link PagedIterable}. */ PagedIterable listRepositories( String resourceGroupName, String workspaceName, RepoType repoType, Context context); 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 30cba516f1ed0..d7301e3d70cc0 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 @@ -18,7 +18,7 @@ public interface SourceControlsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 source controls, without source control items. + * @return all source controls, without source control items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -31,7 +31,7 @@ public interface SourceControlsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 source controls, without source control items. + * @return all source controls, without source control items 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/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java new file mode 100644 index 0000000000000..4e787473c90f6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java @@ -0,0 +1,34 @@ +// 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 SourceType. */ +public final class SourceType extends ExpandableStringEnum { + /** Static value Local file for SourceType. */ + public static final SourceType LOCAL_FILE = fromString("Local file"); + + /** Static value Remote storage for SourceType. */ + public static final SourceType REMOTE_STORAGE = fromString("Remote storage"); + + /** + * Creates or finds a SourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceType. + */ + @JsonCreator + public static SourceType fromString(String name) { + return fromString(name, SourceType.class); + } + + /** @return known SourceType values. */ + public static Collection values() { + return values(SourceType.class); + } +} 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 2c04c09c6e191..21565c1d2f055 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 @@ -135,6 +135,15 @@ public List tactics() { return this.innerProperties() == null ? null : this.innerProperties().tactics(); } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + /** * Validates the instance. * 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 dde5fd59d17e2..a125fc4f6a05b 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 @@ -61,7 +61,7 @@ public ThreatIntelligenceAlertRuleTemplate withSeverity(AlertSeverity severity) } /** - * Get the tactics property: The tactics of the alert rule template. + * Get the tactics property: The tactics of the alert rule. * * @return the tactics value. */ @@ -70,7 +70,7 @@ public List tactics() { } /** - * Set the tactics property: The tactics of the alert rule template. + * Set the tactics property: The tactics of the alert rule. * * @param tactics the tactics value to set. * @return the ThreatIntelligenceAlertRuleTemplate object itself. @@ -83,6 +83,29 @@ public ThreatIntelligenceAlertRuleTemplate withTactics(List tactic return this; } + /** + * Get the techniques property: The techniques of the alert rule. + * + * @return the techniques value. + */ + public List techniques() { + return this.innerProperties() == null ? null : this.innerProperties().techniques(); + } + + /** + * Set the techniques property: The techniques of the alert rule. + * + * @param techniques the techniques value to set. + * @return the ThreatIntelligenceAlertRuleTemplate object itself. + */ + public ThreatIntelligenceAlertRuleTemplate withTechniques(List techniques) { + if (this.innerProperties() == null) { + this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); + } + this.innerProperties().withTechniques(techniques); + return this; + } + /** * 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/ThreatIntelligenceIndicatorModelForRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java index c7611600484d9..dcf454ebf235e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModelForRequestBody.java @@ -9,10 +9,14 @@ import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceIndicatorProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; import java.util.Map; /** Threat intelligence indicator entity used in request body. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("indicator") @Fluent public final class ThreatIntelligenceIndicatorModelForRequestBody extends ThreatIntelligenceResourceKind { @JsonIgnore @@ -59,13 +63,6 @@ private ThreatIntelligenceIndicatorProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceIndicatorModelForRequestBody withKind(ThreatIntelligenceResourceKindEnum kind) { - super.withKind(kind); - return this; - } - /** * Get the threatIntelligenceTags property: List of tags. * 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 903e7b65d29d4..1379374bb180d 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 @@ -145,7 +145,7 @@ 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 list of all the threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ PagedIterable queryIndicators( String resourceGroupName, @@ -162,7 +162,7 @@ PagedIterable queryIndicators( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence information objects. + * @return list of all the threat intelligence information objects as paginated response with {@link PagedIterable}. */ PagedIterable queryIndicators( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java index 84f06f5d2b019..444a66aa1384f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java @@ -17,7 +17,7 @@ public interface ThreatIntelligenceIndicatorsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -36,7 +36,7 @@ public interface ThreatIntelligenceIndicatorsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 threat intelligence indicators. + * @return all threat intelligence indicators as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java index d704e32ab4180..628c3e8080878 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKind.java @@ -4,53 +4,30 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; /** Describes an entity with kind. */ -@Fluent +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = ThreatIntelligenceResourceKind.class) +@JsonTypeName("ThreatIntelligenceResourceKind") +@JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModelForRequestBody.class)}) +@Immutable public class ThreatIntelligenceResourceKind { @JsonIgnore private final ClientLogger logger = new ClientLogger(ThreatIntelligenceResourceKind.class); - /* - * The kind of the entity. - */ - @JsonProperty(value = "kind", required = true) - private ThreatIntelligenceResourceKindEnum kind; - - /** - * Get the kind property: The kind of the entity. - * - * @return the kind value. - */ - public ThreatIntelligenceResourceKindEnum kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of the entity. - * - * @param kind the kind value to set. - * @return the ThreatIntelligenceResourceKind object itself. - */ - public ThreatIntelligenceResourceKind withKind(ThreatIntelligenceResourceKindEnum kind) { - this.kind = kind; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (kind() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kind in model ThreatIntelligenceResourceKind")); - } } } 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 new file mode 100644 index 0000000000000..529b810b97503 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java @@ -0,0 +1,34 @@ +// 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 Version. */ +public final class Version extends ExpandableStringEnum { + /** Static value V1 for Version. */ + public static final Version V1 = fromString("V1"); + + /** Static value V2 for Version. */ + public static final Version V2 = fromString("V2"); + + /** + * Creates or finds a Version from its string representation. + * + * @param name a name to look for. + * @return the corresponding Version. + */ + @JsonCreator + public static Version fromString(String name) { + return fromString(name, Version.class); + } + + /** @return known Version values. */ + public static Collection values() { + return values(Version.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java index e2985e7cf91bb..1550c5a3ae040 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlist.java @@ -70,11 +70,18 @@ public interface Watchlist { String provider(); /** - * Gets the source property: The source of the watchlist. + * Gets the source property: The filename of the watchlist, called 'source'. * * @return the source value. */ - Source source(); + String source(); + + /** + * Gets the sourceType property: The sourceType of the watchlist. + * + * @return the sourceType value. + */ + SourceType sourceType(); /** * Gets the created property: The time the watchlist was created. @@ -192,13 +199,6 @@ public interface Watchlist { */ String uploadStatus(); - /** - * Gets the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @return the watchlistItemsCount value. - */ - Integer watchlistItemsCount(); - /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner object. * @@ -236,6 +236,7 @@ interface WithCreate DefinitionStages.WithDisplayName, DefinitionStages.WithProvider, DefinitionStages.WithSource, + DefinitionStages.WithSourceType, DefinitionStages.WithCreated, DefinitionStages.WithUpdated, DefinitionStages.WithCreatedBy, @@ -251,8 +252,7 @@ interface WithCreate DefinitionStages.WithRawContent, DefinitionStages.WithItemsSearchKey, DefinitionStages.WithContentType, - DefinitionStages.WithUploadStatus, - DefinitionStages.WithWatchlistItemsCount { + DefinitionStages.WithUploadStatus { /** * Executes the create request. * @@ -311,12 +311,22 @@ interface WithProvider { /** The stage of the Watchlist definition allowing to specify source. */ interface WithSource { /** - * Specifies the source property: The source of the watchlist. + * Specifies the source property: The filename of the watchlist, called 'source'. * - * @param source The source of the watchlist. + * @param source The filename of the watchlist, called 'source'. * @return the next definition stage. */ - WithCreate withSource(Source source); + WithCreate withSource(String source); + } + /** The stage of the Watchlist definition allowing to specify sourceType. */ + interface WithSourceType { + /** + * Specifies the sourceType property: The sourceType of the watchlist. + * + * @param sourceType The sourceType of the watchlist. + * @return the next definition stage. + */ + WithCreate withSourceType(SourceType sourceType); } /** The stage of the Watchlist definition allowing to specify created. */ interface WithCreated { @@ -488,16 +498,6 @@ interface WithUploadStatus { */ WithCreate withUploadStatus(String uploadStatus); } - /** The stage of the Watchlist definition allowing to specify watchlistItemsCount. */ - interface WithWatchlistItemsCount { - /** - * Specifies the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount The number of Watchlist Items in the Watchlist. - * @return the next definition stage. - */ - WithCreate withWatchlistItemsCount(Integer watchlistItemsCount); - } } /** * Begins update for the Watchlist resource. @@ -513,6 +513,7 @@ interface Update UpdateStages.WithDisplayName, UpdateStages.WithProvider, UpdateStages.WithSource, + UpdateStages.WithSourceType, UpdateStages.WithCreated, UpdateStages.WithUpdated, UpdateStages.WithCreatedBy, @@ -528,8 +529,7 @@ interface Update UpdateStages.WithRawContent, UpdateStages.WithItemsSearchKey, UpdateStages.WithContentType, - UpdateStages.WithUploadStatus, - UpdateStages.WithWatchlistItemsCount { + UpdateStages.WithUploadStatus { /** * Executes the update request. * @@ -590,12 +590,22 @@ interface WithProvider { /** The stage of the Watchlist update allowing to specify source. */ interface WithSource { /** - * Specifies the source property: The source of the watchlist. + * Specifies the source property: The filename of the watchlist, called 'source'. + * + * @param source The filename of the watchlist, called 'source'. + * @return the next definition stage. + */ + Update withSource(String source); + } + /** The stage of the Watchlist update allowing to specify sourceType. */ + interface WithSourceType { + /** + * Specifies the sourceType property: The sourceType of the watchlist. * - * @param source The source of the watchlist. + * @param sourceType The sourceType of the watchlist. * @return the next definition stage. */ - Update withSource(Source source); + Update withSourceType(SourceType sourceType); } /** The stage of the Watchlist update allowing to specify created. */ interface WithCreated { @@ -767,16 +777,6 @@ interface WithUploadStatus { */ Update withUploadStatus(String uploadStatus); } - /** The stage of the Watchlist update allowing to specify watchlistItemsCount. */ - interface WithWatchlistItemsCount { - /** - * Specifies the watchlistItemsCount property: The number of Watchlist Items in the Watchlist. - * - * @param watchlistItemsCount The number of Watchlist Items in the Watchlist. - * @return the next definition stage. - */ - Update withWatchlistItemsCount(Integer watchlistItemsCount); - } } /** * Refreshes the resource to sync with Azure. 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 75c549d075faf..9b56cdba24034 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 @@ -19,7 +19,7 @@ public interface WatchlistItems { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); @@ -29,14 +29,17 @@ public interface WatchlistItems { * @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 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 watchlist Items. + * @return all watchlist Items as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. 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 36da96c6514b9..4e53d746f0644 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 @@ -18,7 +18,7 @@ public interface Watchlists { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); @@ -27,13 +27,16 @@ public interface Watchlists { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @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 watchlists, without watchlist items. + * @return all watchlists, without watchlist items as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skipToken, Context context); /** * Gets a watchlist, without its watchlist items. @@ -85,9 +88,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 the {@link Response}. + * @return the response. */ - Response deleteWithResponse( + WatchlistsDeleteResponse deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** @@ -131,9 +134,9 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. + * @return the response. */ - Response deleteByIdWithResponse(String id, Context context); + WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new Watchlist resource. 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 new file mode 100644 index 0000000000000..120d74802c62c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WatchlistsCreateOrUpdateHeaders model. */ +@Fluent +public final class WatchlistsCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistsCreateOrUpdateHeaders.class); + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the WatchlistsCreateOrUpdateHeaders object itself. + */ + public WatchlistsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + 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/WatchlistsCreateOrUpdateResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java new file mode 100644 index 0000000000000..f2d7e37321939 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// 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.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class WatchlistsCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of WatchlistsCreateOrUpdateResponse. + * + * @param request the request which resulted in this WatchlistsCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public WatchlistsCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + WatchlistInner value, + WatchlistsCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public WatchlistInner getValue() { + return super.getValue(); + } +} 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 new file mode 100644 index 0000000000000..72277415ae328 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The WatchlistsDeleteHeaders model. */ +@Fluent +public final class WatchlistsDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WatchlistsDeleteHeaders.class); + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the WatchlistsDeleteHeaders object itself. + */ + public WatchlistsDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + 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/WatchlistsDeleteResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java new file mode 100644 index 0000000000000..5315f66e3e280 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java @@ -0,0 +1,26 @@ +// 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.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class WatchlistsDeleteResponse extends ResponseBase { + /** + * Creates an instance of WatchlistsDeleteResponse. + * + * @param request the request which resulted in this WatchlistsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public WatchlistsDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, WatchlistsDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} 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 new file mode 100644 index 0000000000000..cf6541713e2a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java @@ -0,0 +1,128 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Detail about the webhook object. */ +@Fluent +public final class Webhook { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Webhook.class); + + /* + * Unique identifier for the webhook. + */ + @JsonProperty(value = "webhookId") + private String webhookId; + + /* + * URL that gets invoked by the webhook. + */ + @JsonProperty(value = "webhookUrl") + private String webhookUrl; + + /* + * Time when the webhook secret was updated. + */ + @JsonProperty(value = "webhookSecretUpdateTime") + private String webhookSecretUpdateTime; + + /* + * A flag to instruct the backend service to rotate webhook secret. + */ + @JsonProperty(value = "rotateWebhookSecret") + private Boolean rotateWebhookSecret; + + /** + * Get the webhookId property: Unique identifier for the webhook. + * + * @return the webhookId value. + */ + public String webhookId() { + return this.webhookId; + } + + /** + * Set the webhookId property: Unique identifier for the webhook. + * + * @param webhookId the webhookId value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookId(String webhookId) { + this.webhookId = webhookId; + return this; + } + + /** + * Get the webhookUrl property: URL that gets invoked by the webhook. + * + * @return the webhookUrl value. + */ + public String webhookUrl() { + return this.webhookUrl; + } + + /** + * Set the webhookUrl property: URL that gets invoked by the webhook. + * + * @param webhookUrl the webhookUrl value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookUrl(String webhookUrl) { + this.webhookUrl = webhookUrl; + return this; + } + + /** + * Get the webhookSecretUpdateTime property: Time when the webhook secret was updated. + * + * @return the webhookSecretUpdateTime value. + */ + public String webhookSecretUpdateTime() { + return this.webhookSecretUpdateTime; + } + + /** + * Set the webhookSecretUpdateTime property: Time when the webhook secret was updated. + * + * @param webhookSecretUpdateTime the webhookSecretUpdateTime value to set. + * @return the Webhook object itself. + */ + public Webhook withWebhookSecretUpdateTime(String webhookSecretUpdateTime) { + this.webhookSecretUpdateTime = webhookSecretUpdateTime; + return this; + } + + /** + * Get the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. + * + * @return the rotateWebhookSecret value. + */ + public Boolean rotateWebhookSecret() { + return this.rotateWebhookSecret; + } + + /** + * Set the rotateWebhookSecret property: A flag to instruct the backend service to rotate webhook secret. + * + * @param rotateWebhookSecret the rotateWebhookSecret value to set. + * @return the Webhook object itself. + */ + public Webhook withRotateWebhookSecret(Boolean rotateWebhookSecret) { + this.rotateWebhookSecret = rotateWebhookSecret; + 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/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 5331bf7fb59b8..9b3b6f9b94a03 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/2021-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-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 f3de864cb2b0f..664e59d5f56e2 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 @@ -9,7 +9,7 @@ /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. 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 7159d8d8dfa26..aee547a158eb8 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 @@ -9,7 +9,7 @@ /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. 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 e19b60830ad07..5e7312fe95eed 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 @@ -9,7 +9,7 @@ /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. 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 02649f24bad0a..7333e5c10f4a6 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 @@ -9,7 +9,7 @@ /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. 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 684b9d9bad04c..8e2e50df2bf90 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 @@ -9,7 +9,7 @@ /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. 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 b4b2045677ab3..ad16daa915d4a 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 @@ -15,6 +15,10 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.FieldMapping; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSettings; +import com.azure.resourcemanager.securityinsights.models.FusionSourceSubTypeSetting; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFilter; +import com.azure.resourcemanager.securityinsights.models.FusionSubTypeSeverityFiltersItem; import com.azure.resourcemanager.securityinsights.models.GroupingConfiguration; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.MatchingMethod; @@ -31,7 +35,7 @@ /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -49,12 +53,212 @@ public static void createsOrUpdatesAFusionAlertRule( new FusionAlertRule() .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") - .withEnabled(true), + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -78,7 +282,7 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -96,13 +300,12 @@ public static void createsOrUpdatesAScheduledAlertRule( new ScheduledAlertRule() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDescription("An example for a scheduled rule") - .withQuery("Heartbeat") .withDisplayName("My scheduled rule") .withEnabled(true) .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) - .withSeverity(AlertSeverity.HIGH) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -116,6 +319,14 @@ public static void createsOrUpdatesAScheduledAlertRule( .withGroupByAlertDetails(Arrays.asList(AlertDetail.DISPLAY_NAME)) .withGroupByCustomDetails( Arrays.asList("OperatingSystemType", "OperatingSystemName")))) + .withQuery("Heartbeat") + .withQueryFrequency(Duration.parse("PT1H")) + .withQueryPeriod(Duration.parse("P2DT1H30M")) + .withSeverity(AlertSeverity.HIGH) + .withTriggerOperator(TriggerOperator.GREATER_THAN) + .withTriggerThreshold(0) + .withEventGroupingSettings( + new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)) .withCustomDetails(mapOf("OperatingSystemName", "OSName", "OperatingSystemType", "OSType")) .withEntityMappings( Arrays @@ -139,18 +350,235 @@ public static void createsOrUpdatesAScheduledAlertRule( .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")) - .withQueryFrequency(Duration.parse("PT1H")) - .withQueryPeriod(Duration.parse("P2DT1H30M")) - .withTriggerOperator(TriggerOperator.GREATER_THAN) - .withTriggerThreshold(0) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + */ + /** + * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRules() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "myFirstFusionRule", + new FusionAlertRule() + .withEtag("3d00c3ca-0000-0100-0000-5d42d5010000") + .withAlertRuleTemplateName("f71aba3d-28fb-450b-b192-4e76a83015c8") + .withEnabled(true) + .withSourceSettings( + Arrays + .asList( + new FusionSourceSettings().withEnabled(true).withSourceName("Anomalies"), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Alert providers") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Active Directory Identity Protection") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Defender for IoT") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft 365 Defender") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Cloud App Security") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Endpoint") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Identity") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Microsoft Defender for Office 365") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))), + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Azure Sentinel scheduled analytics rules") + .withSeverityFilters( + new FusionSubTypeSeverityFilter() + .withFilters( + Arrays + .asList( + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.HIGH) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.MEDIUM) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.LOW) + .withEnabled(true), + new FusionSubTypeSeverityFiltersItem() + .withSeverity(AlertSeverity.INFORMATIONAL) + .withEnabled(true)))))), + new FusionSourceSettings() + .withEnabled(true) + .withSourceName("Raw logs from other sources") + .withSourceSubTypes( + Arrays + .asList( + new FusionSourceSubTypeSetting() + .withEnabled(true) + .withSourceSubTypeName("Palo Alto Networks") + .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -165,7 +593,30 @@ public static void createsOrUpdatesANrtAlertRule( "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new NrtAlertRule().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), + new NrtAlertRule() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDescription("") + .withQuery( + "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity =" + + " ComputerIP_Hidden") + .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) + .withTechniques(Arrays.asList("T1037", "T1021")) + .withDisplayName("Rule2") + .withEnabled(true) + .withSuppressionDuration(Duration.parse("PT1H")) + .withSuppressionEnabled(false) + .withSeverity(AlertSeverity.HIGH) + .withIncidentConfiguration( + new IncidentConfiguration() + .withCreateIncident(true) + .withGroupingConfiguration( + new GroupingConfiguration() + .withEnabled(true) + .withReopenClosedIncident(false) + .withLookbackDuration(Duration.parse("PT5H")) + .withMatchingMethod(MatchingMethod.SELECTED) + .withGroupByEntities( + Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))), Context.NONE); } 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 8dc6795efc23e..e431574c3126d 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 @@ -9,7 +9,7 @@ /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. 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 98757b0e0166f..909076889916e 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 @@ -9,7 +9,7 @@ /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -24,7 +24,7 @@ public static void getAScheduledAlertRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -38,7 +38,7 @@ public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -50,7 +50,7 @@ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsight } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. 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 3fa0cf6f4aca3..33998a96d87a6 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 @@ -9,7 +9,7 @@ /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. 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 ac7611d840675..34574b9efdfc2 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 @@ -4,74 +4,30 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleModifyPropertiesActionConfiguration; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedOperator; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyConditionSupportedProperty; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesCondition; -import com.azure.resourcemanager.securityinsights.models.AutomationRulePropertyValuesConditionProperties; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookAction; -import com.azure.resourcemanager.securityinsights.models.AutomationRuleRunPlaybookActionConfiguration; +import com.azure.resourcemanager.securityinsights.models.AutomationRuleAction; import com.azure.resourcemanager.securityinsights.models.AutomationRuleTriggeringLogic; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.TriggersOn; -import com.azure.resourcemanager.securityinsights.models.TriggersWhen; -import java.util.Arrays; +import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/CreateAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an automation rule. + * Sample code: AutomationRules_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnAutomationRule( + public static void automationRulesCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("High severity incidents escalation") - .withOrder(1) - .withTriggeringLogic( - new AutomationRuleTriggeringLogic() - .withIsEnabled(true) - .withTriggersOn(TriggersOn.INCIDENTS) - .withTriggersWhen(TriggersWhen.CREATED) - .withConditions( - Arrays - .asList( - new AutomationRulePropertyValuesCondition() - .withConditionProperties( - new AutomationRulePropertyValuesConditionProperties() - .withPropertyName( - AutomationRulePropertyConditionSupportedProperty - .INCIDENT_RELATED_ANALYTIC_RULE_IDS) - .withOperator(AutomationRulePropertyConditionSupportedOperator.CONTAINS) - .withPropertyValues( - Arrays - .asList( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/fab3d2d4-747f-46a7-8ef0-9c0be8112bf7", - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/8deb8303-e94d-46ff-96e0-5fd94b33df1a")))))) - .withActions( - Arrays - .asList( - new AutomationRuleModifyPropertiesAction() - .withOrder(1) - .withActionConfiguration( - new AutomationRuleModifyPropertiesActionConfiguration() - .withSeverity(IncidentSeverity.HIGH)), - new AutomationRuleRunPlaybookAction() - .withOrder(2) - .withActionConfiguration( - new AutomationRuleRunPlaybookActionConfiguration() - .withLogicAppResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.Logic/workflows/IncidentPlaybook") - .withTenantId("ee48efaf-50c6-411b-9345-b2bdc3eb4abc")))) + .withDisplayName((String) null) + .withOrder((int) null) + .withTriggeringLogic((AutomationRuleTriggeringLogic) null) + .withActions((List) null) .create(); } } 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 3756449b5c83c..c44015208a9fb 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 @@ -9,14 +9,14 @@ /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/DeleteAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** - * Sample code: Delete an automation rule. + * Sample code: AutomationRules_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnAutomationRule( + public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() 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 b8b8dc007837e..c6bd71efc5312 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 @@ -9,14 +9,14 @@ /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAutomationRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_Get.json */ /** - * Sample code: Get an automation rule. + * Sample code: AutomationRules_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAutomationRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", 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 4ff1ab5a10d96..8c26f033fc245 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 @@ -9,15 +9,14 @@ /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/automationRules/GetAllAutomationRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/automationRules/AutomationRules_List.json */ /** - * Sample code: Get all automation rules. + * Sample code: AutomationRules_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllAutomationRules( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager.automationRules().list("myRg", "myWorkspace", 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 cdb689203566a..2ec2050fa5a9d 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 @@ -12,7 +12,7 @@ /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. 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 fd46e00f39e9a..d4f54f2c9d7fc 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/2021-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-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 b4f421d01b010..1a7bcad864abf 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 @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. 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 31e4a038d1120..95b702dc34313 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 @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. 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 edeb03bd2e19a..9c14ed2e45a64 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 @@ -9,7 +9,7 @@ /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. 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 ef4cffc2bf289..561a9faf81ad0 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 @@ -4,6 +4,9 @@ package com.azure.resourcemanager.securityinsights.generated; +import com.azure.resourcemanager.securityinsights.models.AttackTactic; +import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; +import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; import java.util.Arrays; @@ -12,7 +15,7 @@ /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -35,6 +38,19 @@ public static void createsOrUpdatesABookmark( .withQueryResult("Security Event query result") .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) .withUpdatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) + .withEntityMappings( + Arrays + .asList( + new BookmarkEntityMappings() + .withEntityType("Account") + .withFieldMappings( + Arrays + .asList( + new EntityFieldMapping() + .withIdentifier("Fullname") + .withValue("johndoe@microsoft.com"))))) + .withTactics(Arrays.asList(AttackTactic.EXECUTION)) + .withTechniques(Arrays.asList("T1609")) .create(); } } 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 50580df23e738..8854a9ff16624 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 @@ -9,7 +9,7 @@ /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. 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 e22bc00ecc3d3..ad247f39ec725 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 @@ -9,7 +9,7 @@ /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. 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 277c62f351966..d367e0c771813 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 @@ -9,7 +9,7 @@ /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. 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 16118bccbc4c3..d8f2fefb10fd7 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 @@ -8,18 +8,21 @@ 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.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeAtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.OfficeIrmCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TICheckRequirements; import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirements; /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -34,7 +37,22 @@ public static void checkRequirementsForOfficeATP( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + */ + /** + * Sample code: Check requirements for Office365Project. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOffice365Project( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -49,7 +67,7 @@ public static void checkRequirementsForAAD( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -64,7 +82,26 @@ public static void checkRequirementsForMcas( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + */ + /** + * Sample code: Check requirements for IoT. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForIoT( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -79,7 +116,7 @@ public static void checkRequirementsForMdatp( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -94,7 +131,7 @@ public static void checkRequirementsForAADNoAuthorization( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -113,7 +150,7 @@ public static void checkRequirementsForASC( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -128,7 +165,7 @@ public static void checkRequirementsForMicrosoftThreatProtection( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -143,7 +180,7 @@ public static void checkRequirementsForTITaxii( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -158,7 +195,7 @@ public static void checkRequirementsForOfficeIRM( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -173,7 +210,22 @@ public static void checkRequirementsForMicrosoftThreatIntelligence( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + */ + /** + * Sample code: Check requirements for OfficePowerBI. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForOfficePowerBI( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -188,7 +240,7 @@ public static void checkRequirementsForDynamics365( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -203,7 +255,7 @@ public static void checkRequirementsForAADNoLicense( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. 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 262274338c03e..dc79db4c403e3 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 @@ -15,7 +15,7 @@ /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. 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 b386a213fa65c..476d8177c2c0e 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 @@ -28,11 +28,17 @@ 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.Office365ProjectConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnector; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesExchange; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesSharePoint; import com.azure.resourcemanager.securityinsights.models.OfficeDataConnectorDataTypesTeams; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.OfficePowerBIDataConnector; import com.azure.resourcemanager.securityinsights.models.PermissionProviderScope; import com.azure.resourcemanager.securityinsights.models.Permissions; import com.azure.resourcemanager.securityinsights.models.PermissionsCustomsItem; @@ -54,7 +60,7 @@ /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -82,7 +88,32 @@ public static void createsOrUpdatesAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + */ + /** + * Sample code: Creates or updates an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficePowerBIDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new OfficePowerBIConnectorDataTypes() + .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -116,7 +147,7 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -141,7 +172,7 @@ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -168,7 +199,7 @@ public static void createsOrUpdatesADynamics365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -488,7 +519,32 @@ public static void createsOrUpdatesAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Creates or updates an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new Office365ProjectDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new Office365ProjectConnectorDataTypes() + .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. 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 966b1e1f7eaaf..eda55ed89f74f 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 @@ -9,7 +9,22 @@ /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + */ + /** + * Sample code: Delete an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -24,7 +39,7 @@ public static void deleteAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -39,7 +54,22 @@ public static void deleteAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + */ + /** + * Sample code: Delete an Office PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnOfficePowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. 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 e7c222afd42e8..c78b8bbcfbf90 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 @@ -9,7 +9,7 @@ /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. 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 904feb8181a07..43d8115babf9f 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 @@ -9,7 +9,22 @@ /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + */ + /** + * Sample code: Get an Office365 Project data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365ProjectDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -24,14 +39,14 @@ public static void getAGenericUIDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office ATP data connector. + * Sample code: Get an Office ATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeATPDataConnector( + public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() @@ -39,7 +54,22 @@ public static void getAOfficeATPDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetIoTById.json + */ + /** + * Sample code: Get a IoT data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAIoTDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -54,7 +84,7 @@ public static void getAMCASDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -69,7 +99,7 @@ public static void getATITaxiiDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -84,7 +114,7 @@ public static void getAMicrosoftThreatIntelligenceDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -99,7 +129,7 @@ public static void getAASCDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -113,7 +143,7 @@ public static void getATIDataConnector(com.azure.resourcemanager.securityinsight } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -128,7 +158,7 @@ public static void getAnAwsCloudTrailDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -143,7 +173,7 @@ public static void getAMDATPDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -158,7 +188,7 @@ public static void getAMicrosoftThreatProtectionDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -173,52 +203,52 @@ public static void getAnAADDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get a Office IRM data connector. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAOfficeIRMDataConnector( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** - * Sample code: Get an AATP data connector. + * Sample code: Get a APIPolling data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAATPDataConnector( + public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** - * Sample code: Get a APIPolling data connector. + * Sample code: Get an Office IRM data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAAPIPollingDataConnector( + public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -233,7 +263,7 @@ public static void getADynamics365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -248,7 +278,7 @@ public static void getAnOffice365DataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -261,4 +291,19 @@ public static void getAnAwsS3DataConnector( .dataConnectors() .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + */ + /** + * Sample code: Get an Office365 PowerBI data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAnOffice365PowerBIDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", 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 8e975b6cd6838..fcb8197a8c3c3 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 @@ -9,7 +9,7 @@ /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. 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 4d6a44dba946d..49c61d2fba0ee 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 @@ -9,7 +9,7 @@ /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. 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 3a424ef176f13..cae025be116ed 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 @@ -12,7 +12,7 @@ /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. 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 5a386b78ca17d..2ee4be9116f10 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 @@ -13,7 +13,7 @@ /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. 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 9f199b6267dd1..32e99a5435209 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 @@ -9,7 +9,7 @@ /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -22,7 +22,7 @@ public static void getASubmissionMailEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -34,7 +34,7 @@ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -46,7 +46,7 @@ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -59,7 +59,7 @@ public static void getAnIoTDeviceEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -72,7 +72,7 @@ public static void getARegistryKeyEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -84,7 +84,7 @@ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -96,7 +96,7 @@ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights. } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -109,7 +109,7 @@ public static void getASecurityAlertEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -121,7 +121,7 @@ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -133,7 +133,7 @@ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -146,7 +146,7 @@ public static void getACloudApplicationEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -158,7 +158,7 @@ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -171,7 +171,7 @@ public static void getARegistryValueEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -183,7 +183,7 @@ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.Secu } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -196,7 +196,7 @@ public static void getAMailClusterEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -209,7 +209,7 @@ public static void getASecurityGroupEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -222,7 +222,7 @@ public static void getAMailMessageEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -235,7 +235,7 @@ public static void getAnAzureResourceEntity( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -247,7 +247,7 @@ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. 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 1c23634f7b015..b80ff8f36f56b 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 @@ -11,7 +11,7 @@ /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. 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 244186529593c..35f906a7b8ddd 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 @@ -9,7 +9,7 @@ /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. 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 19392ede62477..83346ff69d589 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 @@ -10,7 +10,7 @@ /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. 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 05c15b6fe4eba..e31e324573d13 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 @@ -9,7 +9,7 @@ /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. 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 b50cd3e5936ca..0562e9cfc1d3f 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 @@ -15,7 +15,7 @@ /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. 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 b0ebc88079221..4baec20eb107e 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 @@ -9,7 +9,7 @@ /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. 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 91fe2c9f36d3b..91a7de848601e 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 @@ -9,7 +9,7 @@ /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -24,7 +24,7 @@ public static void getAnActivityEntityQuery( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. 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 ef4c72ff84eb6..4829a401c4f84 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 @@ -10,7 +10,7 @@ /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. 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 5f4b9c3ecc61f..41329bae9ce70 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 @@ -9,7 +9,7 @@ /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. 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 0236af125a466..7f74d931673e4 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 @@ -5,12 +5,12 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant69; +import com.azure.resourcemanager.securityinsights.models.Constant73; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -19,6 +19,6 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant69.ACTIVITY, Context.NONE); + manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant73.ACTIVITY, 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 c60685eeaa1fe..967e2a1f85716 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 @@ -9,7 +9,7 @@ /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. 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 18363206a35f8..dcdc60f0d59c3 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,7 +7,7 @@ /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/CreateIncidentComment.json */ /** * Sample code: Creates or updates an incident comment. 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 90102df9cb50e..a2c22acddfa3f 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 @@ -9,7 +9,7 @@ /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. 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 6e65461101f54..f92d7671ddd2a 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 @@ -9,7 +9,7 @@ /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. 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 89ca41cc82de0..dd5db23d3b660 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 @@ -9,7 +9,7 @@ /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. 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 dda5fd5e067b9..e4dbe55e64525 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 @@ -10,7 +10,7 @@ /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. 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 4e50610251a34..0b2685360afbb 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 @@ -9,7 +9,7 @@ /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. 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 a7237d9e1adc2..9a56036b3591c 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 @@ -9,7 +9,7 @@ /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. 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 97abf23d557c4..af1559bca5821 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 @@ -9,7 +9,7 @@ /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. 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 1e178ad784973..1e61c295838c9 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,7 +15,7 @@ /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateIncident.json */ /** * Sample code: Creates or updates an incident. 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 42bae288113f0..9f51ac1f47b85 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 @@ -10,7 +10,7 @@ /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/CreateTeam.json */ /** * Sample code: Creates incident teams group. 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 69b48ede0c6ff..352c7fdb00bf2 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 @@ -9,7 +9,7 @@ /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. 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 6e4950e0e5da4..65e0538114ec9 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 @@ -9,7 +9,7 @@ /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. 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 1d641b6ef9f32..f231dada3cfc9 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 @@ -9,7 +9,7 @@ /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentAlerts.json */ /** * Sample code: Get all incident alerts. 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 4866c7178b395..83e761052964f 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 @@ -9,7 +9,7 @@ /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetAllIncidentBookmarks.json */ /** * Sample code: Get all incident bookmarks. 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 5917f8a4af6c3..80746978d424b 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 @@ -9,7 +9,7 @@ /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/entities/GetAllIncidentEntities.json */ /** * Sample code: Gets all incident related entities. 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 3fd7022bb85ff..33565f2be12f6 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 @@ -9,7 +9,7 @@ /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. 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 new file mode 100644 index 0000000000000..b37626638809e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.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.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-01-01-preview/examples/manualTrigger/AutomationRules_ManualTriggerPlaybook.json + */ + /** + * Sample code: AutomationRules_ManualTriggerPlaybook. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void automationRulesManualTriggerPlaybook( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, 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 2993b19987e48..af5231a560af8 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 @@ -9,7 +9,7 @@ /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. 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 25f1439922bd9..b3d023892ffaa 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 @@ -19,7 +19,7 @@ /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -85,11 +85,17 @@ public static void createUpdateFullMetadata( .withProviders(Arrays.asList("Amazon", "Microsoft")) .withFirstPublishDate(LocalDate.parse("2021-05-18")) .withLastPublishDate(LocalDate.parse("2021-05-18")) + .withCustomVersion("1.0") + .withContentSchemaVersion("2.0") + .withThreatAnalysisTactics(Arrays.asList("reconnaissance", "commandandcontrol")) + .withThreatAnalysisTechniques(Arrays.asList("T1548", "T1548.001")) + .withPreviewImages(Arrays.asList("firstImage.png", "secondImage.jpeg")) + .withPreviewImagesDark(Arrays.asList("firstImageDark.png", "secondImageDark.jpeg")) .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. 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 6dd1e0a62f6b2..e7528c2f90345 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 @@ -9,7 +9,7 @@ /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. 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 8a1e5f02348bc..b24c97efb6b80 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 @@ -9,7 +9,7 @@ /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. 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 f61a7bf45c27d..803804034850b 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 @@ -9,7 +9,7 @@ /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -21,7 +21,7 @@ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.Sec } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. 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 c6839610fe8e9..32fa0735719ea 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 @@ -11,7 +11,7 @@ /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. 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 c49455b51be60..11a9c9492899d 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 @@ -9,7 +9,7 @@ /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. 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 3e6551d94b19f..d7aed106d4723 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 @@ -9,7 +9,7 @@ /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. 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 aeaebafce4ea5..8e7cbbb5a7ed3 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 @@ -9,7 +9,7 @@ /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. 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 new file mode 100644 index 0000000000000..bed648054f30b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.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; + +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-01-01-preview/examples/operations/ListOperations.json + */ + /** + * Sample code: Get all operations. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.operations().list(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 9cb4fdf524084..a3787b334bdbf 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 @@ -9,7 +9,7 @@ /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. 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 bd20095f5c6cd..27a8fe8489c0f 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 @@ -9,7 +9,7 @@ /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. 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 3ef3cd84cdc6e..d7b73a4335912 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 @@ -9,7 +9,7 @@ /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. 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 1c58f5a799401..b4468a884a732 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 @@ -10,7 +10,7 @@ /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. 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 1b23448977d0b..b9650dcbc4c04 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/2021-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-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 3bdc04f8f8a3a..c958ffaf69030 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 @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. 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 7f039b362acce..df3c9c84d0b64 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 @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. 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 cd12b77a568d4..680c0cb4a0117 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 @@ -9,7 +9,7 @@ /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. 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 94b21485bb0aa..c4d993f2e1000 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 @@ -10,7 +10,7 @@ /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. 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 835128803956d..7adef0fd6e21d 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/2021-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-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 1396806d72a49..fc6b52d604531 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 @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. 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 4361a8dd0f868..b3220a447ee0e 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 @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. 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 80381ef459675..faccc304e42a7 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 @@ -9,7 +9,7 @@ /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. 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 9749bc270173b..d10b1d5e0e53b 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 @@ -11,7 +11,7 @@ /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. 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 4bb2ca256524c..42a46b29e78f0 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 @@ -6,13 +6,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -27,7 +26,6 @@ public static void createANewThreatIntelligence( "myRg", "myWorkspace", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") 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 29f6e3bb7a5f5..0504908d9e534 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 @@ -6,13 +6,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -28,7 +27,6 @@ public static void updateAThreatIntelligenceIndicator( "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withThreatIntelligenceTags(Arrays.asList("new schema")) .withSource("Azure Sentinel") .withDisplayName("new schema") 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 3390496ddde36..3b537f0efa463 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 @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. 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 32de3f040f1c1..80a6234ee5de0 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 @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. 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 bb65f1330542f..e3181145425c5 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 @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. 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 c596ee8d3efda..451fbf767a725 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 @@ -13,7 +13,7 @@ /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. 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 1d69de18fcfa9..e9a8579fbd13e 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 @@ -6,13 +6,12 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModelForRequestBody; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceResourceKindEnum; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -28,7 +27,6 @@ public static void replaceTagsToAThreatIntelligence( "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceIndicatorModelForRequestBody() - .withKind(ThreatIntelligenceResourceKindEnum.INDICATOR) .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), 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 92a575f59541c..6ca8bd43c54de 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 @@ -9,7 +9,7 @@ /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. 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 3f661f4e25306..8744456435dd9 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 @@ -11,7 +11,7 @@ /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-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 3af2a66b80405..f347da736b8ad 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 @@ -9,7 +9,7 @@ /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. 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 febc5d6875e52..f2dbd09792455 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 @@ -9,7 +9,7 @@ /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. 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 311a49ce91218..cb96e8310cacd 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 @@ -9,7 +9,7 @@ /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -18,6 +18,6 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, 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 da86ccd857781..c4ec3de133eb5 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 @@ -4,12 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.Source; +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/2021-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -25,7 +25,8 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withNumberOfLinesToSkip(1) .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") @@ -35,7 +36,7 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -51,7 +52,8 @@ public static void createsOrUpdatesAWatchlist( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource(Source.LOCAL_FILE) + .withSource("watchlist.csv") + .withSourceType(SourceType.LOCAL_FILE) .withDescription("Watchlist from CSV content") .withItemsSearchKey("header1") .create(); 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 db8514012dd00..0da4b6a0ef128 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 @@ -9,7 +9,7 @@ /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. 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 27f293170fddc..62a3c7de6073a 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 @@ -9,7 +9,7 @@ /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. 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 a058a896ab86d..a80168d01c398 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 @@ -9,7 +9,7 @@ /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-01-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -17,6 +17,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", Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); } }