diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 51d1f53d4466..f9a961dd2e79 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2022-10-04) + +- 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-2022-11. 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 be7cd5eb6b9e..d9c3ff9daeee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SecurityInsights client library for Java. -This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-2022-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-securityinsights - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md index dec6f55e9756..7fe12a177a3e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md @@ -27,17 +27,6 @@ - [Get](#automationrules_get) - [List](#automationrules_list) -## BookmarkOperation - -- [Expand](#bookmarkoperation_expand) - -## BookmarkRelations - -- [CreateOrUpdate](#bookmarkrelations_createorupdate) -- [Delete](#bookmarkrelations_delete) -- [Get](#bookmarkrelations_get) -- [List](#bookmarkrelations_list) - ## Bookmarks - [CreateOrUpdate](#bookmarks_createorupdate) @@ -47,60 +36,11 @@ ## DataConnectors -- [Connect](#dataconnectors_connect) - [CreateOrUpdate](#dataconnectors_createorupdate) - [Delete](#dataconnectors_delete) -- [Disconnect](#dataconnectors_disconnect) - [Get](#dataconnectors_get) - [List](#dataconnectors_list) -## DataConnectorsCheckRequirementsOperation - -- [Post](#dataconnectorscheckrequirementsoperation_post) - -## DomainWhois - -- [Get](#domainwhois_get) - -## Entities - -- [Expand](#entities_expand) -- [Get](#entities_get) -- [GetInsights](#entities_getinsights) -- [List](#entities_list) -- [Queries](#entities_queries) - -## EntitiesGetTimeline - -- [List](#entitiesgettimeline_list) - -## EntitiesRelations - -- [List](#entitiesrelations_list) - -## EntityQueries - -- [CreateOrUpdate](#entityqueries_createorupdate) -- [Delete](#entityqueries_delete) -- [Get](#entityqueries_get) -- [List](#entityqueries_list) - -## EntityQueryTemplates - -- [Get](#entityquerytemplates_get) -- [List](#entityquerytemplates_list) - -## EntityRelations - -- [GetRelation](#entityrelations_getrelation) - -## FileImports - -- [Create](#fileimports_create) -- [Delete](#fileimports_delete) -- [Get](#fileimports_get) -- [List](#fileimports_list) - ## IncidentComments - [CreateOrUpdate](#incidentcomments_createorupdate) @@ -118,44 +58,17 @@ ## Incidents - [CreateOrUpdate](#incidents_createorupdate) -- [CreateTeam](#incidents_createteam) - [Delete](#incidents_delete) - [Get](#incidents_get) - [List](#incidents_list) - [ListAlerts](#incidents_listalerts) - [ListBookmarks](#incidents_listbookmarks) - [ListEntities](#incidents_listentities) -- [RunPlaybook](#incidents_runplaybook) - -## IpGeodata - -- [Get](#ipgeodata_get) - -## Metadata - -- [Create](#metadata_create) -- [Delete](#metadata_delete) -- [Get](#metadata_get) -- [List](#metadata_list) -- [Update](#metadata_update) - -## OfficeConsents - -- [Delete](#officeconsents_delete) -- [Get](#officeconsents_get) -- [List](#officeconsents_list) ## Operations - [List](#operations_list) -## ProductSettings - -- [Delete](#productsettings_delete) -- [Get](#productsettings_get) -- [List](#productsettings_list) -- [Update](#productsettings_update) - ## SecurityMLAnalyticsSettings - [CreateOrUpdate](#securitymlanalyticssettings_createorupdate) @@ -170,17 +83,6 @@ - [Get](#sentinelonboardingstates_get) - [List](#sentinelonboardingstates_list) -## SourceControl - -- [ListRepositories](#sourcecontrol_listrepositories) - -## SourceControlsOperation - -- [Create](#sourcecontrolsoperation_create) -- [Delete](#sourcecontrolsoperation_delete) -- [Get](#sourcecontrolsoperation_get) -- [List](#sourcecontrolsoperation_list) - ## ThreatIntelligenceIndicator - [AppendTags](#threatintelligenceindicator_appendtags) @@ -218,7 +120,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -249,7 +151,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/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -278,7 +180,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/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -307,7 +209,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/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -329,7 +231,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/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -353,7 +255,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/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -381,16 +283,11 @@ 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; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; @@ -401,7 +298,7 @@ import java.util.Map; /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -419,212 +316,12 @@ public final class AlertRulesCreateOrUpdateSamples { 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()))))), + .withEnabled(true), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -648,7 +345,7 @@ public final class AlertRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -671,7 +368,6 @@ public final class AlertRulesCreateOrUpdateSamples { .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) - .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -720,274 +416,6 @@ public final class AlertRulesCreateOrUpdateSamples { Context.NONE); } - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json - */ - /** - * Sample code: Creates or updates a Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesANrtAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - 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)))) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); - } - @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1009,7 +437,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/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -1032,7 +460,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/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -1047,21 +475,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json - */ - /** - * Sample code: Get an Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -1073,7 +487,7 @@ public final class AlertRulesGetSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -1097,7 +511,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/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -1120,7 +534,7 @@ import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. @@ -1150,7 +564,7 @@ import com.azure.core.util.Context; /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -1174,7 +588,7 @@ import com.azure.core.util.Context; /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -1197,7 +611,7 @@ import com.azure.core.util.Context; /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -1210,154 +624,9 @@ public final class AutomationRulesListSamples { } ``` -### BookmarkOperation_Expand - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for BookmarkOperation Expand. */ -public final class BookmarkOperationExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json - */ - /** - * Sample code: Expand an bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkOperations() - .expandWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new BookmarkExpandParameters() - .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) - .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) - .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); - } -} -``` - -### BookmarkRelations_CreateOrUpdate - -```java -/** Samples for BookmarkRelations CreateOrUpdate. */ -public final class BookmarkRelationsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json - */ - /** - * Sample code: Creates or updates a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") - .withExistingBookmark("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096") - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/afbd324f-6c48-459c-8710-8d1e1cd03812") - .create(); - } -} -``` - -### BookmarkRelations_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Delete. */ -public final class BookmarkRelationsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json - */ - /** - * Sample code: Delete the bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheBookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .deleteWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} -``` - -### BookmarkRelations_Get - -```java -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Get. */ -public final class BookmarkRelationsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json - */ - /** - * Sample code: Get a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .getWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} -``` - -### BookmarkRelations_List - -```java -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations List. */ -public final class BookmarkRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json - */ - /** - * Sample code: Get all bookmark relations. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllBookmarkRelations( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); - } -} -``` - ### 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; @@ -1366,7 +635,7 @@ import java.util.UUID; /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -1380,28 +649,15 @@ public final class BookmarksCreateOrUpdateSamples { .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withCreated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) + .withCreated(OffsetDateTime.parse("2019-01-01T13:15:30Z")) .withCreatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withDisplayName("My bookmark") .withLabels(Arrays.asList("Tag1", "Tag2")) .withNotes("Found a suspicious activity") .withQuery("SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)") .withQueryResult("Security Event query result") - .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) + .withUpdated(OffsetDateTime.parse("2019-01-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(); } } @@ -1415,7 +671,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/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -1438,7 +694,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/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1461,7 +717,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/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1474,771 +730,73 @@ public final class BookmarksListSamples { } ``` -### DataConnectors_Connect +### DataConnectors_CreateOrUpdate ```java -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; -import java.io.IOException; -import java.util.Arrays; +import com.azure.resourcemanager.securityinsights.models.DataTypeState; +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.TIDataConnector; +import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators; +import java.time.OffsetDateTime; -/** Samples for DataConnectors Connect. */ -public final class DataConnectorsConnectSamples { +/** Samples for DataConnectors CreateOrUpdate. */ +public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** - * Sample code: Connect an APIPolling V2 logs data connector. + * Sample code: Creates or updates an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void connectAnAPIPollingV2LogsDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { + public static void createsOrUpdatesAnOffice365DataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .connectWithResponse( + .createOrUpdateWithResponse( "myRg", "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("123456789") - .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") - .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") - .withOutputStream("Custom-MyTableRawData") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new OfficeDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8") + .withDataTypes( + new OfficeDataConnectorDataTypes() + .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) + .withSharePoint( + new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) + .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** - * Sample code: Connect an APIPolling data connector. + * Sample code: Creates or updates an Threat Intelligence Platform data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void connectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { + public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .connectWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("123456789") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), - Context.NONE); - } -} -``` - -### DataConnectors_CreateOrUpdate - -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.Availability; -import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; -import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingAuthProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingPagingProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingRequestProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingResponseProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesDataTypesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesGraphQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesInstructionStepsItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesSampleQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; -import com.azure.resourcemanager.securityinsights.models.ConnectivityType; -import com.azure.resourcemanager.securityinsights.models.DataTypeState; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; -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; -import com.azure.resourcemanager.securityinsights.models.PermissionsResourceProviderItem; -import com.azure.resourcemanager.securityinsights.models.PollingFrequency; -import com.azure.resourcemanager.securityinsights.models.ProviderName; -import com.azure.resourcemanager.securityinsights.models.RequiredPermissions; -import com.azure.resourcemanager.securityinsights.models.SettingType; -import com.azure.resourcemanager.securityinsights.models.TIDataConnector; -import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypesTaxiiClient; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; - -/** Samples for DataConnectors CreateOrUpdate. */ -public final class DataConnectorsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json - */ - /** - * Sample code: Creates or updates an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnOffice365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new OfficeDataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new OfficeDataConnectorDataTypes() - .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) - .withSharePoint( - new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) - .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json - */ - /** - * Sample code: Creates or updates a Threat Intelligence Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new TiTaxiiDataConnector() - .withEtag("d12423f6-a60b-4ca5-88c0-feb1a182d0f0") - .withWorkspaceId("dd124572-4962-4495-9bd2-9dade12314b4") - .withFriendlyName("testTaxii") - .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") - .withCollectionId("135") - .withUsername("--") - .withPassword("--") - .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) - .withPollingFrequency(PollingFrequency.ONCE_ADAY) - .withDataTypes( - new TiTaxiiDataConnectorDataTypes() - .withTaxiiClient( - new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json - */ - /** - * Sample code: Creates or updates an Threat Intelligence Platform data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( + .createOrUpdateWithResponse( "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", new TIDataConnector() + .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b") .withTipLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withDataTypes( new TIDataConnectorDataTypes() - .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json - */ - /** - * Sample code: Creates or updates a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "c2541efb-c9a6-47fe-9501-87d1017d1512", - new Dynamics365DataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new Dynamics365DataConnectorDataTypes() - .withDynamics365CdsActivities( - new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() - .withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json - */ - /** - * Sample code: Creates or updates a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessUiDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("Qualys Vulnerability Management (CCP DEMO)") - .withPublisher("Qualys") - .withDescriptionMarkdown( - "The [Qualys Vulnerability Management" - + " (VM)](https://www.qualys.com/apps/vulnerability-management/) data connector" - + " provides the capability to ingest vulnerability host detection data into Azure" - + " Sentinel through the Qualys API. The connector provides visibility into host" - + " detection data from vulerability scans. This connector provides Azure Sentinel" - + " the capability to view dashboards, create custom alerts, and improve" - + " investigation ") - .withGraphQueriesTableName("QualysHostDetection_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total data received") - .withLegend("{{graphQueriesTableName}}") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("Top 10 Vulerabilities detected") - .withQuery( - "{{graphQueriesTableName}}\n" - + " | mv-expand todynamic(Detections_s)\n" - + " | extend Vulnerability = tostring(Detections_s.Results)\n" - + " | summarize count() by Vulnerability\n" - + " | top 10 by count_"))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.IS_CONNECTED_QUERY) - .withValue( - Arrays - .asList( - "{{graphQueriesTableName}}\n" - + " | summarize LastLogReceived =" - + " max(TimeGenerated)\n" - + " | project IsConnected = LastLogReceived >" - + " ago(30d)")))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions on the workspace are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)), - new PermissionsResourceProviderItem() - .withProvider( - ProviderName - .MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS) - .withPermissionsDisplayText( - "read permissions to shared keys for the workspace are" - + " required. [See the documentation to learn more about" - + " workspace" - + " keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).") - .withProviderDisplayName("Keys") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions().withAction(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("Microsoft.Web/sites permissions") - .withDescription( - "Read and write permissions to Azure Functions to create a" - + " Function App is required. [See the documentation to" - + " learn more about Azure" - + " Functions](https://docs.microsoft.com/azure/azure-functions/)."), - new PermissionsCustomsItem() - .withName("Qualys API Key") - .withDescription( - "A Qualys VM API username and password is required. [See the" - + " documentation to learn more about Qualys VM" - + " API](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf).")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**NOTE:** This connector uses Azure Functions to connect to Qualys VM" - + " to pull its logs into Azure Sentinel. This might result in" - + " additional data ingestion costs. Check the [Azure Functions" - + " pricing" - + " page](https://azure.microsoft.com/pricing/details/functions/)" - + " for details."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**(Optional Step)** Securely store workspace and API authorization" - + " key(s) or token(s) in Azure Key Vault. Azure Key Vault provides" - + " a secure mechanism to store and retrieve key values. [Follow" - + " these" - + " instructions](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " to use Azure Key Vault with an Azure Function App."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 1 - Configuration steps for the Qualys VM API**\n\n" - + "1. Log into the Qualys Vulnerability Management console with an" - + " administrator account, select the **Users** tab and the" - + " **Users** subtab. \n" - + "2. Click on the **New** drop-down menu and select **Users..**\n" - + "3. Create a username and password for the API account. \n" - + "4. In the **User Roles** tab, ensure the account role is set to" - + " **Manager** and access is allowed to **GUI** and **API**\n" - + "4. Log out of the administrator account and log into the console" - + " with the new API credentials for validation, then log out of" - + " the API account. \n" - + "5. Log back into the console using an administrator account and" - + " modify the API accounts User Roles, removing access to **GUI**." - + " \n" - + "6. Save all changes."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 2 - Choose ONE from the following two deployment options to" - + " deploy the connector and the associated Azure Function**\n\n" - + ">**IMPORTANT:** Before deploying the Qualys VM connector, have" - + " the Workspace ID and Workspace Primary Key (can be copied from" - + " the following), as well as the Qualys VM API Authorization" - + " Key(s), readily available.") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"WorkspaceId\"],\"label\":\"Workspace" - + " ID\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL), - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"PrimaryKey\"],\"label\":\"Primary" - + " Key\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL))), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 1 - Azure Resource Manager (ARM) Template") - .withDescription( - "Use this method for automated deployment of the Qualys VM connector" - + " using an ARM Tempate.\n\n" - + "1. Click the **Deploy to Azure** button below. \n\n" - + "\t[![Deploy To" - + " Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinelqualysvmazuredeploy)\n" - + "2. Select the preferred **Subscription**, **Resource Group** and" - + " **Location**. \n" - + "3. Enter the **Workspace ID**, **Workspace Key**, **API" - + " Username**, **API Password** , update the **URI**, and any" - + " additional URI **Filter Parameters** (each filter should be" - + " separated by an \"&\" symbol, no spaces.) \n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format. \n" - + " - The default **Time Interval** is set to pull the last five" - + " (5) minutes of data. If the time interval needs to be modified," - + " it is recommended to change the Function App Timer Trigger" - + " accordingly (in the function.json file, post deployment) to" - + " prevent overlapping data ingestion. \n" - + "> - Note: If using Azure Key Vault secrets for any of the values" - + " above, use the`@Microsoft.KeyVault(SecretUri={Security" - + " Identifier})`schema in place of the string values. Refer to" - + " [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details. \n" - + "4. Mark the checkbox labeled **I agree to the terms and" - + " conditions stated above**. \n" - + "5. Click **Purchase** to deploy."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 2 - Manual Deployment of Azure Functions") - .withDescription( - "Use the following step-by-step instructions to deploy the Quayls VM" - + " connector manually with Azure Functions."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**1. Create a Function App**\n\n" - + "1. From the Azure Portal, navigate to [Function" - + " App](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp)," - + " and select **+ Add**.\n" - + "2. In the **Basics** tab, ensure Runtime stack is set to" - + " **Powershell Core**. \n" - + "3. In the **Hosting** tab, ensure the **Consumption" - + " (Serverless)** plan type is selected.\n" - + "4. Make other preferrable configuration changes, if needed, then" - + " click **Create**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**2. Import Function App Code**\n\n" - + "1. In the newly created Function App, select **Functions** on" - + " the left pane and click **+ New Function**.\n" - + "2. Select **Timer Trigger**.\n" - + "3. Enter a unique Function **Name** and leave the default cron" - + " schedule of every 5 minutes, then click **Create**.\n" - + "5. Click on **Code + Test** on the left pane. \n" - + "6. Copy the [Function App" - + " Code](https://aka.ms/sentinelqualysvmazurefunctioncode) and" - + " paste into the Function App `run.ps1` editor.\n" - + "7. Click **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**3. Configure the Function App**\n\n" - + "1. In the Function App, select the Function App Name and select" - + " **Configuration**.\n" - + "2. In the **Application settings** tab, select **+ New" - + " application setting**.\n" - + "3. Add each of the following seven (7) application settings" - + " individually, with their respective string values" - + " (case-sensitive): \n" - + "\t\tapiUsername\n" - + "\t\tapiPassword\n" - + "\t\tworkspaceID\n" - + "\t\tworkspaceKey\n" - + "\t\turi\n" - + "\t\tfilterParameters\n" - + "\t\ttimeInterval\n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)." - + " The `uri` value must follow the following schema: `https:///api/2.0/fo/asset/host/vm/detection/?action=list&vm_processed_after=`" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format.\n" - + "> - Add any additional filter parameters, for the" - + " `filterParameters` variable, that need to be appended to the" - + " URI. Each parameter should be seperated by an \"&\" symbol and" - + " should not include any spaces.\n" - + "> - Set the `timeInterval` (in minutes) to the value of `5` to" - + " correspond to the Timer Trigger of every `5` minutes. If the" - + " time interval needs to be modified, it is recommended to change" - + " the Function App Timer Trigger accordingly to prevent" - + " overlapping data ingestion.\n" - + "> - Note: If using Azure Key Vault, use" - + " the`@Microsoft.KeyVault(SecretUri={Security Identifier})`schema" - + " in place of the string values. Refer to [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details.\n" - + "4. Once all application settings have been entered, click" - + " **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**4. Configure the host.json**.\n\n" - + "Due to the potentially large amount of Qualys host detection" - + " data being ingested, it can cause the execution time to surpass" - + " the default Function App timeout of five (5) minutes. Increase" - + " the default timeout duration to the maximum of ten (10)" - + " minutes, under the Consumption Plan, to allow more time for the" - + " Function App to execute.\n\n" - + "1. In the Function App, select the Function App Name and select" - + " the **App Service Editor** blade.\n" - + "2. Click **Go** to open the editor, then select the" - + " **host.json** file under the **wwwroot** directory.\n" - + "3. Add the line `\"functionTimeout\": \"00:10:00\",` above the" - + " `managedDependancy` line \n" - + "4. Ensure **SAVED** appears on the top right corner of the" - + " editor, then exit the editor.\n\n" - + "> NOTE: If a longer timeout duration is required, consider" - + " upgrading to an [App Service" - + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CreateAPIPolling.json - */ - /** - * Sample code: Creates or updates a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessApiPollingDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("GitHub Enterprise Audit Log") - .withPublisher("GitHub") - .withDescriptionMarkdown( - "The GitHub audit log connector provides the capability to ingest GitHub logs into" - + " Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can" - + " view this data in workbooks, use it to create custom alerts, and improve your" - + " investigation process.") - .withGraphQueriesTableName("GitHubAuditLogPolling_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total events received") - .withLegend("GitHub audit log events") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("All logs") - .withQuery("{{graphQueriesTableName}}\n | take 10 "))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.fromString("SentinelKindsV2")) - .withValue(Arrays.asList()))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("GitHub API personal token Key") - .withDescription( - "You need access to GitHub personal token, the key should have" - + " 'admin:org' scope")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Connect GitHub Enterprise Audit Log to Azure Sentinel") - .withDescription( - "Enable GitHub audit Logs. \n" - + " Follow" - + " [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)" - + " to create or find your personal key") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"enable\":\"true\",\"userRequestPlaceHoldersInput\":[{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"\",\"requestObjectKey\":\"apiEndpoint\"}]}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.fromString("APIKey"))))))) - .withPollingConfig( - new CodelessConnectorPollingConfigProperties() - .withAuth( - new CodelessConnectorPollingAuthProperties() - .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) - .withRequest( - new CodelessConnectorPollingRequestProperties() - .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") - .withRateLimitQps(50) - .withQueryWindowInMin(15) - .withHttpMethod("Get") - .withQueryTimeFormat("yyyy-MM-ddTHH:mm:ssZ") - .withRetryCount(2) - .withTimeoutInSeconds(60) - .withHeaders( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"Accept\":\"application/json\",\"User-Agent\":\"Scuba\"}", - Object.class, - SerializerEncoding.JSON)) - .withQueryParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"phrase\":\"created:{_QueryWindowStartTime}..{_QueryWindowEndTime}\"}", - Object.class, - SerializerEncoding.JSON))) - .withPaging( - new CodelessConnectorPollingPagingProperties() - .withPagingType("LinkHeader") - .withPageSizeParaName("per_page")) - .withResponse( - new CodelessConnectorPollingResponseProperties() - .withEventsJsonPaths(Arrays.asList("$")))), + .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))), Context.NONE); } } @@ -2249,2407 +807,589 @@ public final class DataConnectorsCreateOrUpdateSamples { ```java import com.azure.core.util.Context; -/** Samples for DataConnectors Delete. */ -public final class DataConnectorsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json - */ - /** - * 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-09-01-preview/examples/dataConnectors/DeleteGenericUI.json - */ - /** - * Sample code: Delete a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json - */ - /** - * Sample code: Delete an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOffice365DataConnector( - 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-09-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-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json - */ - /** - * Sample code: Delete a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } -} -``` - -### DataConnectors_Disconnect - -```java -import com.azure.core.util.Context; - -/** Samples for DataConnectors Disconnect. */ -public final class DataConnectorsDisconnectSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json - */ - /** - * Sample code: Disconnect an APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void disconnectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } -} -``` - -### DataConnectors_Get - -```java -import com.azure.core.util.Context; - -/** Samples for DataConnectors Get. */ -public final class DataConnectorsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json - */ - /** - * 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-09-01-preview/examples/dataConnectors/GetGenericUI.json - */ - /** - * Sample code: Get a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an Office ATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json - */ - /** - * Sample code: Get a MCAS data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMCASDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json - */ - /** - * Sample code: Get a TI Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATITaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json - */ - /** - * Sample code: Get a MicrosoftThreatIntelligence data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftThreatIntelligenceDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json - */ - /** - * Sample code: Get a ASC data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAASCDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json - */ - /** - * Sample code: Get a TI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json - */ - /** - * Sample code: Get an AwsCloudTrail data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAwsCloudTrailDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json - */ - /** - * Sample code: Get a MDATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMDATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json - */ - /** - * Sample code: Get a MicrosoftThreatProtection data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftThreatProtectionDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json - */ - /** - * Sample code: Get an AAD data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAADDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an AATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json - */ - /** - * Sample code: Get a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json - */ - /** - * Sample code: Get an Office IRM data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeIRMDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json - */ - /** - * Sample code: Get a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json - */ - /** - * Sample code: Get an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOffice365DataConnector( - 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-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json - */ - /** - * Sample code: Get an Aws S3 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAwsS3DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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); - } -} -``` - -### DataConnectors_List - -```java -import com.azure.core.util.Context; - -/** Samples for DataConnectors List. */ -public final class DataConnectorsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json - */ - /** - * Sample code: Get all data connectors. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllDataConnectors( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); - } -} -``` - -### DataConnectorsCheckRequirementsOperation_Post - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; -import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.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/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json - */ - /** - * Sample code: Check requirements for OfficeATP. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeATP( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json - */ - /** - * Sample code: Check requirements for AAD. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAAD( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json - */ - /** - * Sample code: Check requirements for Mcas. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMcas( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json - */ - /** - * Sample code: Check requirements for Mdatp. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMdatp( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json - */ - /** - * Sample code: Check requirements for AAD - no authorization. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoAuthorization( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json - */ - /** - * Sample code: Check requirements for ASC. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForASC( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse( - "myRg", - "myWorkspace", - new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatProtection. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatProtection( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json - */ - /** - * Sample code: Check requirements for TI Taxii. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTITaxii( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json - */ - /** - * Sample code: Check requirements for OfficeIRM. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeIRM( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatIntelligence. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatIntelligence( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json - */ - /** - * Sample code: Check requirements for Dynamics365. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForDynamics365( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json - */ - /** - * Sample code: Check requirements for AAD - no license. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoLicense( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json - */ - /** - * Sample code: Check requirements for TI. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTI( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); - } -} -``` - -### DomainWhois_Get - -```java -import com.azure.core.util.Context; - -/** Samples for DomainWhois Get. */ -public final class DomainWhoisGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json - */ - /** - * Sample code: Get whois information for a single domain name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getWhoisInformationForASingleDomainName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); - } -} -``` - -### Entities_Expand - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for Entities Expand. */ -public final class EntitiesExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json - */ - /** - * Sample code: Expand an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .expandWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityExpandParameters() - .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) - .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) - .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); - } -} -``` - -### Entities_Get - -```java -import com.azure.core.util.Context; - -/** Samples for Entities Get. */ -public final class EntitiesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json - */ - /** - * Sample code: Get a submissionMail entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASubmissionMailEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json - */ - /** - * Sample code: Get a dns entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json - */ - /** - * Sample code: Get a file hash entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json - */ - /** - * Sample code: Get an IoT device entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIoTDeviceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json - */ - /** - * Sample code: Get a registry key entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryKeyEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json - */ - /** - * Sample code: Get a mailbox entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json - */ - /** - * Sample code: Get a malware entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json - */ - /** - * Sample code: Get a security alert entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityAlertEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json - */ - /** - * Sample code: Get an ip entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json - */ - /** - * Sample code: Get an account entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json - */ - /** - * Sample code: Get a cloud application entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getACloudApplicationEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json - */ - /** - * Sample code: Get a file entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json - */ - /** - * Sample code: Get a registry value entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryValueEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json - */ - /** - * Sample code: Get a url entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json - */ - /** - * Sample code: Get a mailCluster entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailClusterEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json - */ - /** - * Sample code: Get a security group entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityGroupEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json - */ - /** - * Sample code: Get a mailMessage entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailMessageEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json - */ - /** - * Sample code: Get an azure resource entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAzureResourceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json - */ - /** - * Sample code: Get a host entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json - */ - /** - * Sample code: Get a process entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); - } -} -``` - -### Entities_GetInsights - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for Entities GetInsights. */ -public final class EntitiesGetInsightsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json - */ - /** - * Sample code: Entity Insight. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityInsight(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .getInsightsWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityGetInsightsParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withAddDefaultExtendedTimeRange(false) - .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); - } -} -``` - -### Entities_List - -```java -import com.azure.core.util.Context; - -/** Samples for Entities List. */ -public final class EntitiesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json - */ - /** - * Sample code: Get all entities. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); - } -} -``` - -### Entities_Queries - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; - -/** Samples for Entities Queries. */ -public final class EntitiesQueriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json - */ - /** - * Sample code: Get Entity Query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .queriesWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - EntityItemQueryKind.INSIGHT, - Context.NONE); - } -} -``` - -### EntitiesGetTimeline_List - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import java.time.OffsetDateTime; - -/** Samples for EntitiesGetTimeline List. */ -public final class EntitiesGetTimelineListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json - */ - /** - * Sample code: Entity timeline. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityTimeline(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesGetTimelines() - .listWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityTimelineParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withNumberOfBucket(4), - Context.NONE); - } -} -``` - -### EntitiesRelations_List - -```java -import com.azure.core.util.Context; - -/** Samples for EntitiesRelations List. */ -public final class EntitiesRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json - */ - /** - * Sample code: Get all relations of an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllRelationsOfAnEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); - } -} -``` - -### EntityQueries_CreateOrUpdate - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for EntityQueries CreateOrUpdate. */ -public final class EntityQueriesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json - */ - /** - * Sample code: Creates or updates an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - new ActivityCustomEntityQuery() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withTitle("An account was deleted on this host") - .withContent("On '{{Computer}}' the account '{{TargetAccount}}' was deleted by '{{AddedBy}}'") - .withDescription("Account deleted on host") - .withQueryDefinitions( - new ActivityEntityQueriesPropertiesQueryDefinitions() - .withQuery( - "let GetAccountActions = (v_Host_Name:string, v_Host_NTDomain:string," - + " v_Host_DnsDomain:string, v_Host_AzureID:string, v_Host_OMSAgentID:string){\n" - + "SecurityEvent\n" - + "| where EventID in (4725, 4726, 4767, 4720, 4722, 4723, 4724)\n" - + "// parsing for Host to handle variety of conventions coming from data\n" - + "| extend Host_HostName = case(\n" - + "Computer has '@', tostring(split(Computer, '@')[0]),\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[1]),\n" - + "Computer has '.', tostring(split(Computer, '.')[0]),\n" - + "Computer\n" - + ")\n" - + "| extend Host_NTDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', tostring(split(Computer, '.')[-2]), \n" - + "Computer\n" - + ")\n" - + "| extend Host_DnsDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', strcat_array(array_slice(split(Computer,'.'),-2,-1),'.'), \n" - + "Computer\n" - + ")\n" - + "| where (Host_HostName =~ v_Host_Name and Host_NTDomain =~ v_Host_NTDomain) \n" - + "or (Host_HostName =~ v_Host_Name and Host_DnsDomain =~ v_Host_DnsDomain) \n" - + "or v_Host_AzureID =~ _ResourceId \n" - + "or v_Host_OMSAgentID == SourceComputerId\n" - + "| project TimeGenerated, EventID, Activity, Computer, TargetAccount," - + " TargetUserName, TargetDomainName, TargetSid, SubjectUserName, SubjectUserSid," - + " _ResourceId, SourceComputerId\n" - + "| extend AddedBy = SubjectUserName\n" - + "// Future support for Activities\n" - + "| extend timestamp = TimeGenerated, HostCustomEntity = Computer," - + " AccountCustomEntity = TargetAccount\n" - + "};\n" - + "GetAccountActions('{{Host_HostName}}', '{{Host_NTDomain}}'," - + " '{{Host_DnsDomain}}', '{{Host_AzureID}}', '{{Host_OMSAgentID}}')\n" - + " \n" - + "| where EventID == 4726 ")) - .withInputEntityType(EntityType.HOST) - .withRequiredInputFieldsSets( - Arrays - .asList( - Arrays.asList("Host_HostName", "Host_NTDomain"), - Arrays.asList("Host_HostName", "Host_DnsDomain"), - Arrays.asList("Host_AzureID"), - Arrays.asList("Host_OMSAgentID"))) - .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) - .withEnabled(true), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### EntityQueries_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for EntityQueries Delete. */ -public final class EntityQueriesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json - */ - /** - * Sample code: Delete an entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} -``` - -### EntityQueries_Get - -```java -import com.azure.core.util.Context; - -/** Samples for EntityQueries Get. */ -public final class EntityQueriesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json - */ - /** - * Sample code: Get an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json - */ - /** - * Sample code: Get an Expansion entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnExpansionEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} -``` - -### EntityQueries_List - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; - -/** Samples for EntityQueries List. */ -public final class EntityQueriesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json - */ - /** - * Sample code: Get all entity queries. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); - } -} -``` - -### EntityQueryTemplates_Get - -```java -import com.azure.core.util.Context; - -/** Samples for EntityQueryTemplates Get. */ -public final class EntityQueryTemplatesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json - */ - /** - * Sample code: Get an Activity entity query template. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQueryTemplate( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} -``` - -### EntityQueryTemplates_List - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; - -/** Samples for EntityQueryTemplates List. */ -public final class EntityQueryTemplatesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json - */ - /** - * Sample code: Get all entity query templates. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueryTemplates( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); - } -} -``` - -### EntityRelations_GetRelation - -```java -import com.azure.core.util.Context; - -/** Samples for EntityRelations GetRelation. */ -public final class EntityRelationsGetRelationSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json - */ - /** - * Sample code: Get an entity relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnEntityRelation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityRelations() - .getRelationWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} -``` - -### FileImports_Create - -```java -import com.azure.resourcemanager.securityinsights.models.FileFormat; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; - -/** Samples for FileImports Create. */ -public final class FileImportsCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json - */ - /** - * Sample code: Create a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withIngestionMode(IngestionMode.INGEST_ANY_VALID_RECORDS) - .withContentType(FileImportContentType.STIX_INDICATOR) - .withImportFile( - new FileMetadata().withFileFormat(FileFormat.JSON).withFileName("myFile.json").withFileSize(4653)) - .withSource("mySource") - .create(); - } -} -``` - -### FileImports_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for FileImports Delete. */ -public final class FileImportsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json - */ - /** - * Sample code: Delete a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} -``` - -### FileImports_Get - -```java -import com.azure.core.util.Context; - -/** Samples for FileImports Get. */ -public final class FileImportsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json - */ - /** - * Sample code: Get a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} -``` - -### FileImports_List - -```java -import com.azure.core.util.Context; - -/** Samples for FileImports List. */ -public final class FileImportsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json - */ - /** - * Sample code: Get all file imports. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); - } -} -``` - -### IncidentComments_CreateOrUpdate - -```java -/** Samples for IncidentComments CreateOrUpdate. */ -public final class IncidentCommentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json - */ - /** - * Sample code: Creates or updates an incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") - .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withMessage("Some message") - .create(); - } -} -``` - -### IncidentComments_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for IncidentComments Delete. */ -public final class IncidentCommentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json - */ - /** - * Sample code: Delete the incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .deleteWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} -``` - -### IncidentComments_Get - -```java -import com.azure.core.util.Context; - -/** Samples for IncidentComments Get. */ -public final class IncidentCommentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json - */ - /** - * Sample code: Get an incident comment. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .getWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} -``` - -### IncidentComments_List - -```java -import com.azure.core.util.Context; - -/** Samples for IncidentComments List. */ -public final class IncidentCommentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json - */ - /** - * Sample code: Get all incident comments. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentComments( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); - } -} -``` - -### IncidentRelations_CreateOrUpdate - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** Samples for IncidentRelations CreateOrUpdate. */ -public final class IncidentRelationsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json - */ - /** - * Sample code: Creates or updates an incident relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnIncidentRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidentRelations() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - new RelationInner() - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); - } -} -``` - -### IncidentRelations_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for IncidentRelations Delete. */ -public final class IncidentRelationsDeleteSamples { +/** Samples for DataConnectors Delete. */ +public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** - * Sample code: Delete the incident relation. + * Sample code: Delete an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteTheIncidentRelation( + public static void deleteAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidentRelations() - .deleteWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + .dataConnectors() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } } ``` -### IncidentRelations_Get +### DataConnectors_Get ```java import com.azure.core.util.Context; -/** Samples for IncidentRelations Get. */ -public final class IncidentRelationsGetSamples { +/** Samples for DataConnectors Get. */ +public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** - * Sample code: Get an incident relation. + * Sample code: Get a ASC data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncidentRelation( + public static void getAASCDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidentRelations() - .getWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); } -} -``` - -### IncidentRelations_List -```java -import com.azure.core.util.Context; - -/** Samples for IncidentRelations List. */ -public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** - * Sample code: Get all incident relations. + * Sample code: Get an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentRelations( + public static void getAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } -} -``` - -### Incidents_CreateOrUpdate - -```java -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import java.time.OffsetDateTime; -import java.util.UUID; -/** Samples for Incidents CreateOrUpdate. */ -public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** - * Sample code: Creates or updates an incident. + * Sample code: Get a MCAS data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncident( + public static void getAMCASDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withClassification(IncidentClassification.FALSE_POSITIVE) - .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") - .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) - .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") - .create(); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); } -} -``` - -### Incidents_CreateTeam -```java -import com.azure.core.util.Context; -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/2022-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** - * Sample code: Creates incident teams group. + * Sample code: Get an AwsCloudTrail data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsIncidentTeamsGroup( + public static void getAnAwsCloudTrailDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", - "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); } -} -``` - -### Incidents_Delete - -```java -import com.azure.core.util.Context; -/** Samples for Incidents Delete. */ -public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Delete an incident. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getAnAATPDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } -} -``` - -### Incidents_Get - -```java -import com.azure.core.util.Context; -/** Samples for Incidents Get. */ -public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** - * Sample code: Get an incident. + * Sample code: Get a MDATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getAMDATPDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); } -} -``` - -### Incidents_List - -```java -import com.azure.core.util.Context; -/** Samples for Incidents List. */ -public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetThreatIntelligenceById.json */ /** - * Sample code: Get all incidents. + * Sample code: Get a TI data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); } -} -``` - -### Incidents_ListAlerts - -```java -import com.azure.core.util.Context; -/** Samples for Incidents ListAlerts. */ -public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** - * Sample code: Get all incident alerts. + * Sample code: Get an AAD data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentAlerts( + public static void getAnAADDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .dataConnectors() + .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); } } ``` -### Incidents_ListBookmarks +### DataConnectors_List ```java import com.azure.core.util.Context; -/** Samples for Incidents ListBookmarks. */ -public final class IncidentsListBookmarksSamples { +/** Samples for DataConnectors List. */ +public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetDataConnectors.json */ /** - * Sample code: Get all incident bookmarks. + * Sample code: Get all data connectors. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentBookmarks( + public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); } } ``` -### Incidents_ListEntities +### IncidentComments_CreateOrUpdate ```java -import com.azure.core.util.Context; - -/** Samples for Incidents ListEntities. */ -public final class IncidentsListEntitiesSamples { +/** Samples for IncidentComments CreateOrUpdate. */ +public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/comments/CreateIncidentComment.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Creates or updates an incident comment. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void createsOrUpdatesAnIncidentComment( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .incidentComments() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withMessage("Some message") + .create(); } } ``` -### Incidents_RunPlaybook +### IncidentComments_Delete ```java import com.azure.core.util.Context; -/** Samples for Incidents RunPlaybook. */ -public final class IncidentsRunPlaybookSamples { +/** Samples for IncidentComments Delete. */ +public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/comments/DeleteIncidentComment.json */ /** - * Sample code: Incidents_RunPlaybook. + * Sample code: Delete the incident comment. * * @param manager Entry point to SecurityInsightsManager. */ - public static void incidentsRunPlaybook( + public static void deleteTheIncidentComment( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .incidentComments() + .deleteWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + Context.NONE); } } ``` -### IpGeodata_Get +### IncidentComments_Get ```java import com.azure.core.util.Context; -/** Samples for IpGeodata Get. */ -public final class IpGeodataGetSamples { +/** Samples for IncidentComments Get. */ +public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/comments/GetIncidentCommentById.json */ /** - * Sample code: Get geodata for a single IP address. + * Sample code: Get an incident comment. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getGeodataForASingleIPAddress( + public static void getAnIncidentComment( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager + .incidentComments() + .getWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + Context.NONE); } } ``` -### Metadata_Create +### IncidentComments_List ```java -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.azure.resourcemanager.securityinsights.models.Operator; -import com.azure.resourcemanager.securityinsights.models.SourceKind; -import com.azure.resourcemanager.securityinsights.models.SupportTier; -import java.time.LocalDate; -import java.util.Arrays; - -/** Samples for Metadata Create. */ -public final class MetadataCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json - */ - /** - * Sample code: Create/update full metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createUpdateFullMetadata( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) - .withSource( - new MetadataSource() - .withKind(SourceKind.SOLUTION) - .withName("Contoso Solution 1.0") - .withSourceId("b688a130-76f4-4a07-bf57-762222a3cadf")) - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .withSupport( - new MetadataSupport() - .withTier(SupportTier.PARTNER) - .withName("Microsoft") - .withEmail("support@microsoft.com") - .withLink("https://support.microsoft.com/")) - .withDependencies( - new MetadataDependencies() - .withOperator(Operator.AND) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withOperator(Operator.OR) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) - .withName("Microsoft Defender for Endpoint"), - new MetadataDependencies() - .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), - new MetadataDependencies() - .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) - .withVersion("2.0"))), - new MetadataDependencies() - .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) - .withVersion("1.0"), - new MetadataDependencies() - .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) - .withCategories( - new MetadataCategories() - .withDomains(Arrays.asList("Application", "Security – Insider Threat")) - .withVerticals(Arrays.asList("Healthcare"))) - .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(); - } +import com.azure.core.util.Context; +/** Samples for IncidentComments List. */ +public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/comments/GetAllIncidentComments.json */ /** - * Sample code: Create/update minimal metadata. + * Sample code: Get all incident comments. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createUpdateMinimalMetadata( + public static void getAllIncidentComments( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) - .create(); + .incidentComments() + .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); } } ``` -### Metadata_Delete +### IncidentRelations_CreateOrUpdate ```java -import com.azure.core.util.Context; - -/** Samples for Metadata Delete. */ -public final class MetadataDeleteSamples { +/** Samples for IncidentRelations CreateOrUpdate. */ +public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/relations/CreateIncidentRelation.json */ /** - * Sample code: Delete metadata. + * Sample code: Creates or updates an incident relation. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + public static void createsOrUpdatesAnIncidentRelation( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentRelations() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812") + .withRelatedResourceId( + "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096") + .create(); } } ``` -### Metadata_Get +### IncidentRelations_Delete ```java import com.azure.core.util.Context; -/** Samples for Metadata Get. */ -public final class MetadataGetSamples { +/** Samples for IncidentRelations Delete. */ +public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/relations/DeleteIncidentRelation.json */ /** - * Sample code: Get single metadata by name. + * Sample code: Delete the incident relation. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getSingleMetadataByName( + public static void deleteTheIncidentRelation( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager + .incidentRelations() + .deleteWithResponse( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + Context.NONE); } } ``` -### Metadata_List +### IncidentRelations_Get ```java import com.azure.core.util.Context; -/** Samples for Metadata List. */ -public final class MetadataListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json - */ - /** - * Sample code: Get all metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } - +/** Samples for IncidentRelations Get. */ +public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/relations/GetIncidentRelationByName.json */ /** - * Sample code: Get all metadata with OData filter/orderby/skip/top. + * Sample code: Get an incident relation. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllMetadataWithODataFilterOrderbySkipTop( + public static void getAnIncidentRelation( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager + .incidentRelations() + .getWithResponse( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + Context.NONE); } } ``` -### Metadata_Update +### IncidentRelations_List ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; -/** Samples for Metadata Update. */ -public final class MetadataUpdateSamples { +/** Samples for IncidentRelations List. */ +public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/relations/GetAllIncidentRelations.json */ /** - * Sample code: Update metadata. + * Sample code: Get all incident relations. * * @param manager Entry point to SecurityInsightsManager. */ - public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); - resource - .update() - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .apply(); + public static void getAllIncidentRelations( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentRelations() + .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); } } ``` -### OfficeConsents_Delete +### Incidents_CreateOrUpdate ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.models.IncidentClassification; +import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; +import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; +import com.azure.resourcemanager.securityinsights.models.IncidentStatus; +import java.time.OffsetDateTime; +import java.util.UUID; -/** Samples for OfficeConsents Delete. */ -public final class OfficeConsentsDeleteSamples { +/** Samples for Incidents CreateOrUpdate. */ +public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/CreateIncident.json */ /** - * Sample code: Delete an office consent. + * Sample code: Creates or updates an incident. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnOfficeConsent( + public static void createsOrUpdatesAnIncident( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .incidents() + .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withExistingWorkspace("myRg", "myWorkspace") + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withClassification(IncidentClassification.FALSE_POSITIVE) + .withClassificationComment("Not a malicious activity") + .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) + .withDescription("This is a demo incident") + .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) + .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) + .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) + .withSeverity(IncidentSeverity.HIGH) + .withStatus(IncidentStatus.CLOSED) + .withTitle("My incident") + .create(); } } ``` -### OfficeConsents_Get +### Incidents_Delete ```java import com.azure.core.util.Context; -/** Samples for OfficeConsents Get. */ -public final class OfficeConsentsGetSamples { +/** Samples for Incidents Delete. */ +public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/DeleteIncident.json */ /** - * Sample code: Get an office consent. + * Sample code: Delete an incident. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .incidents() + .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } } ``` -### OfficeConsents_List +### Incidents_Get ```java import com.azure.core.util.Context; -/** Samples for OfficeConsents List. */ -public final class OfficeConsentsListSamples { +/** Samples for Incidents Get. */ +public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/GetIncidentById.json */ /** - * Sample code: Get all office consents. + * Sample code: Get an incident. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllOfficeConsents( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); + public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } } ``` -### Operations_List +### Incidents_List ```java import com.azure.core.util.Context; -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** Samples for Incidents List. */ +public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/GetIncidents.json */ /** - * Sample code: Get all operations. + * Sample code: Get all incidents. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); + public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); } } ``` -### ProductSettings_Delete +### Incidents_ListAlerts ```java import com.azure.core.util.Context; -/** Samples for ProductSettings Delete. */ -public final class ProductSettingsDeleteSamples { +/** Samples for Incidents ListAlerts. */ +public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/GetAllIncidentAlerts.json */ /** - * Sample code: Delete EyesOn settings. + * Sample code: Get all incident alerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteEyesOnSettings( + public static void getAllIncidentAlerts( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager + .incidents() + .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); } } ``` -### ProductSettings_Get +### Incidents_ListBookmarks ```java import com.azure.core.util.Context; -/** Samples for ProductSettings Get. */ -public final class ProductSettingsGetSamples { +/** Samples for Incidents ListBookmarks. */ +public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/GetAllIncidentBookmarks.json */ /** - * Sample code: Get EyesOn settings. + * Sample code: Get all incident bookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + public static void getAllIncidentBookmarks( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); } } ``` -### ProductSettings_List +### Incidents_ListEntities ```java import com.azure.core.util.Context; -/** Samples for ProductSettings List. */ -public final class ProductSettingsListSamples { +/** Samples for Incidents ListEntities. */ +public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/GetAllIncidentEntities.json */ /** - * Sample code: Get all settings. + * Sample code: Gets all incident related entities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); + public static void getsAllIncidentRelatedEntities( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); } } ``` -### ProductSettings_Update +### Operations_List ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EyesOn; -/** Samples for ProductSettings Update. */ -public final class ProductSettingsUpdateSamples { +/** Samples for Operations List. */ +public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/operations/ListOperations.json */ /** - * Sample code: Update EyesOn settings. + * Sample code: Get all operations. * * @param manager Entry point to SecurityInsightsManager. */ - public static void updateEyesOnSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .productSettings() - .updateWithResponse( - "myRg", - "myWorkspace", - "EyesOn", - new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); + public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.operations().list(Context.NONE); } } ``` @@ -4672,7 +1412,7 @@ import java.util.UUID; /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -4739,7 +1479,7 @@ import com.azure.core.util.Context; /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -4763,7 +1503,7 @@ import com.azure.core.util.Context; /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -4787,7 +1527,7 @@ import com.azure.core.util.Context; /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -4807,7 +1547,7 @@ public final class SecurityMLAnalyticsSettingsListSamples { /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -4834,7 +1574,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/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -4856,7 +1596,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/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -4878,7 +1618,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/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -4892,146 +1632,6 @@ public final class SentinelOnboardingStatesListSamples { } ``` -### SourceControl_ListRepositories - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.RepoType; - -/** Samples for SourceControl ListRepositories. */ -public final class SourceControlListRepositoriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json - */ - /** - * Sample code: Get repository list. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); - } -} -``` - -### SourceControlsOperation_Create - -```java -import com.azure.resourcemanager.securityinsights.models.ContentPathMap; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import java.util.Arrays; - -/** Samples for SourceControlsOperation Create. */ -public final class SourceControlsOperationCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json - */ - /** - * Sample code: Creates a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .define("789e0c1f-4a3d-43ad-809c-e713b677b04a") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("My Source Control") - .withDescription("This is a source control") - .withRepoType(RepoType.GITHUB) - .withContentTypes(Arrays.asList(ContentType.fromString("AnalyticRules"), ContentType.WORKBOOK)) - .withRepository( - new Repository() - .withUrl("https://github.com/user/repo") - .withBranch("master") - .withDisplayUrl("https://github.com/user/repo") - .withPathMapping( - Arrays - .asList( - new ContentPathMap() - .withContentType(ContentType.fromString("AnalyticRules")) - .withPath("path/to/rules"), - new ContentPathMap() - .withContentType(ContentType.WORKBOOK) - .withPath("path/to/workbooks")))) - .create(); - } -} -``` - -### SourceControlsOperation_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Delete. */ -public final class SourceControlsOperationDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json - */ - /** - * Sample code: Delete a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} -``` - -### SourceControlsOperation_Get - -```java -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Get. */ -public final class SourceControlsOperationGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json - */ - /** - * Sample code: Get a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} -``` - -### SourceControlsOperation_List - -```java -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation List. */ -public final class SourceControlsOperationListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json - */ - /** - * Sample code: Get all source controls. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSourceControls( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); - } -} -``` - ### ThreatIntelligenceIndicator_AppendTags ```java @@ -5042,7 +1642,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -5073,7 +1673,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -5121,7 +1721,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -5150,7 +1750,7 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { .withRevoked(false) .withConfidence(78) .withThreatTypes(Arrays.asList("compromised")) - .withValidFrom("2021-09-15T17:44:00.114052Z") + .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), Context.NONE); @@ -5166,7 +1766,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/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -5190,7 +1790,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/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -5212,13 +1812,13 @@ public final class ThreatIntelligenceIndicatorGetSamples { import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; +import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingOrder; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -5236,14 +1836,14 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { .withPageSize(100) .withMinConfidence(25) .withMaxConfidence(80) - .withMinValidUntil("2021-04-05T17:44:00.114052Z") - .withMaxValidUntil("2021-04-25T17:44:00.114052Z") + .withMinValidUntil("2020-04-05T17:44:00.114052Z") + .withMaxValidUntil("2020-04-25T17:44:00.114052Z") .withSortBy( Arrays .asList( new ThreatIntelligenceSortingCriteria() .withItemKey("lastUpdatedTimeUtc") - .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) + .withSortOrder(ThreatIntelligenceSortingOrder.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), Context.NONE); } @@ -5260,7 +1860,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -5291,7 +1891,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/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -5313,7 +1913,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/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -5332,53 +1932,38 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples { ### WatchlistItems_CreateOrUpdate ```java -import java.util.HashMap; -import java.util.Map; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlistItem.json */ /** - * Sample code: Creates or updates a watchlist item. + * Sample code: Create or update a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlistItem( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void createOrUpdateAWatchlistItem( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { manager .watchlistItems() .define("82ba292c-dc97-4dfc-969d-d4dd9e666842") .withExistingWatchlist("myRg", "myWorkspace", "highValueAsset") .withEtag("0300bf09-0000-0000-0000-5c37296e0000") .withItemsKeyValue( - mapOf( - "Business tier", - "10.0.2.0/24", - "Data tier", - "10.0.2.0/24", - "Gateway subnet", - "10.0.255.224/27", - "Private DMZ in", - "10.0.0.0/27", - "Public DMZ out", - "10.0.0.96/27", - "Web Tier", - "10.0.1.0/24")) + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"Business tier\":\"10.0.2.0/24\",\"Data tier\":\"10.0.2.0/24\",\"Gateway" + + " subnet\":\"10.0.255.224/27\",\"Private DMZ in\":\"10.0.0.0/27\",\"Public DMZ" + + " out\":\"10.0.0.96/27\",\"Web Tier\":\"10.0.1.0/24\"}", + Object.class, + SerializerEncoding.JSON)) .create(); } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } } ``` @@ -5390,10 +1975,10 @@ import com.azure.core.util.Context; /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/DeleteWatchlistItem.json */ /** - * Sample code: Delete a watchlist Item. + * Sample code: Delete a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ @@ -5415,7 +2000,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/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -5439,7 +2024,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/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -5456,19 +2041,19 @@ public final class WatchlistItemsListSamples { ### Watchlists_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.SourceType; +import com.azure.resourcemanager.securityinsights.models.Source; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlist.json */ /** - * Sample code: Creates or updates a watchlist and bulk creates watchlist items. + * Sample code: Create or update a watchlist. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( + public static void createOrUpdateAWatchlist( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .watchlists() @@ -5477,25 +2062,21 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) + .withSource(Source.LOCAL_FILE) .withDescription("Watchlist from CSV content") - .withNumberOfLinesToSkip(1) - .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") .withItemsSearchKey("header1") - .withContentType("text/csv") .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** - * Sample code: Creates or updates a watchlist. + * Sample code: Create or update a watchlist and bulk creates watchlist items. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlist( + public static void createOrUpdateAWatchlistAndBulkCreatesWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .watchlists() @@ -5504,10 +2085,12 @@ public final class WatchlistsCreateOrUpdateSamples { .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) + .withSource(Source.LOCAL_FILE) .withDescription("Watchlist from CSV content") + .withNumberOfLinesToSkip(1) + .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") .withItemsSearchKey("header1") + .withContentType("text/csv") .create(); } } @@ -5521,7 +2104,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/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -5542,7 +2125,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/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -5563,7 +2146,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/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml index b70bf2d10ff6..15f8a7dfd3ff 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-2022-09. + This package contains Microsoft Azure SDK for SecurityInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-2022-11. 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 6868ca4ea727..d99949b03167 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 @@ -28,32 +28,15 @@ import com.azure.resourcemanager.securityinsights.implementation.AlertRuleTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.AlertRulesImpl; import com.azure.resourcemanager.securityinsights.implementation.AutomationRulesImpl; -import com.azure.resourcemanager.securityinsights.implementation.BookmarkOperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.BookmarkRelationsImpl; import com.azure.resourcemanager.securityinsights.implementation.BookmarksImpl; -import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsCheckRequirementsOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.DataConnectorsImpl; -import com.azure.resourcemanager.securityinsights.implementation.DomainWhoisImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesGetTimelinesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntitiesRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityQueriesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl; -import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl; -import com.azure.resourcemanager.securityinsights.implementation.IpGeodatasImpl; -import com.azure.resourcemanager.securityinsights.implementation.MetadatasImpl; -import com.azure.resourcemanager.securityinsights.implementation.OfficeConsentsImpl; import com.azure.resourcemanager.securityinsights.implementation.OperationsImpl; -import com.azure.resourcemanager.securityinsights.implementation.ProductSettingsImpl; import com.azure.resourcemanager.securityinsights.implementation.SecurityInsightsBuilder; import com.azure.resourcemanager.securityinsights.implementation.SecurityMLAnalyticsSettingsImpl; import com.azure.resourcemanager.securityinsights.implementation.SentinelOnboardingStatesImpl; -import com.azure.resourcemanager.securityinsights.implementation.SourceControlsImpl; -import com.azure.resourcemanager.securityinsights.implementation.SourceControlsOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorMetricsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsOperationsImpl; @@ -63,31 +46,14 @@ import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; import com.azure.resourcemanager.securityinsights.models.AlertRules; import com.azure.resourcemanager.securityinsights.models.AutomationRules; -import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; -import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; import com.azure.resourcemanager.securityinsights.models.Bookmarks; import com.azure.resourcemanager.securityinsights.models.DataConnectors; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; -import com.azure.resourcemanager.securityinsights.models.DomainWhois; -import com.azure.resourcemanager.securityinsights.models.Entities; -import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines; -import com.azure.resourcemanager.securityinsights.models.EntitiesRelations; -import com.azure.resourcemanager.securityinsights.models.EntityQueries; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; -import com.azure.resourcemanager.securityinsights.models.EntityRelations; -import com.azure.resourcemanager.securityinsights.models.FileImports; import com.azure.resourcemanager.securityinsights.models.IncidentComments; import com.azure.resourcemanager.securityinsights.models.IncidentRelations; import com.azure.resourcemanager.securityinsights.models.Incidents; -import com.azure.resourcemanager.securityinsights.models.IpGeodatas; -import com.azure.resourcemanager.securityinsights.models.Metadatas; -import com.azure.resourcemanager.securityinsights.models.OfficeConsents; import com.azure.resourcemanager.securityinsights.models.Operations; -import com.azure.resourcemanager.securityinsights.models.ProductSettings; import com.azure.resourcemanager.securityinsights.models.SecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.SentinelOnboardingStates; -import com.azure.resourcemanager.securityinsights.models.SourceControls; -import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; @@ -113,50 +79,20 @@ public final class SecurityInsightsManager { private AutomationRules automationRules; - private Incidents incidents; - private Bookmarks bookmarks; - private BookmarkRelations bookmarkRelations; - - private BookmarkOperations bookmarkOperations; - - private IpGeodatas ipGeodatas; - - private DomainWhois domainWhois; - - private Entities entities; - - private EntitiesGetTimelines entitiesGetTimelines; - - private EntitiesRelations entitiesRelations; - - private EntityRelations entityRelations; - - private EntityQueries entityQueries; - - private EntityQueryTemplates entityQueryTemplates; + private DataConnectors dataConnectors; - private FileImports fileImports; + private Incidents incidents; private IncidentComments incidentComments; private IncidentRelations incidentRelations; - private Metadatas metadatas; - - private OfficeConsents officeConsents; - private SentinelOnboardingStates sentinelOnboardingStates; private SecurityMLAnalyticsSettings securityMLAnalyticsSettings; - private ProductSettings productSettings; - - private SourceControls sourceControls; - - private SourceControlsOperations sourceControlsOperations; - private ThreatIntelligenceIndicators threatIntelligenceIndicators; private ThreatIntelligenceIndicatorsOperations threatIntelligenceIndicatorsOperations; @@ -167,10 +103,6 @@ public final class SecurityInsightsManager { private WatchlistItems watchlistItems; - private DataConnectors dataConnectors; - - private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; - private Operations operations; private final SecurityInsights clientObject; @@ -338,7 +270,7 @@ public SecurityInsightsManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.securityinsights") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -443,18 +375,6 @@ public AutomationRules automationRules() { return automationRules; } - /** - * Gets the resource collection API of Incidents. It manages Incident. - * - * @return Resource collection API of Incidents. - */ - public Incidents incidents() { - if (this.incidents == null) { - this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); - } - return incidents; - } - /** * Gets the resource collection API of Bookmarks. It manages Bookmark. * @@ -468,135 +388,27 @@ public Bookmarks bookmarks() { } /** - * Gets the resource collection API of BookmarkRelations. It manages Relation. - * - * @return Resource collection API of BookmarkRelations. - */ - public BookmarkRelations bookmarkRelations() { - if (this.bookmarkRelations == null) { - this.bookmarkRelations = new BookmarkRelationsImpl(clientObject.getBookmarkRelations(), this); - } - return bookmarkRelations; - } - - /** - * Gets the resource collection API of BookmarkOperations. - * - * @return Resource collection API of BookmarkOperations. - */ - public BookmarkOperations bookmarkOperations() { - if (this.bookmarkOperations == null) { - this.bookmarkOperations = new BookmarkOperationsImpl(clientObject.getBookmarkOperations(), this); - } - return bookmarkOperations; - } - - /** - * Gets the resource collection API of IpGeodatas. - * - * @return Resource collection API of IpGeodatas. - */ - public IpGeodatas ipGeodatas() { - if (this.ipGeodatas == null) { - this.ipGeodatas = new IpGeodatasImpl(clientObject.getIpGeodatas(), this); - } - return ipGeodatas; - } - - /** - * Gets the resource collection API of DomainWhois. - * - * @return Resource collection API of DomainWhois. - */ - public DomainWhois domainWhois() { - if (this.domainWhois == null) { - this.domainWhois = new DomainWhoisImpl(clientObject.getDomainWhois(), this); - } - return domainWhois; - } - - /** - * Gets the resource collection API of Entities. - * - * @return Resource collection API of Entities. - */ - public Entities entities() { - if (this.entities == null) { - this.entities = new EntitiesImpl(clientObject.getEntities(), this); - } - return entities; - } - - /** - * Gets the resource collection API of EntitiesGetTimelines. - * - * @return Resource collection API of EntitiesGetTimelines. - */ - public EntitiesGetTimelines entitiesGetTimelines() { - if (this.entitiesGetTimelines == null) { - this.entitiesGetTimelines = new EntitiesGetTimelinesImpl(clientObject.getEntitiesGetTimelines(), this); - } - return entitiesGetTimelines; - } - - /** - * Gets the resource collection API of EntitiesRelations. - * - * @return Resource collection API of EntitiesRelations. - */ - public EntitiesRelations entitiesRelations() { - if (this.entitiesRelations == null) { - this.entitiesRelations = new EntitiesRelationsImpl(clientObject.getEntitiesRelations(), this); - } - return entitiesRelations; - } - - /** - * Gets the resource collection API of EntityRelations. - * - * @return Resource collection API of EntityRelations. - */ - public EntityRelations entityRelations() { - if (this.entityRelations == null) { - this.entityRelations = new EntityRelationsImpl(clientObject.getEntityRelations(), this); - } - return entityRelations; - } - - /** - * Gets the resource collection API of EntityQueries. - * - * @return Resource collection API of EntityQueries. - */ - public EntityQueries entityQueries() { - if (this.entityQueries == null) { - this.entityQueries = new EntityQueriesImpl(clientObject.getEntityQueries(), this); - } - return entityQueries; - } - - /** - * Gets the resource collection API of EntityQueryTemplates. + * Gets the resource collection API of DataConnectors. * - * @return Resource collection API of EntityQueryTemplates. + * @return Resource collection API of DataConnectors. */ - public EntityQueryTemplates entityQueryTemplates() { - if (this.entityQueryTemplates == null) { - this.entityQueryTemplates = new EntityQueryTemplatesImpl(clientObject.getEntityQueryTemplates(), this); + public DataConnectors dataConnectors() { + if (this.dataConnectors == null) { + this.dataConnectors = new DataConnectorsImpl(clientObject.getDataConnectors(), this); } - return entityQueryTemplates; + return dataConnectors; } /** - * Gets the resource collection API of FileImports. It manages FileImport. + * Gets the resource collection API of Incidents. It manages Incident. * - * @return Resource collection API of FileImports. + * @return Resource collection API of Incidents. */ - public FileImports fileImports() { - if (this.fileImports == null) { - this.fileImports = new FileImportsImpl(clientObject.getFileImports(), this); + public Incidents incidents() { + if (this.incidents == null) { + this.incidents = new IncidentsImpl(clientObject.getIncidents(), this); } - return fileImports; + return incidents; } /** @@ -612,7 +424,7 @@ public IncidentComments incidentComments() { } /** - * Gets the resource collection API of IncidentRelations. + * Gets the resource collection API of IncidentRelations. It manages Relation. * * @return Resource collection API of IncidentRelations. */ @@ -623,30 +435,6 @@ public IncidentRelations incidentRelations() { return incidentRelations; } - /** - * Gets the resource collection API of Metadatas. It manages MetadataModel. - * - * @return Resource collection API of Metadatas. - */ - public Metadatas metadatas() { - if (this.metadatas == null) { - this.metadatas = new MetadatasImpl(clientObject.getMetadatas(), this); - } - return metadatas; - } - - /** - * Gets the resource collection API of OfficeConsents. - * - * @return Resource collection API of OfficeConsents. - */ - public OfficeConsents officeConsents() { - if (this.officeConsents == null) { - this.officeConsents = new OfficeConsentsImpl(clientObject.getOfficeConsents(), this); - } - return officeConsents; - } - /** * Gets the resource collection API of SentinelOnboardingStates. It manages SentinelOnboardingState. * @@ -673,43 +461,6 @@ public SecurityMLAnalyticsSettings securityMLAnalyticsSettings() { return securityMLAnalyticsSettings; } - /** - * Gets the resource collection API of ProductSettings. - * - * @return Resource collection API of ProductSettings. - */ - public ProductSettings productSettings() { - if (this.productSettings == null) { - this.productSettings = new ProductSettingsImpl(clientObject.getProductSettings(), this); - } - return productSettings; - } - - /** - * Gets the resource collection API of SourceControls. - * - * @return Resource collection API of SourceControls. - */ - public SourceControls sourceControls() { - if (this.sourceControls == null) { - this.sourceControls = new SourceControlsImpl(clientObject.getSourceControls(), this); - } - return sourceControls; - } - - /** - * Gets the resource collection API of SourceControlsOperations. It manages SourceControl. - * - * @return Resource collection API of SourceControlsOperations. - */ - public SourceControlsOperations sourceControlsOperations() { - if (this.sourceControlsOperations == null) { - this.sourceControlsOperations = - new SourceControlsOperationsImpl(clientObject.getSourceControlsOperations(), this); - } - return sourceControlsOperations; - } - /** * Gets the resource collection API of ThreatIntelligenceIndicators. * @@ -774,32 +525,6 @@ public WatchlistItems watchlistItems() { return watchlistItems; } - /** - * Gets the resource collection API of DataConnectors. - * - * @return Resource collection API of DataConnectors. - */ - public DataConnectors dataConnectors() { - if (this.dataConnectors == null) { - this.dataConnectors = new DataConnectorsImpl(clientObject.getDataConnectors(), this); - } - return dataConnectors; - } - - /** - * Gets the resource collection API of DataConnectorsCheckRequirementsOperations. - * - * @return Resource collection API of DataConnectorsCheckRequirementsOperations. - */ - public DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations() { - if (this.dataConnectorsCheckRequirementsOperations == null) { - this.dataConnectorsCheckRequirementsOperations = - new DataConnectorsCheckRequirementsOperationsImpl( - clientObject.getDataConnectorsCheckRequirementsOperations(), this); - } - return dataConnectorsCheckRequirementsOperations; - } - /** * Gets the resource collection API of Operations. * 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 1679ca2138ad..18cfd50a2431 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java @@ -44,21 +44,6 @@ public interface ActionsClient { PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - /** * Gets the action of alert rule. * @@ -77,21 +62,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** - * Creates or updates the action of alert rule. + * Gets the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); + ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Creates or updates the action of alert rule. @@ -117,18 +100,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the action of alert rule. + * Creates or updates the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); /** * Delete the action of alert rule. @@ -146,4 +132,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + + /** + * Delete the action of alert rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param actionId Action ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java index c568ee0f23fe..1747732b0446 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java @@ -46,13 +46,15 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -60,13 +62,11 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index d40ca296e5fc..c77a3e9fa2fa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java @@ -46,13 +46,15 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -60,15 +62,13 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -93,15 +94,14 @@ AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -109,12 +109,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -122,12 +124,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 8bdfc546a32d..1e448c15a203 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java @@ -13,20 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); - /** * Gets the automation rule. * @@ -44,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Creates or updates the automation rule. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -52,10 +38,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -79,7 +65,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -87,10 +73,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -108,6 +94,20 @@ Response createOrUpdateWithResponse( Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + /** + * Delete the automation rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + /** * Gets all automation rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java deleted file mode 100644 index 1d63a4251db1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java +++ /dev/null @@ -1,52 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; - -/** An instance of this class provides access to all the operations defined in BookmarkOperationsClient. */ -public interface BookmarkOperationsClient { - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - 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 deleted file mode 100644 index e644d527b90a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java +++ /dev/null @@ -1,161 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in BookmarkRelationsClient. */ -public interface BookmarkRelationsClient { - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark 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 bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - Context context); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); -} 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 767fec60845b..0e9d306ada84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java @@ -46,13 +46,15 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -60,15 +62,13 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Creates or updates the bookmark. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); /** * Creates or updates the bookmark. @@ -93,15 +94,14 @@ BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); + BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); /** * Delete the bookmark. @@ -109,12 +109,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -122,13 +125,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java deleted file mode 100644 index 146c3f4c1793..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java +++ /dev/null @@ -1,54 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; - -/** - * An instance of this class provides access to all the operations defined in - * DataConnectorsCheckRequirementsOperationsClient. - */ -public interface DataConnectorsCheckRequirementsOperationsClient { - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorRequirementsStateInner post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - 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 78d1cc36c200..fe323df0c4a7 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 @@ -10,7 +10,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; /** An instance of this class provides access to all the operations defined in DataConnectorsClient. */ public interface DataConnectorsClient { @@ -41,20 +40,6 @@ public interface DataConnectorsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -72,20 +57,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -109,17 +92,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -138,67 +124,15 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Disconnect a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java deleted file mode 100644 index e9ae9d9fcfed..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java +++ /dev/null @@ -1,41 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; - -/** An instance of this class provides access to all the operations defined in DomainWhoisClient. */ -public interface DomainWhoisClient { - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String domain, 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 deleted file mode 100644 index 28404013fdcb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java +++ /dev/null @@ -1,185 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; - -/** An instance of this class provides access to all the operations defined in EntitiesClient. */ -public interface EntitiesClient { - /** - * Gets all entities. - * - * @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 entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityInner get(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java deleted file mode 100644 index bfa335c3065e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java +++ /dev/null @@ -1,52 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; - -/** An instance of this class provides access to all the operations defined in EntitiesGetTimelinesClient. */ -public interface EntitiesGetTimelinesClient { - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - 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 deleted file mode 100644 index 10130bd876ab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesRelationsClient.java +++ /dev/null @@ -1,57 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in EntitiesRelationsClient. */ -public interface EntitiesRelationsClient { - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java deleted file mode 100644 index 68ba3c6be0c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java +++ /dev/null @@ -1,142 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; - -/** An instance of this class provides access to all the operations defined in EntityQueriesClient. */ -public interface EntityQueriesClient { - /** - * Gets all entity queries. - * - * @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 entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); -} 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 deleted file mode 100644 index 96c60a276dae..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java +++ /dev/null @@ -1,75 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; - -/** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ -public interface EntityQueryTemplatesClient { - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java deleted file mode 100644 index 9f6c0165269d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java +++ /dev/null @@ -1,46 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - -/** An instance of this class provides access to all the operations defined in EntityRelationsClient. */ -public interface EntityRelationsClient { - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java deleted file mode 100644 index 91450d050bde..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java +++ /dev/null @@ -1,184 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; - -/** An instance of this class provides access to all the operations defined in FileImportsClient. */ -public interface FileImportsClient { - /** - * Gets all file imports. - * - * @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 file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId, Context context); -} 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 c8f34adc3578..6ea533722f10 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 @@ -14,7 +14,7 @@ /** An instance of this class provides access to all the operations defined in IncidentCommentsClient. */ public interface IncidentCommentsClient { /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -22,13 +22,13 @@ 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 as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -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 as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -57,110 +57,110 @@ PagedIterable list( Context context); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return a comment for a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return a comment for a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentCommentInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. + * @return represents an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment); + IncidentCommentInner incidentComment, + Context context); /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. + * @return represents an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + IncidentCommentInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment, - Context context); + IncidentCommentInner incidentComment); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java index 8f2125a0506d..bb3cd56384e4 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 @@ -14,7 +14,7 @@ /** An instance of this class provides access to all the operations defined in IncidentRelationsClient. */ public interface IncidentRelationsClient { /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -22,13 +22,13 @@ 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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( @@ -57,22 +57,7 @@ PagedIterable list( Context context); /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - - /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -82,31 +67,29 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response}. + * @return a relation for a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return a relation for a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -129,21 +112,24 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + RelationInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -158,4 +144,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + + /** + * Deletes a relation for a given incident. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param relationName Relation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java index 12e0bda1f5e8..33a80a3568b4 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 @@ -13,47 +13,9 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; 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. * @@ -95,21 +57,7 @@ PagedIterable list( Context context); /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -118,30 +66,28 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates or updates the incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); + IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -158,20 +104,23 @@ Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context); /** - * Delete the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents an incident in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId); + IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -187,44 +136,36 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. + * @return all alerts for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context); + Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -232,13 +173,13 @@ Response createTeamWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all alerts for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident alerts. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -247,14 +188,14 @@ Response createTeamWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all bookmarks for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listAlertsWithResponse( + Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -262,13 +203,13 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all bookmarks for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident bookmarks. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -277,14 +218,14 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all entities for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listBookmarksWithResponse( + Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -292,24 +233,8 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all entities for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java deleted file mode 100644 index 50c85d732cb8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java +++ /dev/null @@ -1,41 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; - -/** An instance of this class provides access to all the operations defined in IpGeodatasClient. */ -public interface IpGeodatasClient { - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); -} 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 deleted file mode 100644 index a42eaa9112f1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ /dev/null @@ -1,188 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; - -/** An instance of this class provides access to all the operations defined in MetadatasClient. */ -public interface MetadatasClient { - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context); - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context); -} 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 deleted file mode 100644 index 09ab2236789b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java +++ /dev/null @@ -1,101 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; - -/** An instance of this class provides access to all the operations defined in OfficeConsentsClient. */ -public interface OfficeConsentsClient { - /** - * Gets all office365 consents. - * - * @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 office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all office365 consents. - * - * @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 office365 consents as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String consentId); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java deleted file mode 100644 index ddb0f006d6b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java +++ /dev/null @@ -1,133 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** An instance of this class provides access to all the operations defined in ProductSettingsClient. */ -public interface ProductSettingsClient { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingListInner list(String resourceGroupName, String workspaceName); - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, 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 4d9c0b816c82..07f4d38239f7 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,13 +72,6 @@ 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. * @@ -87,81 +80,18 @@ public interface SecurityInsights { BookmarksClient getBookmarks(); /** - * Gets the BookmarkRelationsClient object to access its operations. - * - * @return the BookmarkRelationsClient object. - */ - BookmarkRelationsClient getBookmarkRelations(); - - /** - * Gets the BookmarkOperationsClient object to access its operations. - * - * @return the BookmarkOperationsClient object. - */ - BookmarkOperationsClient getBookmarkOperations(); - - /** - * Gets the IpGeodatasClient object to access its operations. - * - * @return the IpGeodatasClient object. - */ - IpGeodatasClient getIpGeodatas(); - - /** - * Gets the DomainWhoisClient object to access its operations. - * - * @return the DomainWhoisClient object. - */ - DomainWhoisClient getDomainWhois(); - - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - EntitiesClient getEntities(); - - /** - * Gets the EntitiesGetTimelinesClient object to access its operations. - * - * @return the EntitiesGetTimelinesClient object. - */ - EntitiesGetTimelinesClient getEntitiesGetTimelines(); - - /** - * Gets the EntitiesRelationsClient object to access its operations. - * - * @return the EntitiesRelationsClient object. - */ - EntitiesRelationsClient getEntitiesRelations(); - - /** - * Gets the EntityRelationsClient object to access its operations. - * - * @return the EntityRelationsClient object. - */ - EntityRelationsClient getEntityRelations(); - - /** - * Gets the EntityQueriesClient object to access its operations. - * - * @return the EntityQueriesClient object. - */ - EntityQueriesClient getEntityQueries(); - - /** - * Gets the EntityQueryTemplatesClient object to access its operations. + * Gets the DataConnectorsClient object to access its operations. * - * @return the EntityQueryTemplatesClient object. + * @return the DataConnectorsClient object. */ - EntityQueryTemplatesClient getEntityQueryTemplates(); + DataConnectorsClient getDataConnectors(); /** - * Gets the FileImportsClient object to access its operations. + * Gets the IncidentsClient object to access its operations. * - * @return the FileImportsClient object. + * @return the IncidentsClient object. */ - FileImportsClient getFileImports(); + IncidentsClient getIncidents(); /** * Gets the IncidentCommentsClient object to access its operations. @@ -177,20 +107,6 @@ public interface SecurityInsights { */ IncidentRelationsClient getIncidentRelations(); - /** - * Gets the MetadatasClient object to access its operations. - * - * @return the MetadatasClient object. - */ - MetadatasClient getMetadatas(); - - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - OfficeConsentsClient getOfficeConsents(); - /** * Gets the SentinelOnboardingStatesClient object to access its operations. * @@ -205,27 +121,6 @@ public interface SecurityInsights { */ SecurityMLAnalyticsSettingsClient getSecurityMLAnalyticsSettings(); - /** - * Gets the ProductSettingsClient object to access its operations. - * - * @return the ProductSettingsClient object. - */ - ProductSettingsClient getProductSettings(); - - /** - * Gets the SourceControlsClient object to access its operations. - * - * @return the SourceControlsClient object. - */ - SourceControlsClient getSourceControls(); - - /** - * Gets the SourceControlsOperationsClient object to access its operations. - * - * @return the SourceControlsOperationsClient object. - */ - SourceControlsOperationsClient getSourceControlsOperations(); - /** * Gets the ThreatIntelligenceIndicatorsClient object to access its operations. * @@ -261,20 +156,6 @@ public interface SecurityInsights { */ WatchlistItemsClient getWatchlistItems(); - /** - * Gets the DataConnectorsClient object to access its operations. - * - * @return the DataConnectorsClient object. - */ - DataConnectorsClient getDataConnectors(); - - /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. - * - * @return the DataConnectorsCheckRequirementsOperationsClient object. - */ - DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations(); - /** * Gets the OperationsClient object to access its operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java index 421b46427588..4a2af29bc349 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java @@ -47,13 +47,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -61,15 +63,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -78,17 +78,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -97,19 +99,17 @@ SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -117,12 +117,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -130,13 +133,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java index 10a75e9aee2e..500eef1cdbde 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java @@ -13,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ public interface SentinelOnboardingStatesClient { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - /** * Get Sentinel onboarding state. * @@ -45,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Create Sentinel onboarding state. + * Get Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -56,7 +41,7 @@ Response getWithResponse( * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner create( + SentinelOnboardingStateInner get( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** @@ -81,7 +66,7 @@ Response createWithResponse( Context context); /** - * Delete Sentinel onboarding state. + * Create Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -89,9 +74,11 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + SentinelOnboardingStateInner create( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -110,17 +97,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Gets all Sentinel onboarding states. + * Delete Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. @@ -136,4 +123,17 @@ Response deleteWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Gets all Sentinel onboarding states. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Sentinel onboarding states. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java deleted file mode 100644 index df97d27b4605..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java +++ /dev/null @@ -1,45 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.RepoType; - -/** An instance of this class provides access to all the operations defined in SourceControlsClient. */ -public interface SourceControlsClient { - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - 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/fluent/SourceControlsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java deleted file mode 100644 index cbf7109c8ebb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java +++ /dev/null @@ -1,138 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; - -/** An instance of this class provides access to all the operations defined in SourceControlsOperationsClient. */ -public interface SourceControlsOperationsClient { - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java index 326b9eedc2e1..7c8b95c16111 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java @@ -19,27 +19,27 @@ public interface ThreatIntelligenceIndicatorMetricsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 1e34a2b75f05..b8bcc35455e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java @@ -16,21 +16,6 @@ /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public interface ThreatIntelligenceIndicatorsClient { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -51,18 +36,19 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -81,23 +67,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -121,17 +102,23 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -148,6 +135,19 @@ Response createWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -191,16 +191,19 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -209,19 +212,16 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -230,17 +230,19 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -249,17 +251,15 @@ ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceTagsWithResponse( + ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java index bbb61deb6dee..0b5fe047d34a 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 @@ -34,11 +34,11 @@ public interface ThreatIntelligenceIndicatorsOperationsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -50,8 +50,8 @@ PagedIterable list( String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java index 80ba49f0d3be..eb6ea4f65240 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 @@ -14,11 +14,11 @@ /** An instance of this class provides access to all the operations defined in WatchlistItemsClient. */ public interface WatchlistItemsClient { /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -28,11 +28,11 @@ public interface WatchlistItemsClient { PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -47,110 +47,110 @@ PagedIterable list( String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist item along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist item. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist Item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem); + WatchlistItemInner watchlistItem, + Context context); /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist Item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context); + WatchlistItemInner watchlistItem); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java index 10b174e1207f..65c90c3f5868 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,13 +10,11 @@ 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 { /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -29,7 +27,7 @@ public interface WatchlistsClient { PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -47,106 +45,100 @@ PagedIterable list( String resourceGroupName, String workspaceName, String skipToken, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. * * @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 watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights. + * @return represents a Watchlist in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To - * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context); + WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java deleted file mode 100644 index ca6a6d8e19e0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** AAD (Azure Active Directory) requirements check properties. */ -@Fluent -public final class AadCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public AadCheckRequirementsProperties 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/AadDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java index be85a145cdd0..88b429d8c669 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java @@ -6,18 +6,47 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.fasterxml.jackson.annotation.JsonProperty; /** AAD (Azure Active Directory) data connector properties. */ @Fluent -public final class AadDataConnectorProperties extends DataConnectorTenantId { +public final class AadDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The available data types for the connector. */ @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AadDataConnectorProperties class. */ + public AadDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 AadDataConnectorProperties object itself. + */ + public AadDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -38,21 +67,12 @@ public AadDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector da return this; } - /** {@inheritDoc} */ - @Override - public AadDataConnectorProperties 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) { dataTypes().validate(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java deleted file mode 100644 index ee6d93cd9141..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** AATP (Azure Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class AatpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public AatpCheckRequirementsProperties 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/AatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java index 3a0bdc1ed428..9787ed64ae96 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java @@ -6,18 +6,47 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.fasterxml.jackson.annotation.JsonProperty; /** AATP (Azure Advanced Threat Protection) data connector properties. */ @Fluent -public final class AatpDataConnectorProperties extends DataConnectorTenantId { +public final class AatpDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The available data types for the connector. */ @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AatpDataConnectorProperties class. */ + public AatpDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 AatpDataConnectorProperties object itself. + */ + public AatpDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -38,21 +67,12 @@ public AatpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector d return this; } - /** {@inheritDoc} */ - @Override - public AatpDataConnectorProperties 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) { dataTypes().validate(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java index 22c53e70b336..793c0838fdbb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java @@ -4,12 +4,20 @@ package com.azure.resourcemanager.securityinsights.fluent.models; +import com.azure.core.annotation.Fluent; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; import java.util.UUID; +import java.util.regex.Pattern; -/** Account entity property bag. */ +/** + * Account entity property bag. + */ @Immutable public final class AccountEntityProperties extends EntityCommonProperties { /* @@ -50,7 +58,7 @@ public final class AccountEntityProperties extends EntityCommonProperties { private Boolean isDomainJoined; /* - * The NetBIOS domain name as it appears in the alert format domain/username. Examples: NT AUTHORITY. + * The NetBIOS domain name as it appears in the alert format - domain\username. Examples: NT AUTHORITY. */ @JsonProperty(value = "ntDomain", access = JsonProperty.Access.WRITE_ONLY) private String ntDomain; @@ -86,9 +94,15 @@ public final class AccountEntityProperties extends EntityCommonProperties { @JsonProperty(value = "dnsDomain", access = JsonProperty.Access.WRITE_ONLY) private String dnsDomain; + /** + * Creates an instance of AccountEntityProperties class. + */ + public AccountEntityProperties() { + } + /** * Get the aadTenantId property: The Azure Active Directory tenant id. - * + * * @return the aadTenantId value. */ public String aadTenantId() { @@ -97,7 +111,7 @@ public String aadTenantId() { /** * Get the aadUserId property: The Azure Active Directory user id. - * + * * @return the aadUserId value. */ public String aadUserId() { @@ -107,7 +121,7 @@ public String aadUserId() { /** * Get the accountName property: The name of the account. This field should hold only the name without any domain * added to it, i.e. administrator. - * + * * @return the accountName value. */ public String accountName() { @@ -116,7 +130,7 @@ public String accountName() { /** * Get the displayName property: The display name of the account. - * + * * @return the displayName value. */ public String displayName() { @@ -126,7 +140,7 @@ public String displayName() { /** * Get the hostEntityId property: The Host entity id that contains the account in case it is a local account (not * domain joined). - * + * * @return the hostEntityId value. */ public String hostEntityId() { @@ -135,7 +149,7 @@ public String hostEntityId() { /** * Get the isDomainJoined property: Determines whether this is a domain account. - * + * * @return the isDomainJoined value. */ public Boolean isDomainJoined() { @@ -143,9 +157,9 @@ public Boolean isDomainJoined() { } /** - * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format domain/username. Examples: - * NT AUTHORITY. - * + * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format - domain\username. + * Examples: NT AUTHORITY. + * * @return the ntDomain value. */ public String ntDomain() { @@ -155,7 +169,7 @@ public String ntDomain() { /** * Get the objectGuid property: The objectGUID attribute is a single-value attribute that is the unique identifier * for the object, assigned by active directory. - * + * * @return the objectGuid value. */ public UUID objectGuid() { @@ -164,7 +178,7 @@ public UUID objectGuid() { /** * Get the puid property: The Azure Active Directory Passport User ID. - * + * * @return the puid value. */ public String puid() { @@ -173,7 +187,7 @@ public String puid() { /** * Get the sid property: The account security identifier, e.g. S-1-5-18. - * + * * @return the sid value. */ public String sid() { @@ -183,7 +197,7 @@ public String sid() { /** * Get the upnSuffix property: The user principal name suffix for the account, in some cases it is also the domain * name. Examples: contoso.com. - * + * * @return the upnSuffix value. */ public String upnSuffix() { @@ -192,7 +206,7 @@ public String upnSuffix() { /** * Get the dnsDomain property: The fully qualified domain DNS name. - * + * * @return the dnsDomain value. */ public String dnsDomain() { @@ -201,7 +215,7 @@ public String dnsDomain() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java index 412a0c40b92e..67708914e084 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java @@ -18,6 +18,10 @@ public final class ActionRequestProperties extends ActionPropertiesBase { @JsonProperty(value = "triggerUri", required = true) private String triggerUri; + /** Creates an instance of ActionRequestProperties class. */ + public ActionRequestProperties() { + } + /** * Get the triggerUri property: Logic App Callback URL for this specific workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java index 3122bbedd575..960532a3b361 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java @@ -5,18 +5,55 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; /** Action for alert rule. */ @Fluent -public final class ActionResponseInner extends ResourceWithEtag { +public final class ActionResponseInner extends ProxyResource { + /* + * Etag of the action. + */ + @JsonProperty(value = "etag") + private String etag; + /* * Action properties for get request */ @JsonProperty(value = "properties") private ActionResponseProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ActionResponseInner class. */ + public ActionResponseInner() { + } + + /** + * Get the etag property: Etag of the action. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Set the etag property: Etag of the action. + * + * @param etag the etag value to set. + * @return the ActionResponseInner object itself. + */ + public ActionResponseInner withEtag(String etag) { + this.etag = etag; + return this; + } + /** * Get the innerProperties property: Action properties for get request. * @@ -26,11 +63,13 @@ private ActionResponseProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ - @Override - public ActionResponseInner withEtag(String etag) { - super.withEtag(etag); - return this; + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; } /** @@ -86,9 +125,7 @@ public ActionResponseInner withLogicAppResourceId(String logicAppResourceId) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java index 0661a17d6444..785b119c87b9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java @@ -17,6 +17,10 @@ public final class ActionResponseProperties extends ActionPropertiesBase { @JsonProperty(value = "workflowId") private String workflowId; + /** Creates an instance of ActionResponseProperties class. */ + public ActionResponseProperties() { + } + /** * Get the workflowId property: The name of the logic app's workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java deleted file mode 100644 index e3017231f55d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java +++ /dev/null @@ -1,297 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Describes activity entity query properties. */ -@Fluent -public final class ActivityEntityQueriesProperties { - /* - * The entity query title - */ - @JsonProperty(value = "title") - private String title; - - /* - * The entity query content to display in timeline - */ - @JsonProperty(value = "content") - private String content; - - /* - * The entity query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Activity query definitions - */ - @JsonProperty(value = "queryDefinitions") - private ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map> entitiesFilter; - - /* - * The template id this activity was created from - */ - @JsonProperty(value = "templateName") - private String templateName; - - /* - * Determines whether this activity is enabled or disabled. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The time the activity was created - */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * The last time the activity was updated - */ - @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTimeUtc; - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.queryDefinitions; - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withQueryDefinitions( - ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - this.queryDefinitions = queryDefinitions; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withEntitiesFilter(Map> entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.templateName; - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withTemplateName(String templateName) { - this.templateName = templateName; - return this; - } - - /** - * Get the enabled property: Determines whether this activity is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Determines whether this activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityEntityQueriesProperties object itself. - */ - public ActivityEntityQueriesProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedTimeUtc property: The last time the activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryDefinitions() != null) { - queryDefinitions().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java deleted file mode 100644 index f8483ae549dc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java +++ /dev/null @@ -1,245 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueryTemplatePropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.DataTypeDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Describes activity entity query properties. */ -@Fluent -public final class ActivityEntityQueryTemplateProperties { - /* - * The entity query title - */ - @JsonProperty(value = "title") - private String title; - - /* - * The entity query content to display in timeline - */ - @JsonProperty(value = "content") - private String content; - - /* - * The entity query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Activity query definitions - */ - @JsonProperty(value = "queryDefinitions") - private ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions; - - /* - * List of required data types for the given entity query template - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map> entitiesFilter; - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions() { - return this.queryDefinitions; - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withQueryDefinitions( - ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions) { - this.queryDefinitions = queryDefinitions; - return this; - } - - /** - * Get the dataTypes property: List of required data types for the given entity query template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: List of required data types for the given entity query template. - * - * @param dataTypes the dataTypes value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withRequiredInputFieldsSets( - List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueryTemplateProperties object itself. - */ - public ActivityEntityQueryTemplateProperties withEntitiesFilter(Map> entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryDefinitions() != null) { - queryDefinitions().validate(); - } - if (dataTypes() != null) { - dataTypes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java index f3346f5f0a50..9daa6f9da9dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java @@ -6,12 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.FusionAlertRule; -import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRule; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRule; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -24,17 +21,18 @@ defaultImpl = AlertRuleInner.class) @JsonTypeName("AlertRule") @JsonSubTypes({ - @JsonSubTypes.Type(name = "MLBehaviorAnalytics", value = MLBehaviorAnalyticsAlertRule.class), @JsonSubTypes.Type(name = "Fusion", value = FusionAlertRule.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = ThreatIntelligenceAlertRule.class), @JsonSubTypes.Type( name = "MicrosoftSecurityIncidentCreation", value = MicrosoftSecurityIncidentCreationAlertRule.class), - @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRule.class), - @JsonSubTypes.Type(name = "NRT", value = NrtAlertRule.class) + @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRule.class) }) @Fluent public class AlertRuleInner extends ResourceWithEtag { + /** Creates an instance of AlertRuleInner class. */ + public AlertRuleInner() { + } + /** {@inheritDoc} */ @Override public AlertRuleInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java index a3b8dba66899..991b853ffa11 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java @@ -8,11 +8,8 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.securityinsights.models.FusionAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.MLBehaviorAnalyticsAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRuleTemplate; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleTemplate; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAlertRuleTemplate; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -26,14 +23,11 @@ defaultImpl = AlertRuleTemplateInner.class) @JsonTypeName("AlertRuleTemplate") @JsonSubTypes({ - @JsonSubTypes.Type(name = "MLBehaviorAnalytics", value = MLBehaviorAnalyticsAlertRuleTemplate.class), @JsonSubTypes.Type(name = "Fusion", value = FusionAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "ThreatIntelligence", value = ThreatIntelligenceAlertRuleTemplate.class), @JsonSubTypes.Type( name = "MicrosoftSecurityIncidentCreation", value = MicrosoftSecurityIncidentCreationAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRuleTemplate.class), - @JsonSubTypes.Type(name = "NRT", value = NrtAlertRuleTemplate.class) + @JsonSubTypes.Type(name = "Scheduled", value = ScheduledAlertRuleTemplate.class) }) @Immutable public class AlertRuleTemplateInner extends ProxyResource { @@ -43,6 +37,10 @@ public class AlertRuleTemplateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of AlertRuleTemplateInner class. */ + public AlertRuleTemplateInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java deleted file mode 100644 index 1dbd5f5a9d02..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java +++ /dev/null @@ -1,35 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Anomalies property bag. */ -@Immutable -public final class AnomaliesSettingsProperties { - /* - * Determines whether the setting is enable or disabled. - */ - @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEnabled; - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * 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/AnomalySecurityMLAnalyticsSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java index 039d66c00674..f78270cddf6e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java @@ -103,6 +103,10 @@ public final class AnomalySecurityMLAnalyticsSettingsProperties { @JsonProperty(value = "settingsDefinitionId") private UUID settingsDefinitionId; + /** Creates an instance of AnomalySecurityMLAnalyticsSettingsProperties class. */ + public AnomalySecurityMLAnalyticsSettingsProperties() { + } + /** * Get the description property: The description of the SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java deleted file mode 100644 index 4e31c9709d7d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java +++ /dev/null @@ -1,80 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents Codeless API Polling data connector. */ -@Fluent -public final class ApiPollingParameters { - /* - * Config to describe the instructions blade - */ - @JsonProperty(value = "connectorUiConfig") - private CodelessUiConnectorConfigProperties connectorUiConfig; - - /* - * Config to describe the polling instructions - */ - @JsonProperty(value = "pollingConfig") - private CodelessConnectorPollingConfigProperties pollingConfig; - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.connectorUiConfig; - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the ApiPollingParameters object itself. - */ - public ApiPollingParameters withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - this.connectorUiConfig = connectorUiConfig; - return this; - } - - /** - * Get the pollingConfig property: Config to describe the polling instructions. - * - * @return the pollingConfig value. - */ - public CodelessConnectorPollingConfigProperties pollingConfig() { - return this.pollingConfig; - } - - /** - * Set the pollingConfig property: Config to describe the polling instructions. - * - * @param pollingConfig the pollingConfig value to set. - * @return the ApiPollingParameters object itself. - */ - public ApiPollingParameters withPollingConfig(CodelessConnectorPollingConfigProperties pollingConfig) { - this.pollingConfig = pollingConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectorUiConfig() != null) { - connectorUiConfig().validate(); - } - if (pollingConfig() != null) { - pollingConfig().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java deleted file mode 100644 index c7755a357b32..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java +++ /dev/null @@ -1,46 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** ASC (Azure Security Center) requirements check properties. */ -@Fluent -public final class AscCheckRequirementsProperties { - /* - * 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 AscCheckRequirementsProperties object itself. - */ - public AscCheckRequirementsProperties 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/AscDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java index 486d75131f91..51c71ec827fa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AscDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscDataConnectorProperties class. */ + public AscDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java index 1880bf1f167c..0523e36cd73d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java @@ -23,6 +23,10 @@ public final class AutomationRuleInner extends ResourceWithEtag { @JsonProperty(value = "properties", required = true) private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); + /** Creates an instance of AutomationRuleInner class. */ + public AutomationRuleInner() { + } + /** * Get the innerProperties property: Automation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java index 7208c57ed3b7..14f1541454b6 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 @@ -17,37 +17,37 @@ @Fluent public final class AutomationRuleProperties { /* - * The display name of the automation rule. + * The display name of the automation rule */ @JsonProperty(value = "displayName", required = true) private String displayName; /* - * The order of execution of the automation rule. + * The order of execution of the automation rule */ @JsonProperty(value = "order", required = true) private int order; /* - * Describes automation rule triggering logic. + * Describes automation rule triggering logic */ @JsonProperty(value = "triggeringLogic", required = true) private AutomationRuleTriggeringLogic triggeringLogic; /* - * The actions to execute when the automation rule is triggered. + * The actions to execute when the automation rule is triggered */ @JsonProperty(value = "actions", required = true) private List actions; /* - * The last time the automation rule was updated. + * The last time the automation rule was updated */ @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedTimeUtc; /* - * The time the automation rule was created. + * The time the automation rule was created */ @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createdTimeUtc; @@ -64,6 +64,10 @@ public final class AutomationRuleProperties { @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo createdBy; + /** Creates an instance of AutomationRuleProperties class. */ + public AutomationRuleProperties() { + } + /** * Get the displayName property: The display name of the automation rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java index 49ef9cc2defa..3f152b62a05d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java @@ -5,7 +5,6 @@ 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.AwsCloudTrailDataConnectorDataTypes; import com.fasterxml.jackson.annotation.JsonProperty; @@ -21,9 +20,13 @@ public final class AwsCloudTrailDataConnectorProperties { /* * The available data types for the connector. */ - @JsonProperty(value = "dataTypes", required = true) + @JsonProperty(value = "dataTypes") private AwsCloudTrailDataConnectorDataTypes dataTypes; + /** Creates an instance of AwsCloudTrailDataConnectorProperties class. */ + public AwsCloudTrailDataConnectorProperties() { + } + /** * Get the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws * account. @@ -72,15 +75,8 @@ public AwsCloudTrailDataConnectorProperties withDataTypes(AwsCloudTrailDataConne * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model AwsCloudTrailDataConnectorProperties")); - } else { + if (dataTypes() != null) { dataTypes().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java deleted file mode 100644 index fb81e27a8457..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java +++ /dev/null @@ -1,155 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Amazon Web Services S3 data connector properties. */ -@Fluent -public final class AwsS3DataConnectorProperties { - /* - * The logs destination table name in LogAnalytics. - */ - @JsonProperty(value = "destinationTable", required = true) - private String destinationTable; - - /* - * The AWS sqs urls for the connector. - */ - @JsonProperty(value = "sqsUrls", required = true) - private List sqsUrls; - - /* - * The Aws Role Arn that is used to access the Aws account. - */ - @JsonProperty(value = "roleArn", required = true) - private String roleArn; - - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private AwsS3DataConnectorDataTypes dataTypes; - - /** - * Get the destinationTable property: The logs destination table name in LogAnalytics. - * - * @return the destinationTable value. - */ - public String destinationTable() { - return this.destinationTable; - } - - /** - * Set the destinationTable property: The logs destination table name in LogAnalytics. - * - * @param destinationTable the destinationTable value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withDestinationTable(String destinationTable) { - this.destinationTable = destinationTable; - return this; - } - - /** - * Get the sqsUrls property: The AWS sqs urls for the connector. - * - * @return the sqsUrls value. - */ - public List sqsUrls() { - return this.sqsUrls; - } - - /** - * Set the sqsUrls property: The AWS sqs urls for the connector. - * - * @param sqsUrls the sqsUrls value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withSqsUrls(List sqsUrls) { - this.sqsUrls = sqsUrls; - return this; - } - - /** - * Get the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @return the roleArn value. - */ - public String roleArn() { - return this.roleArn; - } - - /** - * Set the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @param roleArn the roleArn value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withRoleArn(String roleArn) { - this.roleArn = roleArn; - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsS3DataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the AwsS3DataConnectorProperties object itself. - */ - public AwsS3DataConnectorProperties withDataTypes(AwsS3DataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationTable() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property destinationTable in model AwsS3DataConnectorProperties")); - } - if (sqsUrls() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sqsUrls in model AwsS3DataConnectorProperties")); - } - if (roleArn() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property roleArn in model AwsS3DataConnectorProperties")); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model AwsS3DataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java index e73dcc2482d4..6fe113c9c158 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java @@ -23,6 +23,10 @@ public final class AzureResourceEntityProperties extends EntityCommonProperties @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; + /** Creates an instance of AzureResourceEntityProperties class. */ + public AzureResourceEntityProperties() { + } + /** * Get the resourceId property: The azure resource id of the resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java deleted file mode 100644 index 24e6c6ae3a87..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java +++ /dev/null @@ -1,80 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The entity expansion result operation response. */ -@Fluent -public final class BookmarkExpandResponseInner { - /* - * The metadata from the expansion operation results. - */ - @JsonProperty(value = "metaData") - private ExpansionResultsMetadata metadata; - - /* - * The expansion result values. - */ - @JsonProperty(value = "value") - private BookmarkExpandResponseValue value; - - /** - * Get the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - public ExpansionResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the expansion operation results. - * - * @param metadata the metadata value to set. - * @return the BookmarkExpandResponseInner object itself. - */ - public BookmarkExpandResponseInner withMetadata(ExpansionResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The expansion result values. - * - * @return the value value. - */ - public BookmarkExpandResponseValue value() { - return this.value; - } - - /** - * Set the value property: The expansion result values. - * - * @param value the value value to set. - * @return the BookmarkExpandResponseInner object itself. - */ - public BookmarkExpandResponseInner withValue(BookmarkExpandResponseValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().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 5d04c419ecc5..0c087a3a4551 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; -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; @@ -23,6 +21,10 @@ public final class BookmarkInner extends ResourceWithEtag { @JsonProperty(value = "properties") private BookmarkProperties innerProperties; + /** Creates an instance of BookmarkInner class. */ + public BookmarkInner() { + } + /** * Get the innerProperties property: Bookmark properties. * @@ -338,75 +340,6 @@ 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 44be7d59238a..fe7e5cbb2b8d 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,8 +6,6 @@ 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.JsonProperty; @@ -95,23 +93,9 @@ 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; + /** Creates an instance of BookmarkProperties class. */ + public BookmarkProperties() { + } /** * Get the created property: The time the bookmark was created. @@ -373,66 +357,6 @@ 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. * @@ -458,9 +382,6 @@ public void validate() { if (incidentInfo() != null) { incidentInfo().validate(); } - if (entityMappings() != null) { - entityMappings().forEach(e -> e.validate()); - } } private static final ClientLogger LOGGER = new ClientLogger(BookmarkProperties.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java index 3b8a4b7b7a4e..0a73580c561b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java @@ -30,6 +30,10 @@ public final class CloudApplicationEntityProperties extends EntityCommonProperti @JsonProperty(value = "instanceName", access = JsonProperty.Access.WRITE_ONLY) private String instanceName; + /** Creates an instance of CloudApplicationEntityProperties class. */ + public CloudApplicationEntityProperties() { + } + /** * Get the appId property: The technical identifier of the application. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java deleted file mode 100644 index ec2fa5baa272..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java +++ /dev/null @@ -1,50 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents Codeless UI data connector. */ -@Fluent -public final class CodelessParameters { - /* - * Config to describe the instructions blade - */ - @JsonProperty(value = "connectorUiConfig") - private CodelessUiConnectorConfigProperties connectorUiConfig; - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.connectorUiConfig; - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessParameters object itself. - */ - public CodelessParameters withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - this.connectorUiConfig = connectorUiConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectorUiConfig() != null) { - connectorUiConfig().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 cfec062d1609..06be9daa98ff 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 @@ -9,23 +9,11 @@ import com.azure.resourcemanager.securityinsights.models.AatpDataConnector; import com.azure.resourcemanager.securityinsights.models.AscDataConnector; import com.azure.resourcemanager.securityinsights.models.AwsCloudTrailDataConnector; -import com.azure.resourcemanager.securityinsights.models.AwsS3DataConnector; -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; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -39,28 +27,20 @@ @JsonTypeName("DataConnector") @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureActiveDirectory", value = AadDataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftThreatIntelligence", value = MstiDataConnector.class), - @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpDataConnector.class), @JsonSubTypes.Type(name = "AzureAdvancedThreatProtection", value = AatpDataConnector.class), @JsonSubTypes.Type(name = "AzureSecurityCenter", value = AscDataConnector.class), @JsonSubTypes.Type(name = "AmazonWebServicesCloudTrail", value = AwsCloudTrailDataConnector.class), - @JsonSubTypes.Type(name = "AmazonWebServicesS3", value = AwsS3DataConnector.class), @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) + @JsonSubTypes.Type(name = "Office365", value = OfficeDataConnector.class) }) @Fluent public class DataConnectorInner extends ResourceWithEtag { + /** Creates an instance of DataConnectorInner class. */ + public DataConnectorInner() { + } + /** {@inheritDoc} */ @Override public DataConnectorInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java deleted file mode 100644 index 6fde14a69e47..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java +++ /dev/null @@ -1,75 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorAuthorizationState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Data connector requirements status. */ -@Fluent -public final class DataConnectorRequirementsStateInner { - /* - * Authorization state for this connector - */ - @JsonProperty(value = "authorizationState") - private DataConnectorAuthorizationState authorizationState; - - /* - * License state for this connector - */ - @JsonProperty(value = "licenseState") - private DataConnectorLicenseState licenseState; - - /** - * Get the authorizationState property: Authorization state for this connector. - * - * @return the authorizationState value. - */ - public DataConnectorAuthorizationState authorizationState() { - return this.authorizationState; - } - - /** - * Set the authorizationState property: Authorization state for this connector. - * - * @param authorizationState the authorizationState value to set. - * @return the DataConnectorRequirementsStateInner object itself. - */ - public DataConnectorRequirementsStateInner withAuthorizationState( - DataConnectorAuthorizationState authorizationState) { - this.authorizationState = authorizationState; - return this; - } - - /** - * Get the licenseState property: License state for this connector. - * - * @return the licenseState value. - */ - public DataConnectorLicenseState licenseState() { - return this.licenseState; - } - - /** - * Set the licenseState property: License state for this connector. - * - * @param licenseState the licenseState value to set. - * @return the DataConnectorRequirementsStateInner object itself. - */ - public DataConnectorRequirementsStateInner withLicenseState(DataConnectorLicenseState licenseState) { - this.licenseState = licenseState; - 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/DnsEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java index 5565c6456bf3..b197548705d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java @@ -36,6 +36,10 @@ public final class DnsEntityProperties extends EntityCommonProperties { @JsonProperty(value = "ipAddressEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List ipAddressEntityIds; + /** Creates an instance of DnsEntityProperties class. */ + public DnsEntityProperties() { + } + /** * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java deleted file mode 100644 index e88e1fce95ed..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Dynamics365 requirements check properties. */ -@Fluent -public final class Dynamics365CheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public Dynamics365CheckRequirementsProperties 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/Dynamics365DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java deleted file mode 100644 index bde2773bc7c9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java +++ /dev/null @@ -1,68 +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.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.Dynamics365DataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dynamics365 data connector properties. */ -@Fluent -public final class Dynamics365DataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private Dynamics365DataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Dynamics365DataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the Dynamics365DataConnectorProperties object itself. - */ - public Dynamics365DataConnectorProperties withDataTypes(Dynamics365DataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnectorProperties 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 Dynamics365DataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java deleted file mode 100644 index 17b9864df9bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java +++ /dev/null @@ -1,181 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhoisDetails; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Whois information for a given domain and associated metadata. */ -@Fluent -public final class EnrichmentDomainWhoisInner { - /* - * The domain for this whois record - */ - @JsonProperty(value = "domain") - private String domain; - - /* - * The hostname of this registrar's whois server - */ - @JsonProperty(value = "server") - private String server; - - /* - * The timestamp at which this record was created - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /* - * The timestamp at which this record was last updated - */ - @JsonProperty(value = "updated") - private OffsetDateTime updated; - - /* - * The timestamp at which this record will expire - */ - @JsonProperty(value = "expires") - private OffsetDateTime expires; - - /* - * The whois record for a given domain - */ - @JsonProperty(value = "parsedWhois") - private EnrichmentDomainWhoisDetails parsedWhois; - - /** - * Get the domain property: The domain for this whois record. - * - * @return the domain value. - */ - public String domain() { - return this.domain; - } - - /** - * Set the domain property: The domain for this whois record. - * - * @param domain the domain value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withDomain(String domain) { - this.domain = domain; - return this; - } - - /** - * Get the server property: The hostname of this registrar's whois server. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: The hostname of this registrar's whois server. - * - * @param server the server value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the created property: The timestamp at which this record was created. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The timestamp at which this record was created. - * - * @param created the created value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Get the updated property: The timestamp at which this record was last updated. - * - * @return the updated value. - */ - public OffsetDateTime updated() { - return this.updated; - } - - /** - * Set the updated property: The timestamp at which this record was last updated. - * - * @param updated the updated value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withUpdated(OffsetDateTime updated) { - this.updated = updated; - return this; - } - - /** - * Get the expires property: The timestamp at which this record will expire. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Set the expires property: The timestamp at which this record will expire. - * - * @param expires the expires value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withExpires(OffsetDateTime expires) { - this.expires = expires; - return this; - } - - /** - * Get the parsedWhois property: The whois record for a given domain. - * - * @return the parsedWhois value. - */ - public EnrichmentDomainWhoisDetails parsedWhois() { - return this.parsedWhois; - } - - /** - * Set the parsedWhois property: The whois record for a given domain. - * - * @param parsedWhois the parsedWhois value to set. - * @return the EnrichmentDomainWhoisInner object itself. - */ - public EnrichmentDomainWhoisInner withParsedWhois(EnrichmentDomainWhoisDetails parsedWhois) { - this.parsedWhois = parsedWhois; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parsedWhois() != null) { - parsedWhois().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java deleted file mode 100644 index 8fc05f9c066a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java +++ /dev/null @@ -1,468 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Geodata information for a given IP address. */ -@Fluent -public final class EnrichmentIpGeodataInner { - /* - * The autonomous system number associated with this IP address - */ - @JsonProperty(value = "asn") - private String asn; - - /* - * The name of the carrier for this IP address - */ - @JsonProperty(value = "carrier") - private String carrier; - - /* - * The city this IP address is located in - */ - @JsonProperty(value = "city") - private String city; - - /* - * A numeric rating of confidence that the value in the 'city' field is correct, on a scale of 0-100 - */ - @JsonProperty(value = "cityCf") - private Integer cityCf; - - /* - * The continent this IP address is located on - */ - @JsonProperty(value = "continent") - private String continent; - - /* - * The county this IP address is located in - */ - @JsonProperty(value = "country") - private String country; - - /* - * A numeric rating of confidence that the value in the 'country' field is correct on a scale of 0-100 - */ - @JsonProperty(value = "countryCf") - private Integer countryCf; - - /* - * The dotted-decimal or colon-separated string representation of the IP address - */ - @JsonProperty(value = "ipAddr") - private String ipAddr; - - /* - * A description of the connection type of this IP address - */ - @JsonProperty(value = "ipRoutingType") - private String ipRoutingType; - - /* - * The latitude of this IP address - */ - @JsonProperty(value = "latitude") - private String latitude; - - /* - * The longitude of this IP address - */ - @JsonProperty(value = "longitude") - private String longitude; - - /* - * The name of the organization for this IP address - */ - @JsonProperty(value = "organization") - private String organization; - - /* - * The type of the organization for this IP address - */ - @JsonProperty(value = "organizationType") - private String organizationType; - - /* - * The geographic region this IP address is located in - */ - @JsonProperty(value = "region") - private String region; - - /* - * The state this IP address is located in - */ - @JsonProperty(value = "state") - private String state; - - /* - * A numeric rating of confidence that the value in the 'state' field is correct on a scale of 0-100 - */ - @JsonProperty(value = "stateCf") - private Integer stateCf; - - /* - * The abbreviated name for the state this IP address is located in - */ - @JsonProperty(value = "stateCode") - private String stateCode; - - /** - * Get the asn property: The autonomous system number associated with this IP address. - * - * @return the asn value. - */ - public String asn() { - return this.asn; - } - - /** - * Set the asn property: The autonomous system number associated with this IP address. - * - * @param asn the asn value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withAsn(String asn) { - this.asn = asn; - return this; - } - - /** - * Get the carrier property: The name of the carrier for this IP address. - * - * @return the carrier value. - */ - public String carrier() { - return this.carrier; - } - - /** - * Set the carrier property: The name of the carrier for this IP address. - * - * @param carrier the carrier value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCarrier(String carrier) { - this.carrier = carrier; - return this; - } - - /** - * Get the city property: The city this IP address is located in. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city this IP address is located in. - * - * @param city the city value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a scale - * of 0-100. - * - * @return the cityCf value. - */ - public Integer cityCf() { - return this.cityCf; - } - - /** - * Set the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a scale - * of 0-100. - * - * @param cityCf the cityCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCityCf(Integer cityCf) { - this.cityCf = cityCf; - return this; - } - - /** - * Get the continent property: The continent this IP address is located on. - * - * @return the continent value. - */ - public String continent() { - return this.continent; - } - - /** - * Set the continent property: The continent this IP address is located on. - * - * @param continent the continent value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withContinent(String continent) { - this.continent = continent; - return this; - } - - /** - * Get the country property: The county this IP address is located in. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: The county this IP address is located in. - * - * @param country the country value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @return the countryCf value. - */ - public Integer countryCf() { - return this.countryCf; - } - - /** - * Set the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @param countryCf the countryCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withCountryCf(Integer countryCf) { - this.countryCf = countryCf; - return this; - } - - /** - * Get the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @return the ipAddr value. - */ - public String ipAddr() { - return this.ipAddr; - } - - /** - * Set the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @param ipAddr the ipAddr value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withIpAddr(String ipAddr) { - this.ipAddr = ipAddr; - return this; - } - - /** - * Get the ipRoutingType property: A description of the connection type of this IP address. - * - * @return the ipRoutingType value. - */ - public String ipRoutingType() { - return this.ipRoutingType; - } - - /** - * Set the ipRoutingType property: A description of the connection type of this IP address. - * - * @param ipRoutingType the ipRoutingType value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withIpRoutingType(String ipRoutingType) { - this.ipRoutingType = ipRoutingType; - return this; - } - - /** - * Get the latitude property: The latitude of this IP address. - * - * @return the latitude value. - */ - public String latitude() { - return this.latitude; - } - - /** - * Set the latitude property: The latitude of this IP address. - * - * @param latitude the latitude value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withLatitude(String latitude) { - this.latitude = latitude; - return this; - } - - /** - * Get the longitude property: The longitude of this IP address. - * - * @return the longitude value. - */ - public String longitude() { - return this.longitude; - } - - /** - * Set the longitude property: The longitude of this IP address. - * - * @param longitude the longitude value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withLongitude(String longitude) { - this.longitude = longitude; - return this; - } - - /** - * Get the organization property: The name of the organization for this IP address. - * - * @return the organization value. - */ - public String organization() { - return this.organization; - } - - /** - * Set the organization property: The name of the organization for this IP address. - * - * @param organization the organization value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withOrganization(String organization) { - this.organization = organization; - return this; - } - - /** - * Get the organizationType property: The type of the organization for this IP address. - * - * @return the organizationType value. - */ - public String organizationType() { - return this.organizationType; - } - - /** - * Set the organizationType property: The type of the organization for this IP address. - * - * @param organizationType the organizationType value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withOrganizationType(String organizationType) { - this.organizationType = organizationType; - return this; - } - - /** - * Get the region property: The geographic region this IP address is located in. - * - * @return the region value. - */ - public String region() { - return this.region; - } - - /** - * Set the region property: The geographic region this IP address is located in. - * - * @param region the region value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withRegion(String region) { - this.region = region; - return this; - } - - /** - * Get the state property: The state this IP address is located in. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The state this IP address is located in. - * - * @param state the state value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withState(String state) { - this.state = state; - return this; - } - - /** - * Get the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @return the stateCf value. - */ - public Integer stateCf() { - return this.stateCf; - } - - /** - * Set the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @param stateCf the stateCf value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withStateCf(Integer stateCf) { - this.stateCf = stateCf; - return this; - } - - /** - * Get the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @return the stateCode value. - */ - public String stateCode() { - return this.stateCode; - } - - /** - * Set the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @param stateCode the stateCode value to set. - * @return the EnrichmentIpGeodataInner object itself. - */ - public EnrichmentIpGeodataInner withStateCode(String stateCode) { - this.stateCode = stateCode; - 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/EntityAnalyticsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java deleted file mode 100644 index 286aa9d87ccc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java +++ /dev/null @@ -1,48 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityProviders; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** EntityAnalytics property bag. */ -@Fluent -public final class EntityAnalyticsProperties { - /* - * The relevant entity providers that are synced - */ - @JsonProperty(value = "entityProviders") - private List entityProviders; - - /** - * Get the entityProviders property: The relevant entity providers that are synced. - * - * @return the entityProviders value. - */ - public List entityProviders() { - return this.entityProviders; - } - - /** - * Set the entityProviders property: The relevant entity providers that are synced. - * - * @param entityProviders the entityProviders value to set. - * @return the EntityAnalyticsProperties object itself. - */ - public EntityAnalyticsProperties withEntityProviders(List entityProviders) { - this.entityProviders = entityProviders; - 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/EntityExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java deleted file mode 100644 index 1526fff102b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java +++ /dev/null @@ -1,80 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The entity expansion result operation response. */ -@Fluent -public final class EntityExpandResponseInner { - /* - * The metadata from the expansion operation results. - */ - @JsonProperty(value = "metaData") - private ExpansionResultsMetadata metadata; - - /* - * The expansion result values. - */ - @JsonProperty(value = "value") - private EntityExpandResponseValue value; - - /** - * Get the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - public ExpansionResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the expansion operation results. - * - * @param metadata the metadata value to set. - * @return the EntityExpandResponseInner object itself. - */ - public EntityExpandResponseInner withMetadata(ExpansionResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The expansion result values. - * - * @return the value value. - */ - public EntityExpandResponseValue value() { - return this.value; - } - - /** - * Set the value property: The expansion result values. - * - * @param value the value value to set. - * @return the EntityExpandResponseInner object itself. - */ - public EntityExpandResponseInner withValue(EntityExpandResponseValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java deleted file mode 100644 index 0b2543093f8e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java +++ /dev/null @@ -1,81 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityInsightItem; -import com.azure.resourcemanager.securityinsights.models.GetInsightsResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The Get Insights result operation response. */ -@Fluent -public final class EntityGetInsightsResponseInner { - /* - * The metadata from the get insights operation results. - */ - @JsonProperty(value = "metaData") - private GetInsightsResultsMetadata metadata; - - /* - * The insights result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the metadata property: The metadata from the get insights operation results. - * - * @return the metadata value. - */ - public GetInsightsResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the get insights operation results. - * - * @param metadata the metadata value to set. - * @return the EntityGetInsightsResponseInner object itself. - */ - public EntityGetInsightsResponseInner withMetadata(GetInsightsResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The insights result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The insights result values. - * - * @param value the value value to set. - * @return the EntityGetInsightsResponseInner object itself. - */ - public EntityGetInsightsResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java deleted file mode 100644 index f829a29d3b07..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java +++ /dev/null @@ -1,92 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.AccountEntity; -import com.azure.resourcemanager.securityinsights.models.AzureResourceEntity; -import com.azure.resourcemanager.securityinsights.models.CloudApplicationEntity; -import com.azure.resourcemanager.securityinsights.models.DnsEntity; -import com.azure.resourcemanager.securityinsights.models.FileEntity; -import com.azure.resourcemanager.securityinsights.models.FileHashEntity; -import com.azure.resourcemanager.securityinsights.models.HostEntity; -import com.azure.resourcemanager.securityinsights.models.HuntingBookmark; -import com.azure.resourcemanager.securityinsights.models.IoTDeviceEntity; -import com.azure.resourcemanager.securityinsights.models.IpEntity; -import com.azure.resourcemanager.securityinsights.models.MailClusterEntity; -import com.azure.resourcemanager.securityinsights.models.MailMessageEntity; -import com.azure.resourcemanager.securityinsights.models.MailboxEntity; -import com.azure.resourcemanager.securityinsights.models.MalwareEntity; -import com.azure.resourcemanager.securityinsights.models.NicEntity; -import com.azure.resourcemanager.securityinsights.models.ProcessEntity; -import com.azure.resourcemanager.securityinsights.models.RegistryKeyEntity; -import com.azure.resourcemanager.securityinsights.models.RegistryValueEntity; -import com.azure.resourcemanager.securityinsights.models.SecurityAlert; -import com.azure.resourcemanager.securityinsights.models.SecurityGroupEntity; -import com.azure.resourcemanager.securityinsights.models.SubmissionMailEntity; -import com.azure.resourcemanager.securityinsights.models.UrlEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityInner.class) -@JsonTypeName("Entity") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SecurityAlert", value = SecurityAlert.class), - @JsonSubTypes.Type(name = "Bookmark", value = HuntingBookmark.class), - @JsonSubTypes.Type(name = "Account", value = AccountEntity.class), - @JsonSubTypes.Type(name = "AzureResource", value = AzureResourceEntity.class), - @JsonSubTypes.Type(name = "CloudApplication", value = CloudApplicationEntity.class), - @JsonSubTypes.Type(name = "DnsResolution", value = DnsEntity.class), - @JsonSubTypes.Type(name = "File", value = FileEntity.class), - @JsonSubTypes.Type(name = "FileHash", value = FileHashEntity.class), - @JsonSubTypes.Type(name = "Host", value = HostEntity.class), - @JsonSubTypes.Type(name = "IoTDevice", value = IoTDeviceEntity.class), - @JsonSubTypes.Type(name = "Ip", value = IpEntity.class), - @JsonSubTypes.Type(name = "Mailbox", value = MailboxEntity.class), - @JsonSubTypes.Type(name = "MailCluster", value = MailClusterEntity.class), - @JsonSubTypes.Type(name = "MailMessage", value = MailMessageEntity.class), - @JsonSubTypes.Type(name = "Malware", value = MalwareEntity.class), - @JsonSubTypes.Type(name = "Process", value = ProcessEntity.class), - @JsonSubTypes.Type(name = "RegistryKey", value = RegistryKeyEntity.class), - @JsonSubTypes.Type(name = "RegistryValue", value = RegistryValueEntity.class), - @JsonSubTypes.Type(name = "SecurityGroup", value = SecurityGroupEntity.class), - @JsonSubTypes.Type(name = "SubmissionMail", value = SubmissionMailEntity.class), - @JsonSubTypes.Type(name = "Url", value = UrlEntity.class), - @JsonSubTypes.Type(name = "Nic", value = NicEntity.class) -}) -@Immutable -public class EntityInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java deleted file mode 100644 index f1bdc7049f0e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java +++ /dev/null @@ -1,44 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ExpansionEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryInner.class) -@JsonTypeName("EntityQuery") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Expansion", value = ExpansionEntityQuery.class), - @JsonSubTypes.Type(name = "Activity", value = ActivityEntityQuery.class) -}) -@Fluent -public class EntityQueryInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public EntityQueryInner withEtag(String etag) { - super.withEtag(etag); - 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/EntityQueryTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java deleted file mode 100644 index b0d7b460f1ae..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java +++ /dev/null @@ -1,48 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueryTemplate; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query template. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryTemplateInner.class) -@JsonTypeName("EntityQueryTemplate") -@JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityEntityQueryTemplate.class)}) -@Immutable -public class EntityQueryTemplateInner extends ProxyResource { - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java deleted file mode 100644 index 14d25888dac9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java +++ /dev/null @@ -1,81 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineItem; -import com.azure.resourcemanager.securityinsights.models.TimelineResultsMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The entity timeline result operation response. */ -@Fluent -public final class EntityTimelineResponseInner { - /* - * The metadata from the timeline operation results. - */ - @JsonProperty(value = "metaData") - private TimelineResultsMetadata metadata; - - /* - * The timeline result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the metadata property: The metadata from the timeline operation results. - * - * @return the metadata value. - */ - public TimelineResultsMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: The metadata from the timeline operation results. - * - * @param metadata the metadata value to set. - * @return the EntityTimelineResponseInner object itself. - */ - public EntityTimelineResponseInner withMetadata(TimelineResultsMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the value property: The timeline result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The timeline result values. - * - * @param value the value value to set. - * @return the EntityTimelineResponseInner object itself. - */ - public EntityTimelineResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java deleted file mode 100644 index 5f1ff9e9d6f5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java +++ /dev/null @@ -1,178 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes expansion entity query properties. */ -@Fluent -public final class ExpansionEntityQueriesProperties { - /* - * List of the data sources that are required to run the query - */ - @JsonProperty(value = "dataSources") - private List dataSources; - - /* - * The query display name - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The type of the query's source entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * List of the fields of the source entity that are required to run the query - */ - @JsonProperty(value = "inputFields") - private List inputFields; - - /* - * List of the desired output types to be constructed from the result - */ - @JsonProperty(value = "outputEntityTypes") - private List outputEntityTypes; - - /* - * The template query string to be parsed and formatted - */ - @JsonProperty(value = "queryTemplate") - private String queryTemplate; - - /** - * Get the dataSources property: List of the data sources that are required to run the query. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.dataSources; - } - - /** - * Set the dataSources property: List of the data sources that are required to run the query. - * - * @param dataSources the dataSources value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withDataSources(List dataSources) { - this.dataSources = dataSources; - return this; - } - - /** - * Get the displayName property: The query display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The query display name. - * - * @param displayName the displayName value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @return the inputFields value. - */ - public List inputFields() { - return this.inputFields; - } - - /** - * Set the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @param inputFields the inputFields value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withInputFields(List inputFields) { - this.inputFields = inputFields; - return this; - } - - /** - * Get the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @return the outputEntityTypes value. - */ - public List outputEntityTypes() { - return this.outputEntityTypes; - } - - /** - * Set the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @param outputEntityTypes the outputEntityTypes value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withOutputEntityTypes(List outputEntityTypes) { - this.outputEntityTypes = outputEntityTypes; - return this; - } - - /** - * Get the queryTemplate property: The template query string to be parsed and formatted. - * - * @return the queryTemplate value. - */ - public String queryTemplate() { - return this.queryTemplate; - } - - /** - * Set the queryTemplate property: The template query string to be parsed and formatted. - * - * @param queryTemplate the queryTemplate value to set. - * @return the ExpansionEntityQueriesProperties object itself. - */ - public ExpansionEntityQueriesProperties withQueryTemplate(String queryTemplate) { - this.queryTemplate = queryTemplate; - 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/EyesOnSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java deleted file mode 100644 index 90e3adfec3d7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java +++ /dev/null @@ -1,35 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** EyesOn property bag. */ -@Immutable -public final class EyesOnSettingsProperties { - /* - * Determines whether the setting is enable or disabled. - */ - @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEnabled; - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * 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/FileEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java index 7588902fa603..9fc1d12ab5d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java @@ -36,6 +36,10 @@ public final class FileEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) private String hostEntityId; + /** Creates an instance of FileEntityProperties class. */ + public FileEntityProperties() { + } + /** * Get the directory property: The full path to the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java index 8ebadc287860..aeb52c51f490 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java @@ -24,6 +24,10 @@ public final class FileHashEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hashValue", access = JsonProperty.Access.WRITE_ONLY) private String hashValue; + /** Creates an instance of FileHashEntityProperties class. */ + public FileHashEntityProperties() { + } + /** * Get the algorithm property: The hash algorithm type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java deleted file mode 100644 index fe47f14b590c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java +++ /dev/null @@ -1,238 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents a file import in Azure Security Insights. */ -@Fluent -public final class FileImportInner extends ProxyResource { - /* - * File import properties - */ - @JsonProperty(value = "properties") - private FileImportProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: File import properties. - * - * @return the innerProperties value. - */ - private FileImportProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - public IngestionMode ingestionMode() { - return this.innerProperties() == null ? null : this.innerProperties().ingestionMode(); - } - - /** - * Set the ingestionMode property: Describes how to ingest the records in the file. - * - * @param ingestionMode the ingestionMode value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withIngestionMode(IngestionMode ingestionMode) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withIngestionMode(ingestionMode); - return this; - } - - /** - * Get the contentType property: The content type of this file. - * - * @return the contentType value. - */ - public FileImportContentType contentType() { - return this.innerProperties() == null ? null : this.innerProperties().contentType(); - } - - /** - * Set the contentType property: The content type of this file. - * - * @param contentType the contentType value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withContentType(FileImportContentType contentType) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withContentType(contentType); - return this; - } - - /** - * Get the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - public FileMetadata errorFile() { - return this.innerProperties() == null ? null : this.innerProperties().errorFile(); - } - - /** - * Get the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - public List errorsPreview() { - return this.innerProperties() == null ? null : this.innerProperties().errorsPreview(); - } - - /** - * Get the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - public FileMetadata importFile() { - return this.innerProperties() == null ? null : this.innerProperties().importFile(); - } - - /** - * Set the importFile property: Represents the imported file. - * - * @param importFile the importFile value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withImportFile(FileMetadata importFile) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withImportFile(importFile); - return this; - } - - /** - * Get the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - public Integer ingestedRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().ingestedRecordCount(); - } - - /** - * Get the source property: The source for the data in the file. - * - * @return the source value. - */ - public String source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: The source for the data in the file. - * - * @param source the source value to set. - * @return the FileImportInner object itself. - */ - public FileImportInner withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new FileImportProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the state property: The state of the file import. - * - * @return the state value. - */ - public FileImportState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - public Integer totalRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().totalRecordCount(); - } - - /** - * Get the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - public Integer validRecordCount() { - return this.innerProperties() == null ? null : this.innerProperties().validRecordCount(); - } - - /** - * Get the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - public OffsetDateTime filesValidUntilTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().filesValidUntilTimeUtc(); - } - - /** - * Get the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - public OffsetDateTime importValidUntilTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().importValidUntilTimeUtc(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java deleted file mode 100644 index 1ae17de2e493..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java +++ /dev/null @@ -1,302 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Describes the FileImport's properties. */ -@Fluent -public final class FileImportProperties { - /* - * Describes how to ingest the records in the file. - */ - @JsonProperty(value = "ingestionMode", required = true) - private IngestionMode ingestionMode; - - /* - * The content type of this file. - */ - @JsonProperty(value = "contentType", required = true) - private FileImportContentType contentType; - - /* - * The time the file was imported. - */ - @JsonProperty(value = "createdTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; - - /* - * Represents the error file (if the import was ingested with errors or failed the validation). - */ - @JsonProperty(value = "errorFile", access = JsonProperty.Access.WRITE_ONLY) - private FileMetadata errorFile; - - /* - * An ordered list of some of the errors that were encountered during validation. - */ - @JsonProperty(value = "errorsPreview", access = JsonProperty.Access.WRITE_ONLY) - private List errorsPreview; - - /* - * Represents the imported file. - */ - @JsonProperty(value = "importFile", required = true) - private FileMetadata importFile; - - /* - * The number of records that have been successfully ingested. - */ - @JsonProperty(value = "ingestedRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer ingestedRecordCount; - - /* - * The source for the data in the file. - */ - @JsonProperty(value = "source", required = true) - private String source; - - /* - * The state of the file import. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private FileImportState state; - - /* - * The number of records in the file. - */ - @JsonProperty(value = "totalRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer totalRecordCount; - - /* - * The number of records that have passed validation. - */ - @JsonProperty(value = "validRecordCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer validRecordCount; - - /* - * The time the files associated with this import are deleted from the storage account. - */ - @JsonProperty(value = "filesValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime filesValidUntilTimeUtc; - - /* - * The time the file import record is soft deleted from the database and history. - */ - @JsonProperty(value = "importValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime importValidUntilTimeUtc; - - /** - * Get the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - public IngestionMode ingestionMode() { - return this.ingestionMode; - } - - /** - * Set the ingestionMode property: Describes how to ingest the records in the file. - * - * @param ingestionMode the ingestionMode value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withIngestionMode(IngestionMode ingestionMode) { - this.ingestionMode = ingestionMode; - return this; - } - - /** - * Get the contentType property: The content type of this file. - * - * @return the contentType value. - */ - public FileImportContentType contentType() { - return this.contentType; - } - - /** - * Set the contentType property: The content type of this file. - * - * @param contentType the contentType value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withContentType(FileImportContentType contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - public FileMetadata errorFile() { - return this.errorFile; - } - - /** - * Get the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - public List errorsPreview() { - return this.errorsPreview; - } - - /** - * Get the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - public FileMetadata importFile() { - return this.importFile; - } - - /** - * Set the importFile property: Represents the imported file. - * - * @param importFile the importFile value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withImportFile(FileMetadata importFile) { - this.importFile = importFile; - return this; - } - - /** - * Get the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - public Integer ingestedRecordCount() { - return this.ingestedRecordCount; - } - - /** - * Get the source property: The source for the data in the file. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: The source for the data in the file. - * - * @param source the source value to set. - * @return the FileImportProperties object itself. - */ - public FileImportProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the state property: The state of the file import. - * - * @return the state value. - */ - public FileImportState state() { - return this.state; - } - - /** - * Get the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - public Integer totalRecordCount() { - return this.totalRecordCount; - } - - /** - * Get the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - public Integer validRecordCount() { - return this.validRecordCount; - } - - /** - * Get the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - public OffsetDateTime filesValidUntilTimeUtc() { - return this.filesValidUntilTimeUtc; - } - - /** - * Get the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - public OffsetDateTime importValidUntilTimeUtc() { - return this.importValidUntilTimeUtc; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ingestionMode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ingestionMode in model FileImportProperties")); - } - if (contentType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property contentType in model FileImportProperties")); - } - if (errorFile() != null) { - errorFile().validate(); - } - if (errorsPreview() != null) { - errorsPreview().forEach(e -> e.validate()); - } - if (importFile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property importFile in model FileImportProperties")); - } else { - importFile().validate(); - } - if (source() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property source in model FileImportProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FileImportProperties.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 3ce589c95ac6..e9c7e2f54334 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,8 +8,6 @@ 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.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -41,18 +39,6 @@ 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. */ @@ -77,6 +63,10 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of FusionAlertRuleProperties class. */ + public FusionAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -135,47 +125,6 @@ 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. * @@ -224,12 +173,6 @@ 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()); - } } private static final ClientLogger LOGGER = new ClientLogger(FusionAlertRuleProperties.class); 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 162717edb32f..ebbb8cc52c5f 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 @@ -8,13 +8,12 @@ import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; 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.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Fusion alert rule template properties. */ +/** Represents Fusion alert rule template properties. */ @Fluent public final class FusionAlertRuleTemplateProperties { /* @@ -72,16 +71,14 @@ public final class FusionAlertRuleTemplateProperties { private List tactics; /* - * The techniques of the alert rule + * The techniques of the alert rule template */ @JsonProperty(value = "techniques") private List techniques; - /* - * All supported source signal configurations consumed in fusion detection. - */ - @JsonProperty(value = "sourceSettings") - private List sourceSettings; + /** Creates an instance of FusionAlertRuleTemplateProperties class. */ + public FusionAlertRuleTemplateProperties() { + } /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. @@ -244,7 +241,7 @@ public FusionAlertRuleTemplateProperties withTactics(List tactics) } /** - * Get the techniques property: The techniques of the alert rule. + * Get the techniques property: The techniques of the alert rule template. * * @return the techniques value. */ @@ -253,7 +250,7 @@ public List techniques() { } /** - * Set the techniques property: The techniques of the alert rule. + * Set the techniques property: The techniques of the alert rule template. * * @param techniques the techniques value to set. * @return the FusionAlertRuleTemplateProperties object itself. @@ -263,26 +260,6 @@ public FusionAlertRuleTemplateProperties withTechniques(List 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.sourceSettings; - } - - /** - * 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; - } - /** * Validates the instance. * @@ -292,8 +269,5 @@ public void validate() { 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/GetQueriesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java deleted file mode 100644 index d001a56c976d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java +++ /dev/null @@ -1,51 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.EntityQueryItem; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Retrieve queries for entity result operation response. */ -@Fluent -public final class GetQueriesResponseInner { - /* - * The query result values. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: The query result values. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The query result values. - * - * @param value the value value to set. - * @return the GetQueriesResponseInner object itself. - */ - public GetQueriesResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java index 16f676846108..7e8f10cbaac0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java @@ -67,6 +67,10 @@ public final class HostEntityProperties extends EntityCommonProperties { @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) private String osVersion; + /** Creates an instance of HostEntityProperties class. */ + public HostEntityProperties() { + } + /** * Get the azureId property: The azure resource id of the VM. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java index 5be6c7dc4e9b..52b6ecb24516 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java @@ -82,6 +82,10 @@ public final class HuntingBookmarkProperties extends EntityCommonProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /** Creates an instance of HuntingBookmarkProperties class. */ + public HuntingBookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java index 18459e1b4f13..c5e7f0834b7d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java @@ -19,6 +19,10 @@ public final class IncidentAlertListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentAlertListInner class. */ + public IncidentAlertListInner() { + } + /** * Get the value property: Array of incident alerts. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java index aa6aec92f588..e313e259db7a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java @@ -19,6 +19,10 @@ public final class IncidentBookmarkListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentBookmarkListInner class. */ + public IncidentBookmarkListInner() { + } + /** * Get the value property: Array of incident bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java index 5bde60b473fa..04ef33791fa8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java @@ -19,6 +19,10 @@ public final class IncidentCommentInner extends ResourceWithEtag { @JsonProperty(value = "properties") private IncidentCommentProperties innerProperties; + /** Creates an instance of IncidentCommentInner class. */ + public IncidentCommentInner() { + } + /** * Get the innerProperties property: Incident comment properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java index 6cc4d172a5e2..35379f0b4aa3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java @@ -37,6 +37,10 @@ public final class IncidentCommentProperties { @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo author; + /** Creates an instance of IncidentCommentProperties class. */ + public IncidentCommentProperties() { + } + /** * Get the createdTimeUtc property: The time the comment was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java index 3f6dbe089b16..2741408f9497 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.Entity; import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResultsMetadata; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -16,7 +17,7 @@ public final class IncidentEntitiesResponseInner { * Array of the incident related entities. */ @JsonProperty(value = "entities") - private List entities; + private List entities; /* * The metadata from the incident related entities results. @@ -24,12 +25,16 @@ public final class IncidentEntitiesResponseInner { @JsonProperty(value = "metaData") private List metadata; + /** Creates an instance of IncidentEntitiesResponseInner class. */ + public IncidentEntitiesResponseInner() { + } + /** * Get the entities property: Array of the incident related entities. * * @return the entities value. */ - public List entities() { + public List entities() { return this.entities; } @@ -39,7 +44,7 @@ public List entities() { * @param entities the entities value to set. * @return the IncidentEntitiesResponseInner object itself. */ - public IncidentEntitiesResponseInner withEntities(List entities) { + public IncidentEntitiesResponseInner withEntities(List entities) { this.entities = entities; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java index 7f44360a2ebd..ce22cb92e7fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java @@ -24,14 +24,18 @@ public final class IncidentInner extends ResourceWithEtag { * Incident properties */ @JsonProperty(value = "properties") - private IncidentPropertiesInner innerProperties; + private IncidentProperties innerProperties; + + /** Creates an instance of IncidentInner class. */ + public IncidentInner() { + } /** * Get the innerProperties property: Incident properties. * * @return the innerProperties value. */ - private IncidentPropertiesInner innerProperties() { + private IncidentProperties innerProperties() { return this.innerProperties; } @@ -68,7 +72,7 @@ public IncidentClassification classification() { */ public IncidentInner withClassification(IncidentClassification classification) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withClassification(classification); return this; @@ -91,7 +95,7 @@ public String classificationComment() { */ public IncidentInner withClassificationComment(String classificationComment) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withClassificationComment(classificationComment); return this; @@ -114,7 +118,7 @@ public IncidentClassificationReason classificationReason() { */ public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withClassificationReason(classificationReason); return this; @@ -146,7 +150,7 @@ public String description() { */ public IncidentInner withDescription(String description) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withDescription(description); return this; @@ -169,7 +173,7 @@ public OffsetDateTime firstActivityTimeUtc() { */ public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); return this; @@ -210,58 +214,12 @@ public List labels() { */ public IncidentInner withLabels(List labels) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withLabels(labels); return this; } - /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.innerProperties() == null ? null : this.innerProperties().providerName(); - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withProviderName(String providerName) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withProviderName(providerName); - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - public String providerIncidentId() { - return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); - } - - /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId the providerIncidentId value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withProviderIncidentId(String providerIncidentId) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withProviderIncidentId(providerIncidentId); - return this; - } - /** * Get the lastActivityTimeUtc property: The time of the last activity in the incident. * @@ -279,7 +237,7 @@ public OffsetDateTime lastActivityTimeUtc() { */ public IncidentInner withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withLastActivityTimeUtc(lastActivityTimeUtc); return this; @@ -311,7 +269,7 @@ public IncidentOwnerInfo owner() { */ public IncidentInner withOwner(IncidentOwnerInfo owner) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withOwner(owner); return this; @@ -343,7 +301,7 @@ public IncidentSeverity severity() { */ public IncidentInner withSeverity(IncidentSeverity severity) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withSeverity(severity); return this; @@ -366,35 +324,12 @@ public IncidentStatus status() { */ public IncidentInner withStatus(IncidentStatus status) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withStatus(status); return this; } - /** - * Get the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - public TeamInformationInner teamInformation() { - return this.innerProperties() == null ? null : this.innerProperties().teamInformation(); - } - - /** - * Set the teamInformation property: Describes a team for the incident. - * - * @param teamInformation the teamInformation value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withTeamInformation(TeamInformationInner teamInformation) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withTeamInformation(teamInformation); - return this; - } - /** * Get the title property: The title of the incident. * @@ -412,7 +347,7 @@ public String title() { */ public IncidentInner withTitle(String title) { if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); + this.innerProperties = new IncidentProperties(); } this.innerProperties().withTitle(title); return this; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentProperties.java similarity index 71% rename from sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java rename to sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentProperties.java index 5262e2c3ba58..76839ec2b361 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentProperties.java @@ -19,7 +19,7 @@ /** Describes incident properties. */ @Fluent -public final class IncidentPropertiesInner { +public final class IncidentProperties { /* * Additional data on the incident */ @@ -80,18 +80,6 @@ public final class IncidentPropertiesInner { @JsonProperty(value = "labels") private List labels; - /* - * The name of the source provider that generated the incident - */ - @JsonProperty(value = "providerName") - private String providerName; - - /* - * The incident ID assigned by the incident provider - */ - @JsonProperty(value = "providerIncidentId") - private String providerIncidentId; - /* * The time of the last activity in the incident */ @@ -128,18 +116,16 @@ public final class IncidentPropertiesInner { @JsonProperty(value = "status", required = true) private IncidentStatus status; - /* - * Describes a team for the incident - */ - @JsonProperty(value = "teamInformation") - private TeamInformationInner teamInformation; - /* * The title of the incident */ @JsonProperty(value = "title", required = true) private String title; + /** Creates an instance of IncidentProperties class. */ + public IncidentProperties() { + } + /** * Get the additionalData property: Additional data on the incident. * @@ -162,9 +148,9 @@ public IncidentClassification classification() { * Set the classification property: The reason the incident was closed. * * @param classification the classification value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withClassification(IncidentClassification classification) { + public IncidentProperties withClassification(IncidentClassification classification) { this.classification = classification; return this; } @@ -182,9 +168,9 @@ public String classificationComment() { * Set the classificationComment property: Describes the reason the incident was closed. * * @param classificationComment the classificationComment value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withClassificationComment(String classificationComment) { + public IncidentProperties withClassificationComment(String classificationComment) { this.classificationComment = classificationComment; return this; } @@ -202,9 +188,9 @@ public IncidentClassificationReason classificationReason() { * Set the classificationReason property: The classification reason the incident was closed with. * * @param classificationReason the classificationReason value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { + public IncidentProperties withClassificationReason(IncidentClassificationReason classificationReason) { this.classificationReason = classificationReason; return this; } @@ -231,9 +217,9 @@ public String description() { * Set the description property: The description of the incident. * * @param description the description value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withDescription(String description) { + public IncidentProperties withDescription(String description) { this.description = description; return this; } @@ -251,9 +237,9 @@ public OffsetDateTime firstActivityTimeUtc() { * Set the firstActivityTimeUtc property: The time of the first activity in the incident. * * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + public IncidentProperties withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { this.firstActivityTimeUtc = firstActivityTimeUtc; return this; } @@ -289,53 +275,13 @@ public List labels() { * Set the labels property: List of labels relevant to this incident. * * @param labels the labels value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withLabels(List labels) { + public IncidentProperties withLabels(List labels) { this.labels = labels; return this; } - /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - public String providerIncidentId() { - return this.providerIncidentId; - } - - /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId the providerIncidentId value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderIncidentId(String providerIncidentId) { - this.providerIncidentId = providerIncidentId; - return this; - } - /** * Get the lastActivityTimeUtc property: The time of the last activity in the incident. * @@ -349,9 +295,9 @@ public OffsetDateTime lastActivityTimeUtc() { * Set the lastActivityTimeUtc property: The time of the last activity in the incident. * * @param lastActivityTimeUtc the lastActivityTimeUtc value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { + public IncidentProperties withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { this.lastActivityTimeUtc = lastActivityTimeUtc; return this; } @@ -378,9 +324,9 @@ public IncidentOwnerInfo owner() { * Set the owner property: Describes a user that the incident is assigned to. * * @param owner the owner value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { + public IncidentProperties withOwner(IncidentOwnerInfo owner) { this.owner = owner; return this; } @@ -407,9 +353,9 @@ public IncidentSeverity severity() { * Set the severity property: The severity of the incident. * * @param severity the severity value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withSeverity(IncidentSeverity severity) { + public IncidentProperties withSeverity(IncidentSeverity severity) { this.severity = severity; return this; } @@ -427,33 +373,13 @@ public IncidentStatus status() { * Set the status property: The status of the incident. * * @param status the status value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withStatus(IncidentStatus status) { + public IncidentProperties withStatus(IncidentStatus status) { this.status = status; return this; } - /** - * Get the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - public TeamInformationInner teamInformation() { - return this.teamInformation; - } - - /** - * Set the teamInformation property: Describes a team for the incident. - * - * @param teamInformation the teamInformation value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withTeamInformation(TeamInformationInner teamInformation) { - this.teamInformation = teamInformation; - return this; - } - /** * Get the title property: The title of the incident. * @@ -467,9 +393,9 @@ public String title() { * Set the title property: The title of the incident. * * @param title the title value to set. - * @return the IncidentPropertiesInner object itself. + * @return the IncidentProperties object itself. */ - public IncidentPropertiesInner withTitle(String title) { + public IncidentProperties withTitle(String title) { this.title = title; return this; } @@ -492,23 +418,19 @@ public void validate() { if (severity() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model IncidentPropertiesInner")); + new IllegalArgumentException("Missing required property severity in model IncidentProperties")); } if (status() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property status in model IncidentPropertiesInner")); - } - if (teamInformation() != null) { - teamInformation().validate(); + new IllegalArgumentException("Missing required property status in model IncidentProperties")); } if (title() == null) { throw LOGGER .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); + new IllegalArgumentException("Missing required property title in model IncidentProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(IncidentPropertiesInner.class); + private static final ClientLogger LOGGER = new ClientLogger(IncidentProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java deleted file mode 100644 index 63643c5077a2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java +++ /dev/null @@ -1,46 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT requirements check properties. */ -@Fluent -public final class IoTCheckRequirementsProperties { - /* - * 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 deleted file mode 100644 index 1917add910f9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java +++ /dev/null @@ -1,57 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorWithAlertsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** IoT data connector properties. */ -@Fluent -public final class IoTDataConnectorProperties extends DataConnectorWithAlertsProperties { - /* - * 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/IoTDeviceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java index 971f9f13da46..9a43bacbace5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DeviceImportance; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligence; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +12,7 @@ import java.util.UUID; /** IoTDevice entity property bag. */ -@Fluent +@Immutable public final class IoTDeviceEntityProperties extends EntityCommonProperties { /* * The ID of the IoT Device in the IoT Hub @@ -117,71 +116,9 @@ public final class IoTDeviceEntityProperties extends EntityCommonProperties { @JsonProperty(value = "protocols", access = JsonProperty.Access.WRITE_ONLY) private List protocols; - /* - * A list of owners of the IoTDevice entity. - */ - @JsonProperty(value = "owners", access = JsonProperty.Access.WRITE_ONLY) - private List owners; - - /* - * A list of Nic entity ids of the IoTDevice entity. - */ - @JsonProperty(value = "nicEntityIds", access = JsonProperty.Access.WRITE_ONLY) - private List nicEntityIds; - - /* - * The site of the device - */ - @JsonProperty(value = "site", access = JsonProperty.Access.WRITE_ONLY) - private String site; - - /* - * The zone location of the device within a site - */ - @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) - private String zone; - - /* - * The sensor the device is monitored by - */ - @JsonProperty(value = "sensor", access = JsonProperty.Access.WRITE_ONLY) - private String sensor; - - /* - * The subType of the device ('PLC', 'HMI', 'EWS', etc.) - */ - @JsonProperty(value = "deviceSubType", access = JsonProperty.Access.WRITE_ONLY) - private String deviceSubType; - - /* - * Device importance, determines if the device classified as 'crown jewel' - */ - @JsonProperty(value = "importance") - private DeviceImportance importance; - - /* - * The Purdue Layer of the device - */ - @JsonProperty(value = "purdueLayer", access = JsonProperty.Access.WRITE_ONLY) - private String purdueLayer; - - /* - * Determines whether the device classified as authorized device - */ - @JsonProperty(value = "isAuthorized", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isAuthorized; - - /* - * Determines whether the device classified as programming device - */ - @JsonProperty(value = "isProgramming", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isProgramming; - - /* - * Is the device classified as a scanner device - */ - @JsonProperty(value = "isScanner", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isScanner; + /** Creates an instance of IoTDeviceEntityProperties class. */ + public IoTDeviceEntityProperties() { + } /** * Get the deviceId property: The ID of the IoT Device in the IoT Hub. @@ -336,116 +273,6 @@ public List protocols() { return this.protocols; } - /** - * Get the owners property: A list of owners of the IoTDevice entity. - * - * @return the owners value. - */ - public List owners() { - return this.owners; - } - - /** - * Get the nicEntityIds property: A list of Nic entity ids of the IoTDevice entity. - * - * @return the nicEntityIds value. - */ - public List nicEntityIds() { - return this.nicEntityIds; - } - - /** - * Get the site property: The site of the device. - * - * @return the site value. - */ - public String site() { - return this.site; - } - - /** - * Get the zone property: The zone location of the device within a site. - * - * @return the zone value. - */ - public String zone() { - return this.zone; - } - - /** - * Get the sensor property: The sensor the device is monitored by. - * - * @return the sensor value. - */ - public String sensor() { - return this.sensor; - } - - /** - * Get the deviceSubType property: The subType of the device ('PLC', 'HMI', 'EWS', etc.). - * - * @return the deviceSubType value. - */ - public String deviceSubType() { - return this.deviceSubType; - } - - /** - * Get the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @return the importance value. - */ - public DeviceImportance importance() { - return this.importance; - } - - /** - * Set the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @param importance the importance value to set. - * @return the IoTDeviceEntityProperties object itself. - */ - public IoTDeviceEntityProperties withImportance(DeviceImportance importance) { - this.importance = importance; - return this; - } - - /** - * Get the purdueLayer property: The Purdue Layer of the device. - * - * @return the purdueLayer value. - */ - public String purdueLayer() { - return this.purdueLayer; - } - - /** - * Get the isAuthorized property: Determines whether the device classified as authorized device. - * - * @return the isAuthorized value. - */ - public Boolean isAuthorized() { - return this.isAuthorized; - } - - /** - * Get the isProgramming property: Determines whether the device classified as programming device. - * - * @return the isProgramming value. - */ - public Boolean isProgramming() { - return this.isProgramming; - } - - /** - * Get the isScanner property: Is the device classified as a scanner device. - * - * @return the isScanner value. - */ - public Boolean isScanner() { - return this.isScanner; - } - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java index fa6b07dd783f..0a9b814b6a3c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java @@ -32,6 +32,10 @@ public final class IpEntityProperties extends EntityCommonProperties { @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) private List threatIntelligence; + /** Creates an instance of IpEntityProperties class. */ + public IpEntityProperties() { + } + /** * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java deleted file mode 100644 index 423fdf2974b6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java +++ /dev/null @@ -1,176 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** MLBehaviorAnalytics alert rule base property bag. */ -@Fluent -public final class MLBehaviorAnalyticsAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName", required = true) - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - 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 severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @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. - * - * @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 MLBehaviorAnalyticsAlertRuleProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * 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 MLBehaviorAnalyticsAlertRuleProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleProperties 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 severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alertRuleTemplateName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertRuleTemplateName in model" - + " MLBehaviorAnalyticsAlertRuleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleProperties.class); -} 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 deleted file mode 100644 index c048baca3053..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java +++ /dev/null @@ -1,114 +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.fluent.models; - -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.AlertRuleTemplateWithMitreProperties; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** MLBehaviorAnalytics alert rule template properties. */ -@Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /** - * 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 MLBehaviorAnalyticsAlertRuleTemplateProperties object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withTechniques(List techniques) { - super.withTechniques(techniques); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRuleTemplateProperties 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(); - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model MLBehaviorAnalyticsAlertRuleTemplateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLBehaviorAnalyticsAlertRuleTemplateProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java index 62c3cc3aec6a..b523b9c536eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java @@ -103,6 +103,10 @@ public final class MailClusterEntityProperties extends EntityCommonProperties { @JsonProperty(value = "clusterGroup", access = JsonProperty.Access.WRITE_ONLY) private String clusterGroup; + /** Creates an instance of MailClusterEntityProperties class. */ + public MailClusterEntityProperties() { + } + /** * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java index e2d92d2606a6..9d3fb6ad8c86 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java @@ -168,6 +168,10 @@ public final class MailMessageEntityProperties extends EntityCommonProperties { @JsonProperty(value = "deliveryLocation") private DeliveryLocation deliveryLocation; + /** Creates an instance of MailMessageEntityProperties class. */ + public MailMessageEntityProperties() { + } + /** * Get the fileEntityIds property: The File entity ids of this mail message's attachments. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java index c0ec6c6fdaee..efc2be76821b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java @@ -37,6 +37,10 @@ public final class MailboxEntityProperties extends EntityCommonProperties { @JsonProperty(value = "externalDirectoryObjectId", access = JsonProperty.Access.WRITE_ONLY) private UUID externalDirectoryObjectId; + /** Creates an instance of MailboxEntityProperties class. */ + public MailboxEntityProperties() { + } + /** * Get the mailboxPrimaryAddress property: The mailbox's primary address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java index ded00f33417f..847174346dd7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java @@ -36,6 +36,10 @@ public final class MalwareEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List processEntityIds; + /** Creates an instance of MalwareEntityProperties class. */ + public MalwareEntityProperties() { + } + /** * Get the category property: The malware category by the vendor, e.g. Trojan. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java deleted file mode 100644 index 529764ae709a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MCAS (Microsoft Cloud App Security) requirements check properties. */ -@Fluent -public final class McasCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public McasCheckRequirementsProperties 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/McasDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java index 38068dd10782..ec62979cf3ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java @@ -5,20 +5,48 @@ 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.McasDataConnectorDataTypes; import com.fasterxml.jackson.annotation.JsonProperty; /** MCAS (Microsoft Cloud App Security) data connector properties. */ @Fluent -public final class McasDataConnectorProperties extends DataConnectorTenantId { +public final class McasDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The available data types for the connector. */ - @JsonProperty(value = "dataTypes", required = true) + @JsonProperty(value = "dataTypes") private McasDataConnectorDataTypes dataTypes; + /** Creates an instance of McasDataConnectorProperties class. */ + public McasDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 McasDataConnectorProperties object itself. + */ + public McasDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -39,30 +67,14 @@ public McasDataConnectorProperties withDataTypes(McasDataConnectorDataTypes data return this; } - /** {@inheritDoc} */ - @Override - public McasDataConnectorProperties 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 McasDataConnectorProperties")); - } else { + if (dataTypes() != null) { dataTypes().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(McasDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java deleted file mode 100644 index 789441efbf97..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class MdatpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MdatpCheckRequirementsProperties 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/MdatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java index a1466e451fb0..014902f2a052 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java @@ -6,18 +6,47 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.fasterxml.jackson.annotation.JsonProperty; /** MDATP (Microsoft Defender Advanced Threat Protection) data connector properties. */ @Fluent -public final class MdatpDataConnectorProperties extends DataConnectorTenantId { +public final class MdatpDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The available data types for the connector. */ @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of MdatpDataConnectorProperties class. */ + public MdatpDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 MdatpDataConnectorProperties object itself. + */ + public MdatpDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -38,21 +67,12 @@ public MdatpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector return this; } - /** {@inheritDoc} */ - @Override - public MdatpDataConnectorProperties 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) { dataTypes().validate(); } 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 deleted file mode 100644 index 25c3b5166242..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java +++ /dev/null @@ -1,513 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata resource definition. */ -@Fluent -public final class MetadataModelInner extends ResourceWithEtag { - /* - * Metadata properties - */ - @JsonProperty(value = "properties") - private MetadataProperties innerProperties; - - /** - * Get the innerProperties property: Metadata properties. - * - * @return the innerProperties value. - */ - private MetadataProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MetadataModelInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.innerProperties() == null ? null : this.innerProperties().contentId(); - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withContentId(String contentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withContentId(contentId); - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.innerProperties() == null ? null : this.innerProperties().parentId(); - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withParentId(String parentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withParentId(parentId); - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.innerProperties() == null ? null : this.innerProperties().kind(); - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withKind(Kind kind) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withKind(kind); - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withSource(MetadataSource source) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.innerProperties() == null ? null : this.innerProperties().author(); - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withAuthor(MetadataAuthor author) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withAuthor(author); - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.innerProperties() == null ? null : this.innerProperties().support(); - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withSupport(MetadataSupport support) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withSupport(support); - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.innerProperties() == null ? null : this.innerProperties().dependencies(); - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withDependencies(MetadataDependencies dependencies) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withDependencies(dependencies); - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.innerProperties() == null ? null : this.innerProperties().categories(); - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withCategories(MetadataCategories categories) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withCategories(categories); - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.innerProperties() == null ? null : this.innerProperties().providers(); - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withProviders(List providers) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withProviders(providers); - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withFirstPublishDate(LocalDate firstPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withFirstPublishDate(firstPublishDate); - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataModelInner object itself. - */ - public MetadataModelInner withLastPublishDate(LocalDate lastPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataProperties(); - } - this.innerProperties().withLastPublishDate(lastPublishDate); - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.innerProperties() == null ? null : this.innerProperties().customVersion(); - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java deleted file mode 100644 index 3fed7e25da81..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java +++ /dev/null @@ -1,575 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata property bag. */ -@Fluent -public final class MetadataProperties { - /* - * Static ID for the content. Used to identify dependencies and content from solutions or community. - * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Full parent resource ID of the content item the metadata is for. This is the full resource ID including the - * scope (subscription and resource group) - */ - @JsonProperty(value = "parentId", required = true) - private String parentId; - - /* - * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - * template best practices. Can also be any string, but then we cannot guarantee any version checks - */ - @JsonProperty(value = "version") - private String version; - - /* - * The kind of content the metadata is for. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /* - * Source of the content. This is where/how it was created. - */ - @JsonProperty(value = "source") - private MetadataSource source; - - /* - * The creator of the content item. - */ - @JsonProperty(value = "author") - private MetadataAuthor author; - - /* - * Support information for the metadata - type, name, contact information - */ - @JsonProperty(value = "support") - private MetadataSupport support; - - /* - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex formats. - */ - @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; - - /* - * Categories for the solution content item - */ - @JsonProperty(value = "categories") - private MetadataCategories categories; - - /* - * Providers for the solution content item - */ - @JsonProperty(value = "providers") - private List providers; - - /* - * first publish date solution content item - */ - @JsonProperty(value = "firstPublishDate") - private LocalDate firstPublishDate; - - /* - * last publish date for the solution content item - */ - @JsonProperty(value = "lastPublishDate") - private LocalDate lastPublishDate; - - /* - * The custom version of the content. A optional free text - */ - @JsonProperty(value = "customVersion") - private String customVersion; - - /* - * Schema version of the content. Can be used to distinguish between different flow based on the schema version - */ - @JsonProperty(value = "contentSchemaVersion") - private String contentSchemaVersion; - - /* - * the icon identifier. this id can later be fetched from the 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 - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.parentId; - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withParentId(String parentId) { - this.parentId = parentId; - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.source; - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withSource(MetadataSource source) { - this.source = source; - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.author; - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withAuthor(MetadataAuthor author) { - this.author = author; - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.support; - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withSupport(MetadataSupport support) { - this.support = support; - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.dependencies; - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withDependencies(MetadataDependencies dependencies) { - this.dependencies = dependencies; - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.categories; - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withCategories(MetadataCategories categories) { - this.categories = categories; - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.firstPublishDate; - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withFirstPublishDate(LocalDate firstPublishDate) { - this.firstPublishDate = firstPublishDate; - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.lastPublishDate; - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataProperties object itself. - */ - public MetadataProperties withLastPublishDate(LocalDate lastPublishDate) { - this.lastPublishDate = lastPublishDate; - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.customVersion; - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property parentId in model MetadataProperties")); - } - if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model MetadataProperties")); - } - if (source() != null) { - source().validate(); - } - if (author() != null) { - author().validate(); - } - if (support() != null) { - support().validate(); - } - if (dependencies() != null) { - dependencies().validate(); - } - if (categories() != null) { - categories().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataProperties.class); -} 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 deleted file mode 100644 index 470f6f2cb684..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java +++ /dev/null @@ -1,562 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata property bag for patch requests. This is the same as the MetadataProperties, but with nothing required. */ -@Fluent -public final class MetadataPropertiesPatch { - /* - * Static ID for the content. Used to identify dependencies and content from solutions or community. - * Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Full parent resource ID of the content item the metadata is for. This is the full resource ID including the - * scope (subscription and resource group) - */ - @JsonProperty(value = "parentId") - private String parentId; - - /* - * Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM - * template best practices. Can also be any string, but then we cannot guarantee any version checks - */ - @JsonProperty(value = "version") - private String version; - - /* - * The kind of content the metadata is for. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Source of the content. This is where/how it was created. - */ - @JsonProperty(value = "source") - private MetadataSource source; - - /* - * The creator of the content item. - */ - @JsonProperty(value = "author") - private MetadataAuthor author; - - /* - * Support information for the metadata - type, name, contact information - */ - @JsonProperty(value = "support") - private MetadataSupport support; - - /* - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex formats. - */ - @JsonProperty(value = "dependencies") - private MetadataDependencies dependencies; - - /* - * Categories for the solution content item - */ - @JsonProperty(value = "categories") - private MetadataCategories categories; - - /* - * Providers for the solution content item - */ - @JsonProperty(value = "providers") - private List providers; - - /* - * first publish date solution content item - */ - @JsonProperty(value = "firstPublishDate") - private LocalDate firstPublishDate; - - /* - * last publish date for the solution content item - */ - @JsonProperty(value = "lastPublishDate") - private LocalDate lastPublishDate; - - /* - * The custom version of the content. A optional free text - */ - @JsonProperty(value = "customVersion") - private String customVersion; - - /* - * Schema version of the content. Can be used to distinguish between different flow based on the schema version - */ - @JsonProperty(value = "contentSchemaVersion") - private String contentSchemaVersion; - - /* - * the icon identifier. this id can later be fetched from the 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 - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.parentId; - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withParentId(String parentId) { - this.parentId = parentId; - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.source; - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withSource(MetadataSource source) { - this.source = source; - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.author; - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withAuthor(MetadataAuthor author) { - this.author = author; - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.support; - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withSupport(MetadataSupport support) { - this.support = support; - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.dependencies; - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withDependencies(MetadataDependencies dependencies) { - this.dependencies = dependencies; - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.categories; - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withCategories(MetadataCategories categories) { - this.categories = categories; - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.firstPublishDate; - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withFirstPublishDate(LocalDate firstPublishDate) { - this.firstPublishDate = firstPublishDate; - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.lastPublishDate; - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataPropertiesPatch object itself. - */ - public MetadataPropertiesPatch withLastPublishDate(LocalDate lastPublishDate) { - this.lastPublishDate = lastPublishDate; - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.customVersion; - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (source() != null) { - source().validate(); - } - if (author() != null) { - author().validate(); - } - if (support() != null) { - support().validate(); - } - if (dependencies() != null) { - dependencies().validate(); - } - if (categories() != null) { - categories().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java index 6c482ad3565a..70a8a6b6897e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java @@ -47,6 +47,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleProperties @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedUtc; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java index d5732a0625a0..c4532292646e 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 @@ -5,18 +5,60 @@ 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.AlertRuleTemplateDataSource; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplatePropertiesBase; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; /** MicrosoftSecurityIncidentCreation rule template properties. */ @Fluent -public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties - extends AlertRuleTemplatePropertiesBase { +public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties { + /* + * 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 alerts' displayNames on which the cases will be generated */ @@ -32,7 +74,7 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties /* * The alerts' productName on which the cases will be generated */ - @JsonProperty(value = "productFilter") + @JsonProperty(value = "productFilter", required = true) private MicrosoftSecurityProductName productFilter; /* @@ -41,6 +83,130 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties() { + } + + /** + * 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 MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. + */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties 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 MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. + */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties 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 MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. + */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties 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 MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. + */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties 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 MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties object itself. + */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withStatus(TemplateStatus status) { + this.status = status; + return this; + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * @@ -125,50 +291,24 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withSeveriti return this; } - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties 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(); + if (requiredDataConnectors() != null) { + requiredDataConnectors().forEach(e -> e.validate()); + } + if (productFilter() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productFilter in model" + + " MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties")); + } } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java deleted file mode 100644 index 6688b38be2fb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Microsoft Threat Intelligence requirements check properties. */ -@Fluent -public final class MstiCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MstiCheckRequirementsProperties 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/MstiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java deleted file mode 100644 index 7bef9230fe38..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java +++ /dev/null @@ -1,68 +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.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.MstiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Microsoft Threat Intelligence data connector properties. */ -@Fluent -public final class MstiDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private MstiDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MstiDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MstiDataConnectorProperties object itself. - */ - public MstiDataConnectorProperties withDataTypes(MstiDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public MstiDataConnectorProperties 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 MstiDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MstiDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java deleted file mode 100644 index 68d2ff985a20..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** MTP (Microsoft Threat Protection) requirements check properties. */ -@Fluent -public final class MtpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public MtpCheckRequirementsProperties 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/MtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java deleted file mode 100644 index 2399f7dba165..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java +++ /dev/null @@ -1,68 +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.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.MtpDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** MTP (Microsoft Threat Protection) data connector properties. */ -@Fluent -public final class MtpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private MtpDataConnectorDataTypes dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public MtpDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the MtpDataConnectorProperties object itself. - */ - public MtpDataConnectorProperties withDataTypes(MtpDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public MtpDataConnectorProperties 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 MtpDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java deleted file mode 100644 index 810e29f8c340..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java +++ /dev/null @@ -1,69 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.securityinsights.models.EntityCommonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Nic entity property bag. */ -@Immutable -public final class NicEntityProperties extends EntityCommonProperties { - /* - * The MAC address of this network interface - */ - @JsonProperty(value = "macAddress", access = JsonProperty.Access.WRITE_ONLY) - private String macAddress; - - /* - * The IP entity id of this network interface - */ - @JsonProperty(value = "ipAddressEntityId", access = JsonProperty.Access.WRITE_ONLY) - private String ipAddressEntityId; - - /* - * A list of VLANs of the network interface entity. - */ - @JsonProperty(value = "vlans", access = JsonProperty.Access.WRITE_ONLY) - private List vlans; - - /** - * Get the macAddress property: The MAC address of this network interface. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Get the ipAddressEntityId property: The IP entity id of this network interface. - * - * @return the ipAddressEntityId value. - */ - public String ipAddressEntityId() { - return this.ipAddressEntityId; - } - - /** - * Get the vlans property: A list of VLANs of the network interface entity. - * - * @return the vlans value. - */ - public List vlans() { - return this.vlans; - } - - /** - * 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/NrtAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java deleted file mode 100644 index 2d2b3f5d6791..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java +++ /dev/null @@ -1,509 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.EntityMapping; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; -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 { - /* - * 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; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * 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) { - 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withQuery(String 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; - } - - /** - * 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) { - 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withSeverity(AlertSeverity severity) { - this.severity = 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.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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties 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 NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleProperties object itself. - */ - public NrtAlertRuleProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void 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(); - } - if (eventGroupingSettings() != null) { - eventGroupingSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NrtAlertRuleProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java deleted file mode 100644 index 97788b8fd862..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java +++ /dev/null @@ -1,278 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; -import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplateDataSource; -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; -import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** NRT alert rule template properties. */ -@Fluent -public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The version of this template - in format , where all are numbers. For example <1.0.2>. - */ - @JsonProperty(value = "version") - private String version; - - /* - * 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; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withQuery(String query) { - this.query = query; - 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withVersion(String version) { - this.version = version; - 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties 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 NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleTemplateProperties object itself. - */ - public NrtAlertRuleTemplateProperties withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - 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( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRuleTemplateProperties 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(); - 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/Office365ProjectCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java deleted file mode 100644 index e79cb5b7768f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Office365 Project requirements check properties. */ -@Fluent -public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { - /** {@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 deleted file mode 100644 index 86464533c6a1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java +++ /dev/null @@ -1,68 +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.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.JsonProperty; - -/** Office Microsoft Project data connector properties. */ -@Fluent -public final class Office365ProjectDataConnectorProperties extends DataConnectorTenantId { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java deleted file mode 100644 index 7e6a246d93cb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. */ -@Fluent -public final class OfficeAtpCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public OfficeAtpCheckRequirementsProperties 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/OfficeAtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java deleted file mode 100644 index 9a64b134a987..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java +++ /dev/null @@ -1,60 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** OfficeATP (Office 365 Advanced Threat Protection) data connector properties. */ -@Fluent -public final class OfficeAtpDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeAtpDataConnectorProperties object itself. - */ - public OfficeAtpDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficeAtpDataConnectorProperties 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) { - dataTypes().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java deleted file mode 100644 index e1ef2000626c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java +++ /dev/null @@ -1,101 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Consent for Office365 tenant that already made. */ -@Fluent -public final class OfficeConsentInner extends ProxyResource { - /* - * Office consent properties - */ - @JsonProperty(value = "properties") - private OfficeConsentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Office consent properties. - * - * @return the innerProperties value. - */ - private OfficeConsentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: The tenantId of the Office365 with the consent. - * - * @param tenantId the tenantId value to set. - * @return the OfficeConsentInner object itself. - */ - public OfficeConsentInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeConsentProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Get the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - public String consentId() { - return this.innerProperties() == null ? null : this.innerProperties().consentId(); - } - - /** - * Set the consentId property: Help to easily cascade among the data layers. - * - * @param consentId the consentId value to set. - * @return the OfficeConsentInner object itself. - */ - public OfficeConsentInner withConsentId(String consentId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeConsentProperties(); - } - this.innerProperties().withConsentId(consentId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java deleted file mode 100644 index ef163ee8eda7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java +++ /dev/null @@ -1,72 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Consent property bag. */ -@Fluent -public final class OfficeConsentProperties { - /* - * The tenantId of the Office365 with the consent. - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * Help to easily cascade among the data layers. - */ - @JsonProperty(value = "consentId") - private String consentId; - - /** - * Get the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenantId of the Office365 with the consent. - * - * @param tenantId the tenantId value to set. - * @return the OfficeConsentProperties object itself. - */ - public OfficeConsentProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - public String consentId() { - return this.consentId; - } - - /** - * Set the consentId property: Help to easily cascade among the data layers. - * - * @param consentId the consentId value to set. - * @return the OfficeConsentProperties object itself. - */ - public OfficeConsentProperties withConsentId(String consentId) { - this.consentId = consentId; - 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/OfficeDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java index 4b02a823625c..382d87a6613e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java @@ -5,20 +5,48 @@ 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.OfficeDataConnectorDataTypes; import com.fasterxml.jackson.annotation.JsonProperty; /** Office data connector properties. */ @Fluent -public final class OfficeDataConnectorProperties extends DataConnectorTenantId { +public final class OfficeDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The available data types for the connector. */ - @JsonProperty(value = "dataTypes", required = true) + @JsonProperty(value = "dataTypes") private OfficeDataConnectorDataTypes dataTypes; + /** Creates an instance of OfficeDataConnectorProperties class. */ + public OfficeDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 OfficeDataConnectorProperties object itself. + */ + public OfficeDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -39,30 +67,14 @@ public OfficeDataConnectorProperties withDataTypes(OfficeDataConnectorDataTypes return this; } - /** {@inheritDoc} */ - @Override - public OfficeDataConnectorProperties 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 OfficeDataConnectorProperties")); - } else { + if (dataTypes() != null) { dataTypes().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java deleted file mode 100644 index 5ae6bc407935..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** OfficeIRM (Microsoft Insider Risk Management) requirements check properties. */ -@Fluent -public final class OfficeIrmCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public OfficeIrmCheckRequirementsProperties 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/OfficeIrmDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java deleted file mode 100644 index c3e618acc5a3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java +++ /dev/null @@ -1,60 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.AlertsDataTypeOfDataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** OfficeIRM (Microsoft Insider Risk Management) data connector properties. */ -@Fluent -public final class OfficeIrmDataConnectorProperties extends DataConnectorTenantId { - /* - * The available data types for the connector. - */ - @JsonProperty(value = "dataTypes") - private AlertsDataTypeOfDataConnector dataTypes; - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for the connector. - * - * @param dataTypes the dataTypes value to set. - * @return the OfficeIrmDataConnectorProperties object itself. - */ - public OfficeIrmDataConnectorProperties withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public OfficeIrmDataConnectorProperties 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) { - 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 deleted file mode 100644 index b64db3bd6270..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Office PowerBI requirements check properties. */ -@Fluent -public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { - /** {@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 deleted file mode 100644 index 4f19d046961e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java +++ /dev/null @@ -1,68 +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.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.JsonProperty; - -/** Office Microsoft PowerBI data connector properties. */ -@Fluent -public final class OfficePowerBIDataConnectorProperties extends DataConnectorTenantId { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java index ec5a4d2872bb..b7fba78deacd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java @@ -35,6 +35,10 @@ public final class OperationInner { @JsonProperty(value = "isDataAction") private Boolean isDataAction; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the display property: Properties of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java index b1dde6737938..655e1522bcbc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java @@ -67,6 +67,10 @@ public final class ProcessEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processId", access = JsonProperty.Access.WRITE_ONLY) private String processId; + /** Creates an instance of ProcessEntityProperties class. */ + public ProcessEntityProperties() { + } + /** * Get the accountEntityId property: The account entity id running the processes. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java index 405ab6789eaf..c8ab8e0f600c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java @@ -24,6 +24,10 @@ public final class RegistryKeyEntityProperties extends EntityCommonProperties { @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) private String key; + /** Creates an instance of RegistryKeyEntityProperties class. */ + public RegistryKeyEntityProperties() { + } + /** * Get the hive property: the hive that holds the registry key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java index a15af888fb1b..a1db6026f23a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java @@ -37,6 +37,10 @@ public final class RegistryValueEntityProperties extends EntityCommonProperties @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY) private RegistryValueKind valueType; + /** Creates an instance of RegistryValueEntityProperties class. */ + public RegistryValueEntityProperties() { + } + /** * Get the keyEntityId property: The registry key entity id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java index 40a02c226353..407ab2618c47 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java @@ -17,6 +17,10 @@ public final class RelationInner extends ResourceWithEtag { @JsonProperty(value = "properties") private RelationProperties innerProperties; + /** Creates an instance of RelationInner class. */ + public RelationInner() { + } + /** * Get the innerProperties property: Relation properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java index 99e3df52c8c1..d02e2734c093 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java @@ -35,6 +35,10 @@ public final class RelationProperties { @JsonProperty(value = "relatedResourceKind", access = JsonProperty.Access.WRITE_ONLY) private String relatedResourceKind; + /** Creates an instance of RelationProperties class. */ + public RelationProperties() { + } + /** * Get the relatedResourceId property: The resource ID of the related resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java deleted file mode 100644 index dff64861cae5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java +++ /dev/null @@ -1,99 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a repository. */ -@Fluent -public final class RepoInner { - /* - * The url to access the repository. - */ - @JsonProperty(value = "url") - private String url; - - /* - * The name of the repository. - */ - @JsonProperty(value = "fullName") - private String fullName; - - /* - * Array of branches. - */ - @JsonProperty(value = "branches") - private List branches; - - /** - * Get the url property: The url to access the repository. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The url to access the repository. - * - * @param url the url value to set. - * @return the RepoInner object itself. - */ - public RepoInner withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the fullName property: The name of the repository. - * - * @return the fullName value. - */ - public String fullName() { - return this.fullName; - } - - /** - * Set the fullName property: The name of the repository. - * - * @param fullName the fullName value to set. - * @return the RepoInner object itself. - */ - public RepoInner withFullName(String fullName) { - this.fullName = fullName; - return this; - } - - /** - * Get the branches property: Array of branches. - * - * @return the branches value. - */ - public List branches() { - return this.branches; - } - - /** - * Set the branches property: Array of branches. - * - * @param branches the branches value to set. - * @return the RepoInner object itself. - */ - public RepoInner withBranches(List branches) { - this.branches = branches; - 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/ScheduledAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java index 98738e4e2029..39e7c5214fc6 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 @@ -90,6 +90,10 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "incidentConfiguration") private IncidentConfiguration incidentConfiguration; + /** Creates an instance of ScheduledAlertRuleProperties class. */ + public ScheduledAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * 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 42be47785289..0751845d4d10 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 @@ -108,7 +108,7 @@ public final class ScheduledAlertRuleTemplateProperties { private List tactics; /* - * The techniques of the alert rule + * The techniques of the alert rule template */ @JsonProperty(value = "techniques") private List techniques; @@ -144,6 +144,10 @@ public final class ScheduledAlertRuleTemplateProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /** Creates an instance of ScheduledAlertRuleTemplateProperties class. */ + public ScheduledAlertRuleTemplateProperties() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * @@ -405,7 +409,7 @@ public ScheduledAlertRuleTemplateProperties withTactics(List tacti } /** - * Get the techniques property: The techniques of the alert rule. + * Get the techniques property: The techniques of the alert rule template. * * @return the techniques value. */ @@ -414,7 +418,7 @@ public List techniques() { } /** - * Set the techniques property: The techniques of the alert rule. + * Set the techniques property: The techniques of the alert rule template. * * @param techniques the techniques value to set. * @return the ScheduledAlertRuleTemplateProperties object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java index 21db1aca93e5..b1ec169a23da 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java @@ -171,6 +171,10 @@ public final class SecurityAlertProperties extends EntityCommonProperties { @JsonProperty(value = "resourceIdentifiers", access = JsonProperty.Access.WRITE_ONLY) private List resourceIdentifiers; + /** Creates an instance of SecurityAlertProperties class. */ + public SecurityAlertProperties() { + } + /** * Get the alertDisplayName property: The display name of the alert. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java index e6bf9c697c0a..c7704c108f5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java @@ -30,6 +30,10 @@ public final class SecurityGroupEntityProperties extends EntityCommonProperties @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) private String sid; + /** Creates an instance of SecurityGroupEntityProperties class. */ + public SecurityGroupEntityProperties() { + } + /** * Get the distinguishedName property: The group distinguished name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java index 8bf08cc6714d..c6f751dfa6aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Anomaly", value = AnomalySecurityMLAnalyticsSettings.class)}) @Fluent public class SecurityMLAnalyticsSettingInner extends ResourceWithEtag { + /** Creates an instance of SecurityMLAnalyticsSettingInner class. */ + public SecurityMLAnalyticsSettingInner() { + } + /** {@inheritDoc} */ @Override public SecurityMLAnalyticsSettingInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java index e46fd29c170a..368b6dbbd340 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java @@ -17,6 +17,10 @@ public final class SentinelOnboardingStateInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SentinelOnboardingStateProperties innerProperties; + /** Creates an instance of SentinelOnboardingStateInner class. */ + public SentinelOnboardingStateInner() { + } + /** * Get the innerProperties property: The Sentinel onboarding state object. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java index d1067a68a26d..881aae69ba58 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java @@ -16,6 +16,10 @@ public final class SentinelOnboardingStateProperties { @JsonProperty(value = "customerManagedKey") private Boolean customerManagedKey; + /** Creates an instance of SentinelOnboardingStateProperties class. */ + public SentinelOnboardingStateProperties() { + } + /** * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java index 420eae2ca857..aeef11eb5f71 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java @@ -18,6 +18,10 @@ public final class SentinelOnboardingStatesListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SentinelOnboardingStatesListInner class. */ + public SentinelOnboardingStatesListInner() { + } + /** * Get the value property: Array of Sentinel onboarding states. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java deleted file mode 100644 index bc77b021a5b5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java +++ /dev/null @@ -1,57 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the settings. */ -@Fluent -public final class SettingListInner { - /* - * Array of settings. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the value property: Array of settings. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of settings. - * - * @param value the value value to set. - * @return the SettingListInner object itself. - */ - public SettingListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SettingListInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SettingListInner.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java deleted file mode 100644 index fe11570beafc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java +++ /dev/null @@ -1,48 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.Anomalies; -import com.azure.resourcemanager.securityinsights.models.EntityAnalytics; -import com.azure.resourcemanager.securityinsights.models.EyesOn; -import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.Ueba; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The Setting. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = SettingsInner.class) -@JsonTypeName("Settings") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Anomalies", value = Anomalies.class), - @JsonSubTypes.Type(name = "EyesOn", value = EyesOn.class), - @JsonSubTypes.Type(name = "EntityAnalytics", value = EntityAnalytics.class), - @JsonSubTypes.Type(name = "Ueba", value = Ueba.class) -}) -@Fluent -public class SettingsInner extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public SettingsInner withEtag(String etag) { - super.withEtag(etag); - 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/SourceControlInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java deleted file mode 100644 index 3d9c0096e645..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java +++ /dev/null @@ -1,262 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -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.JsonProperty; -import java.util.List; - -/** Represents a SourceControl in Azure Security Insights. */ -@Fluent -public final class SourceControlInner extends ResourceWithEtag { - /* - * source control properties - */ - @JsonProperty(value = "properties") - private SourceControlProperties innerProperties; - - /** - * Get the innerProperties property: source control properties. - * - * @return the innerProperties value. - */ - private SourceControlProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SourceControlInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the id property: The id (a Guid) of the source control. - * - * @return the id value. - */ - public String idPropertiesId() { - return this.innerProperties() == null ? null : this.innerProperties().id(); - } - - /** - * Set the id property: The id (a Guid) of the source control. - * - * @param id the id value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withIdPropertiesId(String id) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withId(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. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name of the source control. - * - * @param displayName the displayName value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the description property: A description of the source control. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: A description of the source control. - * - * @param description the description value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - public RepoType repoType() { - return this.innerProperties() == null ? null : this.innerProperties().repoType(); - } - - /** - * Set the repoType property: The repository type of the source control. - * - * @param repoType the repoType value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepoType(RepoType repoType) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepoType(repoType); - return this; - } - - /** - * Get the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - public List contentTypes() { - return this.innerProperties() == null ? null : this.innerProperties().contentTypes(); - } - - /** - * Set the contentTypes property: Array of source control content types. - * - * @param contentTypes the contentTypes value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withContentTypes(List contentTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withContentTypes(contentTypes); - return this; - } - - /** - * Get the repository property: Repository metadata. - * - * @return the repository value. - */ - public Repository repository() { - return this.innerProperties() == null ? null : this.innerProperties().repository(); - } - - /** - * Set the repository property: Repository metadata. - * - * @param repository the repository value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepository(Repository repository) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepository(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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java deleted file mode 100644 index c7b2417c0cdc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java +++ /dev/null @@ -1,296 +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.fluent.models; - -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.JsonProperty; -import java.util.List; - -/** Describes source control properties. */ -@Fluent -public final class SourceControlProperties { - /* - * The id (a Guid) of the source control - */ - @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 - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * A description of the source control - */ - @JsonProperty(value = "description") - private String description; - - /* - * The repository type of the source control - */ - @JsonProperty(value = "repoType", required = true) - private RepoType repoType; - - /* - * Array of source control content types. - */ - @JsonProperty(value = "contentTypes", required = true) - private List contentTypes; - - /* - * Repository metadata. - */ - @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. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The id (a Guid) of the source control. - * - * @param id the id value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withId(String id) { - this.id = 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. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the source control. - * - * @param displayName the displayName value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: A description of the source control. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: A description of the source control. - * - * @param description the description value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - public RepoType repoType() { - return this.repoType; - } - - /** - * Set the repoType property: The repository type of the source control. - * - * @param repoType the repoType value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepoType(RepoType repoType) { - this.repoType = repoType; - return this; - } - - /** - * Get the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - public List contentTypes() { - return this.contentTypes; - } - - /** - * Set the contentTypes property: Array of source control content types. - * - * @param contentTypes the contentTypes value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withContentTypes(List contentTypes) { - this.contentTypes = contentTypes; - return this; - } - - /** - * Get the repository property: Repository metadata. - * - * @return the repository value. - */ - public Repository repository() { - return this.repository; - } - - /** - * Set the repository property: Repository metadata. - * - * @param repository the repository value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepository(Repository repository) { - this.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. - * - * @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 SourceControlProperties")); - } - if (repoType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property repoType in model SourceControlProperties")); - } - if (contentTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property contentTypes in model SourceControlProperties")); - } - if (repository() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property repository in model SourceControlProperties")); - } else { - repository().validate(); - } - if (repositoryResourceInfo() != null) { - repositoryResourceInfo().validate(); - } - if (lastDeploymentInfo() != null) { - lastDeploymentInfo().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java index b676b6b71061..3aa288796faa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java @@ -73,6 +73,10 @@ public final class SubmissionMailEntityProperties extends EntityCommonProperties @JsonProperty(value = "reportType", access = JsonProperty.Access.WRITE_ONLY) private String reportType; + /** Creates an instance of SubmissionMailEntityProperties class. */ + public SubmissionMailEntityProperties() { + } + /** * Get the networkMessageId property: The network message id of email to which submission belongs. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java deleted file mode 100644 index defd84d01805..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Threat Intelligence Platforms data connector required properties. */ -@Fluent -public final class TICheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public TICheckRequirementsProperties 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/TIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java index 62d09af2a1b6..e43c3d1ba2cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java @@ -5,15 +5,19 @@ 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.TIDataConnectorDataTypes; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** TI (Threat Intelligence) data connector properties. */ @Fluent -public final class TIDataConnectorProperties extends DataConnectorTenantId { +public final class TIDataConnectorProperties { + /* + * The tenant id to connect to, and get the data from. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + /* * The lookback period for the feed to be imported. */ @@ -23,9 +27,33 @@ public final class TIDataConnectorProperties extends DataConnectorTenantId { /* * The available data types for the connector. */ - @JsonProperty(value = "dataTypes", required = true) + @JsonProperty(value = "dataTypes") private TIDataConnectorDataTypes dataTypes; + /** Creates an instance of TIDataConnectorProperties class. */ + public TIDataConnectorProperties() { + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.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 TIDataConnectorProperties object itself. + */ + public TIDataConnectorProperties withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + /** * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. * @@ -66,30 +94,14 @@ public TIDataConnectorProperties withDataTypes(TIDataConnectorDataTypes dataType return this; } - /** {@inheritDoc} */ - @Override - public TIDataConnectorProperties 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 TIDataConnectorProperties")); - } else { + if (dataTypes() != null) { dataTypes().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java deleted file mode 100644 index 9054e9c2939e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java +++ /dev/null @@ -1,96 +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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Describes team information. */ -@Immutable -public final class TeamInformationInner { - /* - * Team ID - */ - @JsonProperty(value = "teamId", access = JsonProperty.Access.WRITE_ONLY) - private String teamId; - - /* - * The primary channel URL of the team - */ - @JsonProperty(value = "primaryChannelUrl", access = JsonProperty.Access.WRITE_ONLY) - private String primaryChannelUrl; - - /* - * The time the team was created - */ - @JsonProperty(value = "teamCreationTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime teamCreationTimeUtc; - - /* - * The name of the team - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The description of the team - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the teamId property: Team ID. - * - * @return the teamId value. - */ - public String teamId() { - return this.teamId; - } - - /** - * Get the primaryChannelUrl property: The primary channel URL of the team. - * - * @return the primaryChannelUrl value. - */ - public String primaryChannelUrl() { - return this.primaryChannelUrl; - } - - /** - * Get the teamCreationTimeUtc property: The time the team was created. - * - * @return the teamCreationTimeUtc value. - */ - public OffsetDateTime teamCreationTimeUtc() { - return this.teamCreationTimeUtc; - } - - /** - * Get the name property: The name of the team. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: The description of the team. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * 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/ThreatIntelligenceAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java deleted file mode 100644 index 3118a288a38b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java +++ /dev/null @@ -1,176 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Threat Intelligence alert rule base property bag. */ -@Fluent -public final class ThreatIntelligenceAlertRuleProperties { - /* - * The Name of the alert rule template used to create this rule. - */ - @JsonProperty(value = "alertRuleTemplateName", required = true) - private String alertRuleTemplateName; - - /* - * The description of the alert rule. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * The display name for alerts created by this alert rule. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - 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 has been modified. - */ - @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedUtc; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", access = JsonProperty.Access.WRITE_ONLY) - private AlertSeverity severity; - - /* - * The tactics of the alert rule - */ - @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. - * - * @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 ThreatIntelligenceAlertRuleProperties object itself. - */ - public ThreatIntelligenceAlertRuleProperties withAlertRuleTemplateName(String alertRuleTemplateName) { - this.alertRuleTemplateName = alertRuleTemplateName; - return this; - } - - /** - * Get the description property: The description of the alert rule. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the displayName property: The display name for alerts created by this alert rule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * 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 ThreatIntelligenceAlertRuleProperties object itself. - */ - public ThreatIntelligenceAlertRuleProperties withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.lastModifiedUtc; - } - - /** - * Get the severity property: The severity for alerts created by this alert rule. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Get the tactics property: The tactics of the alert rule. - * - * @return the tactics value. - */ - 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alertRuleTemplateName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertRuleTemplateName in model" - + " ThreatIntelligenceAlertRuleProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleProperties.class); -} 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 deleted file mode 100644 index 2cabad3ea765..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java +++ /dev/null @@ -1,114 +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.fluent.models; - -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.AlertRuleTemplateWithMitreProperties; -import com.azure.resourcemanager.securityinsights.models.AlertSeverity; -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.TemplateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Threat Intelligence alert rule template properties. */ -@Fluent -public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRuleTemplateWithMitreProperties { - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /** - * 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 ThreatIntelligenceAlertRuleTemplateProperties object itself. - */ - public ThreatIntelligenceAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withTactics(List tactics) { - super.withTactics(tactics); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withTechniques(List techniques) { - super.withTechniques(techniques); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - super.withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withDisplayName(String displayName) { - super.withDisplayName(displayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties withRequiredDataConnectors( - List requiredDataConnectors) { - super.withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRuleTemplateProperties 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(); - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model ThreatIntelligenceAlertRuleTemplateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ThreatIntelligenceAlertRuleTemplateProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java index 94e3ad449679..a0475d7a8067 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java @@ -187,6 +187,10 @@ public final class ThreatIntelligenceIndicatorProperties extends EntityCommonPro @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extensions; + /** Creates an instance of ThreatIntelligenceIndicatorProperties class. */ + public ThreatIntelligenceIndicatorProperties() { + } + /** * Get the threatIntelligenceTags property: List of tags. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java index 66c6f53009c5..5930206a3955 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) @Fluent public class ThreatIntelligenceInformationInner extends ResourceWithEtag { + /** Creates an instance of ThreatIntelligenceInformationInner class. */ + public ThreatIntelligenceInformationInner() { + } + /** {@inheritDoc} */ @Override public ThreatIntelligenceInformationInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java index fccc6810b44c..94a545978b2e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java @@ -19,6 +19,10 @@ public final class ThreatIntelligenceMetricsListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceMetricsListInner class. */ + public ThreatIntelligenceMetricsListInner() { + } + /** * Get the value property: Array of threat intelligence metric fields (type/threat type/source). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java deleted file mode 100644 index e65e280aade2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java +++ /dev/null @@ -1,29 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; - -/** Threat Intelligence TAXII data connector required properties. */ -@Fluent -public final class TiTaxiiCheckRequirementsProperties extends DataConnectorTenantId { - /** {@inheritDoc} */ - @Override - public TiTaxiiCheckRequirementsProperties 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/TiTaxiiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java deleted file mode 100644 index 2faf94e2db69..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java +++ /dev/null @@ -1,284 +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.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.PollingFrequency; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Threat Intelligence TAXII data connector properties. */ -@Fluent -public final class TiTaxiiDataConnectorProperties extends DataConnectorTenantId { - /* - * The workspace id. - */ - @JsonProperty(value = "workspaceId") - private String workspaceId; - - /* - * The friendly name for the TAXII server. - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /* - * The API root for the TAXII server. - */ - @JsonProperty(value = "taxiiServer") - private String taxiiServer; - - /* - * The collection id of the TAXII server. - */ - @JsonProperty(value = "collectionId") - private String collectionId; - - /* - * The userName for the TAXII server. - */ - @JsonProperty(value = "userName") - private String username; - - /* - * The password for the TAXII server. - */ - @JsonProperty(value = "password") - private String password; - - /* - * The lookback period for the TAXII server. - */ - @JsonProperty(value = "taxiiLookbackPeriod") - private OffsetDateTime taxiiLookbackPeriod; - - /* - * The polling frequency for the TAXII server. - */ - @JsonProperty(value = "pollingFrequency", required = true) - private PollingFrequency pollingFrequency; - - /* - * The available data types for Threat Intelligence TAXII data connector. - */ - @JsonProperty(value = "dataTypes", required = true) - private TiTaxiiDataConnectorDataTypes dataTypes; - - /** - * Get the workspaceId property: The workspace id. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Set the workspaceId property: The workspace id. - * - * @param workspaceId the workspaceId value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - return this; - } - - /** - * Get the friendlyName property: The friendly name for the TAXII server. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for the TAXII server. - * - * @param friendlyName the friendlyName value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the taxiiServer property: The API root for the TAXII server. - * - * @return the taxiiServer value. - */ - public String taxiiServer() { - return this.taxiiServer; - } - - /** - * Set the taxiiServer property: The API root for the TAXII server. - * - * @param taxiiServer the taxiiServer value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withTaxiiServer(String taxiiServer) { - this.taxiiServer = taxiiServer; - return this; - } - - /** - * Get the collectionId property: The collection id of the TAXII server. - * - * @return the collectionId value. - */ - public String collectionId() { - return this.collectionId; - } - - /** - * Set the collectionId property: The collection id of the TAXII server. - * - * @param collectionId the collectionId value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withCollectionId(String collectionId) { - this.collectionId = collectionId; - return this; - } - - /** - * Get the username property: The userName for the TAXII server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The userName for the TAXII server. - * - * @param username the username value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password for the TAXII server. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password for the TAXII server. - * - * @param password the password value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @return the taxiiLookbackPeriod value. - */ - public OffsetDateTime taxiiLookbackPeriod() { - return this.taxiiLookbackPeriod; - } - - /** - * Set the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @param taxiiLookbackPeriod the taxiiLookbackPeriod value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) { - this.taxiiLookbackPeriod = taxiiLookbackPeriod; - return this; - } - - /** - * Get the pollingFrequency property: The polling frequency for the TAXII server. - * - * @return the pollingFrequency value. - */ - public PollingFrequency pollingFrequency() { - return this.pollingFrequency; - } - - /** - * Set the pollingFrequency property: The polling frequency for the TAXII server. - * - * @param pollingFrequency the pollingFrequency value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withPollingFrequency(PollingFrequency pollingFrequency) { - this.pollingFrequency = pollingFrequency; - return this; - } - - /** - * Get the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @return the dataTypes value. - */ - public TiTaxiiDataConnectorDataTypes dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TiTaxiiDataConnectorProperties object itself. - */ - public TiTaxiiDataConnectorProperties withDataTypes(TiTaxiiDataConnectorDataTypes dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnectorProperties 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 (pollingFrequency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property pollingFrequency in model TiTaxiiDataConnectorProperties")); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model TiTaxiiDataConnectorProperties")); - } else { - dataTypes().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java deleted file mode 100644 index 9a9c6252b395..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java +++ /dev/null @@ -1,48 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.models.UebaDataSources; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Ueba property bag. */ -@Fluent -public final class UebaProperties { - /* - * The relevant data sources that enriched by ueba - */ - @JsonProperty(value = "dataSources") - private List dataSources; - - /** - * Get the dataSources property: The relevant data sources that enriched by ueba. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.dataSources; - } - - /** - * Set the dataSources property: The relevant data sources that enriched by ueba. - * - * @param dataSources the dataSources value to set. - * @return the UebaProperties object itself. - */ - public UebaProperties withDataSources(List dataSources) { - this.dataSources = dataSources; - 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/UrlEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java index 833855a5cdd7..7ccc954ce3dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java @@ -17,6 +17,10 @@ public final class UrlEntityProperties extends EntityCommonProperties { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; + /** Creates an instance of UrlEntityProperties class. */ + public UrlEntityProperties() { + } + /** * Get the url property: A full URL the entity points to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java index 14c1ca299bc2..afd1799b3932 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 @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; -import com.azure.resourcemanager.securityinsights.models.SourceType; +import com.azure.resourcemanager.securityinsights.models.Source; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -22,6 +22,10 @@ public final class WatchlistInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistProperties innerProperties; + /** Creates an instance of WatchlistInner class. */ + public WatchlistInner() { + } + /** * Get the innerProperties property: Watchlist properties. * @@ -108,21 +112,21 @@ public WatchlistInner withProvider(String provider) { } /** - * Get the source property: The filename of the watchlist, called 'source'. + * Get the source property: The source of the watchlist. * * @return the source value. */ - public String source() { + public Source source() { return this.innerProperties() == null ? null : this.innerProperties().source(); } /** - * Set the source property: The filename of the watchlist, called 'source'. + * Set the source property: The source of the watchlist. * * @param source the source value to set. * @return the WatchlistInner object itself. */ - public WatchlistInner withSource(String source) { + public WatchlistInner withSource(Source source) { if (this.innerProperties() == null) { this.innerProperties = new WatchlistProperties(); } @@ -130,29 +134,6 @@ public WatchlistInner withSource(String 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. * @@ -407,7 +388,7 @@ public WatchlistInner withTenantId(String tenantId) { } /** - * Get the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. + * Get the numberOfLinesToSkip property: The number of lines in a csv content to skip before the header. * * @return the numberOfLinesToSkip value. */ @@ -416,7 +397,7 @@ public Integer numberOfLinesToSkip() { } /** - * Set the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. + * Set the numberOfLinesToSkip property: The number of lines in a csv content to skip before the header. * * @param numberOfLinesToSkip the numberOfLinesToSkip value to set. * @return the WatchlistInner object itself. @@ -430,8 +411,8 @@ public WatchlistInner withNumberOfLinesToSkip(Integer numberOfLinesToSkip) { } /** - * Get the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * Get the rawContent property: The raw content that represents to watchlist items to create. Example : This line + * will be skipped header1,header2 value1,value2. * * @return the rawContent value. */ @@ -440,8 +421,8 @@ public String rawContent() { } /** - * Set the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * Set the rawContent property: The raw content that represents to watchlist items to create. Example : This line + * will be skipped header1,header2 value1,value2. * * @param rawContent the rawContent value to set. * @return the WatchlistInner object itself. @@ -482,7 +463,7 @@ public WatchlistInner withItemsSearchKey(String itemsSearchKey) { } /** - * Get the contentType property: The content type of the raw content. Example : text/csv or text/tsv. + * Get the contentType property: The content type of the raw content. For now, only text/csv is valid. * * @return the contentType value. */ @@ -491,7 +472,7 @@ public String contentType() { } /** - * Set the contentType property: The content type of the raw content. Example : text/csv or text/tsv. + * Set the contentType property: The content type of the raw content. For now, only text/csv is valid. * * @param contentType the contentType value to set. * @return the WatchlistInner object itself. @@ -505,8 +486,8 @@ public WatchlistInner withContentType(String contentType) { } /** - * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. **Note** : When + * a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * * @return the uploadStatus value. */ @@ -515,8 +496,8 @@ public String uploadStatus() { } /** - * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. **Note** : When + * a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * * @param uploadStatus the uploadStatus value to set. * @return the WatchlistInner object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java index e7424ae99545..1bf5568574fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java @@ -9,9 +9,8 @@ import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -import java.util.Map; -/** Represents a Watchlist item in Azure Security Insights. */ +/** Represents a Watchlist Item in Azure Security Insights. */ @Fluent public final class WatchlistItemInner extends ResourceWithEtag { /* @@ -20,6 +19,10 @@ public final class WatchlistItemInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistItemProperties innerProperties; + /** Creates an instance of WatchlistItemInner class. */ + public WatchlistItemInner() { + } + /** * Get the innerProperties property: Watchlist Item properties. * @@ -225,7 +228,7 @@ public WatchlistItemInner withUpdatedBy(UserInfo updatedBy) { * * @return the itemsKeyValue value. */ - public Map itemsKeyValue() { + public Object itemsKeyValue() { return this.innerProperties() == null ? null : this.innerProperties().itemsKeyValue(); } @@ -235,7 +238,7 @@ public Map itemsKeyValue() { * @param itemsKeyValue the itemsKeyValue value to set. * @return the WatchlistItemInner object itself. */ - public WatchlistItemInner withItemsKeyValue(Map itemsKeyValue) { + public WatchlistItemInner withItemsKeyValue(Object itemsKeyValue) { if (this.innerProperties() == null) { this.innerProperties = new WatchlistItemProperties(); } @@ -248,7 +251,7 @@ public WatchlistItemInner withItemsKeyValue(Map itemsKeyValue) { * * @return the entityMapping value. */ - public Map entityMapping() { + public Object entityMapping() { return this.innerProperties() == null ? null : this.innerProperties().entityMapping(); } @@ -258,7 +261,7 @@ public Map entityMapping() { * @param entityMapping the entityMapping value to set. * @return the WatchlistItemInner object itself. */ - public WatchlistItemInner withEntityMapping(Map entityMapping) { + public WatchlistItemInner withEntityMapping(Object entityMapping) { if (this.innerProperties() == null) { this.innerProperties = new WatchlistItemProperties(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java index b33026a9990e..44c8f0d3bbda 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java @@ -7,10 +7,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -import java.util.Map; /** Describes watchlist item properties. */ @Fluent @@ -67,15 +65,17 @@ public final class WatchlistItemProperties { * key-value pairs for a watchlist item */ @JsonProperty(value = "itemsKeyValue", required = true) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map itemsKeyValue; + private Object itemsKeyValue; /* * key-value pairs for a watchlist item entity mapping */ @JsonProperty(value = "entityMapping") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map entityMapping; + private Object entityMapping; + + /** Creates an instance of WatchlistItemProperties class. */ + public WatchlistItemProperties() { + } /** * Get the watchlistItemType property: The type of the watchlist item. @@ -242,7 +242,7 @@ public WatchlistItemProperties withUpdatedBy(UserInfo updatedBy) { * * @return the itemsKeyValue value. */ - public Map itemsKeyValue() { + public Object itemsKeyValue() { return this.itemsKeyValue; } @@ -252,7 +252,7 @@ public Map itemsKeyValue() { * @param itemsKeyValue the itemsKeyValue value to set. * @return the WatchlistItemProperties object itself. */ - public WatchlistItemProperties withItemsKeyValue(Map itemsKeyValue) { + public WatchlistItemProperties withItemsKeyValue(Object itemsKeyValue) { this.itemsKeyValue = itemsKeyValue; return this; } @@ -262,7 +262,7 @@ public WatchlistItemProperties withItemsKeyValue(Map itemsKeyVal * * @return the entityMapping value. */ - public Map entityMapping() { + public Object entityMapping() { return this.entityMapping; } @@ -272,7 +272,7 @@ public Map entityMapping() { * @param entityMapping the entityMapping value to set. * @return the WatchlistItemProperties object itself. */ - public WatchlistItemProperties withEntityMapping(Map entityMapping) { + public WatchlistItemProperties withEntityMapping(Object entityMapping) { this.entityMapping = entityMapping; return this; } 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 97fa95571482..e967da3c0439 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.SourceType; +import com.azure.resourcemanager.securityinsights.models.Source; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -35,16 +35,10 @@ public final class WatchlistProperties { private String provider; /* - * The filename of the watchlist, called 'source' + * The source of the watchlist */ - @JsonProperty(value = "source") - private String source; - - /* - * The sourceType of the watchlist - */ - @JsonProperty(value = "sourceType") - private SourceType sourceType; + @JsonProperty(value = "source", required = true) + private Source source; /* * The time the watchlist was created @@ -113,14 +107,15 @@ public final class WatchlistProperties { private String tenantId; /* - * The number of lines in a csv/tsv content to skip before the header + * The number of lines in a csv content to skip before the header */ @JsonProperty(value = "numberOfLinesToSkip") private Integer numberOfLinesToSkip; /* - * The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content - * of the file that will parsed by the endpoint + * The raw content that represents to watchlist items to create. Example : This line will be skipped + * header1,header2 + * value1,value2 */ @JsonProperty(value = "rawContent") private String rawContent; @@ -134,18 +129,22 @@ public final class WatchlistProperties { private String itemsSearchKey; /* - * The content type of the raw content. Example : text/csv or text/tsv + * The content type of the raw content. For now, only text/csv is valid */ @JsonProperty(value = "contentType") private String contentType; /* - * The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is - * equal to InProgress, the Watchlist cannot be deleted + * The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a Watchlist upload status is + * InProgress, the Watchlist cannot be deleted */ @JsonProperty(value = "uploadStatus") private String uploadStatus; + /** Creates an instance of WatchlistProperties class. */ + public WatchlistProperties() { + } + /** * Get the watchlistId property: The id (a Guid) of the watchlist. * @@ -207,45 +206,25 @@ public WatchlistProperties withProvider(String provider) { } /** - * Get the source property: The filename of the watchlist, called 'source'. + * Get the source property: The source of the watchlist. * * @return the source value. */ - public String source() { + public Source source() { return this.source; } /** - * Set the source property: The filename of the watchlist, called 'source'. + * Set the source property: The source of the watchlist. * * @param source the source value to set. * @return the WatchlistProperties object itself. */ - public WatchlistProperties withSource(String source) { + public WatchlistProperties withSource(Source 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. * @@ -467,7 +446,7 @@ public WatchlistProperties withTenantId(String tenantId) { } /** - * Get the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. + * Get the numberOfLinesToSkip property: The number of lines in a csv content to skip before the header. * * @return the numberOfLinesToSkip value. */ @@ -476,7 +455,7 @@ public Integer numberOfLinesToSkip() { } /** - * Set the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. + * Set the numberOfLinesToSkip property: The number of lines in a csv content to skip before the header. * * @param numberOfLinesToSkip the numberOfLinesToSkip value to set. * @return the WatchlistProperties object itself. @@ -487,8 +466,8 @@ public WatchlistProperties withNumberOfLinesToSkip(Integer numberOfLinesToSkip) } /** - * Get the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * Get the rawContent property: The raw content that represents to watchlist items to create. Example : This line + * will be skipped header1,header2 value1,value2. * * @return the rawContent value. */ @@ -497,8 +476,8 @@ public String rawContent() { } /** - * Set the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * Set the rawContent property: The raw content that represents to watchlist items to create. Example : This line + * will be skipped header1,header2 value1,value2. * * @param rawContent the rawContent value to set. * @return the WatchlistProperties object itself. @@ -533,7 +512,7 @@ public WatchlistProperties withItemsSearchKey(String itemsSearchKey) { } /** - * Get the contentType property: The content type of the raw content. Example : text/csv or text/tsv. + * Get the contentType property: The content type of the raw content. For now, only text/csv is valid. * * @return the contentType value. */ @@ -542,7 +521,7 @@ public String contentType() { } /** - * Set the contentType property: The content type of the raw content. Example : text/csv or text/tsv. + * Set the contentType property: The content type of the raw content. For now, only text/csv is valid. * * @param contentType the contentType value to set. * @return the WatchlistProperties object itself. @@ -553,8 +532,8 @@ public WatchlistProperties withContentType(String contentType) { } /** - * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * Get the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. **Note** : When + * a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * * @return the uploadStatus value. */ @@ -563,8 +542,8 @@ public String uploadStatus() { } /** - * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * Set the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. **Note** : When + * a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * * @param uploadStatus the uploadStatus value to set. * @return the WatchlistProperties object itself. @@ -590,6 +569,11 @@ 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 7b08804507b7..03b621cba874 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 @@ -477,14 +477,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - return getAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); } /** @@ -494,16 +496,14 @@ public ActionResponseInner get(String resourceGroupName, String workspaceName, S * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); + public ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + return getWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE).getValue(); } /** @@ -667,15 +667,22 @@ private Mono createOrUpdateAsync( * @param ruleId Alert rule ID. * @param actionId Action ID. * @param action The action. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. + * @return action for alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, actionId, action).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String ruleId, + String actionId, + ActionRequest action, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action, context) + .block(); } /** @@ -686,22 +693,16 @@ public ActionResponseInner createOrUpdate( * @param ruleId Alert rule ID. * @param actionId Action ID. * @param action The action. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule along with {@link Response}. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String ruleId, - String actionId, - ActionRequest action, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, action, context) - .block(); + public ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, actionId, action, Context.NONE) + .getValue(); } /** @@ -843,13 +844,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - deleteAsync(resourceGroupName, workspaceName, ruleId, actionId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); } /** @@ -859,16 +863,13 @@ public void delete(String resourceGroupName, String workspaceName, String ruleId * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, actionId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java index 09f8ea57b333..f4284ef8eb34 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java @@ -41,15 +41,6 @@ public PagedIterable listByAlertRule( return Utils.mapPage(inner, inner1 -> new ActionResponseImpl(inner1, this.manager())); } - public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); - if (inner != null) { - return new ActionResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); + if (inner != null) { + return new ActionResponseImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -74,6 +70,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + } + public ActionResponse getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java index d017573675b9..20f5477e07ad 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 @@ -407,14 +407,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - return getAsync(resourceGroupName, workspaceName, alertRuleTemplateId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId, context).block(); } /** @@ -423,16 +425,14 @@ public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, alertRuleTemplateId, context).block(); + public AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { + return getWithResponse(resourceGroupName, workspaceName, alertRuleTemplateId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java index e5bdc4bc9ffc..a8a1e69eefb4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String wo return Utils.mapPage(inner, inner1 -> new AlertRuleTemplateImpl(inner1, this.manager())); } - public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); - if (inner != null) { - return new AlertRuleTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { Response inner = @@ -63,6 +54,15 @@ public Response getWithResponse( } } + public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { + AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); + if (inner != null) { + return new AlertRuleTemplateImpl(inner, this.manager()); + } else { + return null; + } + } + private AlertRuleTemplatesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java index e092a7beec6d..00b1c8c3d835 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 @@ -437,14 +437,16 @@ private Mono getAsync(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId) { - return getAsync(resourceGroupName, workspaceName, ruleId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); } /** @@ -453,16 +455,14 @@ public AlertRuleInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); + public AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId) { + return getWithResponse(resourceGroupName, workspaceName, ruleId, Context.NONE).getValue(); } /** @@ -609,15 +609,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleId, alertRule).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule, context).block(); } /** @@ -627,16 +628,15 @@ public AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleId, alertRule, context).block(); + public AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleId, alertRule, Context.NONE).getValue(); } /** @@ -765,13 +765,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - deleteAsync(resourceGroupName, workspaceName, ruleId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); } /** @@ -780,16 +783,13 @@ public void delete(String resourceGroupName, String workspaceName, String ruleId * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, ruleId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String ruleId) { + deleteWithResponse(resourceGroupName, workspaceName, ruleId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java index 4f4d06aa4fa9..02bf47b98521 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceN return Utils.mapPage(inner, inner1 -> new AlertRuleImpl(inner1, this.manager())); } - public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { - AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); - if (inner != null) { - return new AlertRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, Context context) { Response inner = @@ -62,9 +53,8 @@ public Response getWithResponse( } } - public AlertRule createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { + AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); if (inner != null) { return new AlertRuleImpl(inner, this.manager()); } else { @@ -89,8 +79,14 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + public AlertRule createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { + AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + if (inner != null) { + return new AlertRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -98,6 +94,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + } + private AlertRulesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java index 68b5fbf01089..eb7a4c9e7c60 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 @@ -264,14 +264,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { - return getAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** @@ -280,16 +282,14 @@ public AutomationRuleInner get(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId) { + return getWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } /** @@ -421,7 +421,6 @@ private Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -429,10 +428,8 @@ private Mono> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert) { + String resourceGroupName, String workspaceName, String automationRuleId) { + final AutomationRuleInner automationRuleToUpsert = null; return createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -444,18 +441,23 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param automationRuleToUpsert The automation rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String automationRuleId) { - final AutomationRuleInner automationRuleToUpsert = null; + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String automationRuleId, + AutomationRuleInner automationRuleToUpsert, + Context context) { return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) + .block(); } /** @@ -472,32 +474,9 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId) { final AutomationRuleInner automationRuleToUpsert = null; - return createOrUpdateAsync(resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert).block(); - } - - /** - * Creates or updates the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @param automationRuleToUpsert The automation rule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String automationRuleId, - AutomationRuleInner automationRuleToUpsert, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, context) - .block(); + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, automationRuleId, automationRuleToUpsert, Context.NONE) + .getValue(); } /** @@ -629,14 +608,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return deleteAsync(resourceGroupName, workspaceName, automationRuleId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); } /** @@ -645,16 +626,14 @@ public Object delete(String resourceGroupName, String workspaceName, String auto * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, automationRuleId, context).block(); + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java index 90cf494caf3d..4933ef8b33fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java @@ -28,15 +28,6 @@ public AutomationRulesImpl( this.serviceManager = serviceManager; } - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { - AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); - if (inner != null) { - return new AutomationRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { + AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); + if (inner != null) { + return new AutomationRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -61,6 +57,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java deleted file mode 100644 index b42e787c9a3f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java +++ /dev/null @@ -1,39 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponse; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; - -public final class BookmarkExpandResponseImpl implements BookmarkExpandResponse { - private BookmarkExpandResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - BookmarkExpandResponseImpl( - BookmarkExpandResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ExpansionResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public BookmarkExpandResponseValue value() { - return this.innerModel().value(); - } - - public BookmarkExpandResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkImpl.java index 58081823ee60..fa5e7b6fcbbb 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,9 +7,7 @@ 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; @@ -98,33 +96,6 @@ 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 String resourceGroupName() { return resourceGroupName; } @@ -299,19 +270,4 @@ 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/BookmarkOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java deleted file mode 100644 index 0e1ed907707d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java +++ /dev/null @@ -1,257 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BookmarkOperationsClient. */ -public final class BookmarkOperationsClientImpl implements BookmarkOperationsClient { - /** The proxy service used to perform REST calls. */ - private final BookmarkOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of BookmarkOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BookmarkOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(BookmarkOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsBookmarkOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/expand") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expand( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @BodyParam("application/json") BookmarkExpandParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - parameters, - accept, - context); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono expandAsync( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, bookmarkId, parameters).block(); - } - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java deleted file mode 100644 index 40b134363e7c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java +++ /dev/null @@ -1,68 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandResponse; -import com.azure.resourcemanager.securityinsights.models.BookmarkOperations; - -public final class BookmarkOperationsImpl implements BookmarkOperations { - private static final ClientLogger LOGGER = new ClientLogger(BookmarkOperationsImpl.class); - - private final BookmarkOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public BookmarkOperationsImpl( - BookmarkOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - BookmarkExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); - if (inner != null) { - return new BookmarkExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - Response inner = - this.serviceClient().expandWithResponse(resourceGroupName, workspaceName, bookmarkId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BookmarkExpandResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private BookmarkOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java deleted file mode 100644 index f2f214d54a93..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java +++ /dev/null @@ -1,1066 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.RelationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BookmarkRelationsClient. */ -public final class BookmarkRelationsClientImpl implements BookmarkRelationsClient { - /** The proxy service used to perform REST calls. */ - private final BookmarkRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of BookmarkRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BookmarkRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(BookmarkRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsBookmarkRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @BodyParam("application/json") RelationInner relation, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations" - + "/{relationName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("bookmarkId") String bookmarkId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark 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 bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String bookmarkId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark 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 bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken)); - } - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context)); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); - } - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - relation, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - if (relation == null) { - return Mono.error(new IllegalArgumentException("Parameter relation is required and cannot be null.")); - } else { - relation.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - relation, - accept, - context); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation).block(); - } - - /** - * Creates the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param relation The relation model. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) - .block(); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, 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 (bookmarkId == null) { - return Mono.error(new IllegalArgumentException("Parameter bookmarkId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - bookmarkId, - relationName, - accept, - context); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); - } - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java deleted file mode 100644 index 0c90dbec0292..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java +++ /dev/null @@ -1,232 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.BookmarkRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class BookmarkRelationsImpl implements BookmarkRelations { - private static final ClientLogger LOGGER = new ClientLogger(BookmarkRelationsImpl.class); - - private final BookmarkRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public BookmarkRelationsImpl( - BookmarkRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, bookmarkId); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, bookmarkId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - public Relation getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String bookmarkId = Utils.getValueFromIdByName(id, "bookmarks"); - if (bookmarkId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'bookmarks'.", id))); - } - String relationName = Utils.getValueFromIdByName(id, "relations"); - if (relationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); - } - - private BookmarkRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public RelationImpl define(String name) { - return new RelationImpl(name, this.manager()); - } -} 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 4dc36ed754b4..207d815a69c6 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 @@ -437,14 +437,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId) { - return getAsync(resourceGroupName, workspaceName, bookmarkId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); } /** @@ -453,16 +455,14 @@ public BookmarkInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); + public BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId) { + return getWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE).getValue(); } /** @@ -611,15 +611,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, bookmark).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark, context).block(); } /** @@ -629,16 +630,16 @@ public BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, bookmark, context).block(); + public BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, bookmarkId, bookmark, Context.NONE) + .getValue(); } /** @@ -767,13 +768,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); } /** @@ -782,16 +786,13 @@ public void delete(String resourceGroupName, String workspaceName, String bookma * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { + deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java index e87053fd5814..bee3f246130b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceNa return Utils.mapPage(inner, inner1 -> new BookmarkImpl(inner1, this.manager())); } - public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { - BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); - if (inner != null) { - return new BookmarkImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { + BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); + if (inner != null) { + return new BookmarkImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, context); } + public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { + this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + } + public Bookmark getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java deleted file mode 100644 index 2543bc68e69c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java +++ /dev/null @@ -1,39 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorAuthorizationState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorLicenseState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState; - -public final class DataConnectorRequirementsStateImpl implements DataConnectorRequirementsState { - private DataConnectorRequirementsStateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - DataConnectorRequirementsStateImpl( - DataConnectorRequirementsStateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public DataConnectorAuthorizationState authorizationState() { - return this.innerModel().authorizationState(); - } - - public DataConnectorLicenseState licenseState() { - return this.innerModel().licenseState(); - } - - public DataConnectorRequirementsStateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java deleted file mode 100644 index b19d22164e89..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java +++ /dev/null @@ -1,262 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * DataConnectorsCheckRequirementsOperationsClient. - */ -public final class DataConnectorsCheckRequirementsOperationsClientImpl - implements DataConnectorsCheckRequirementsOperationsClient { - /** The proxy service used to perform REST calls. */ - private final DataConnectorsCheckRequirementsOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of DataConnectorsCheckRequirementsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataConnectorsCheckRequirementsOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create( - DataConnectorsCheckRequirementsOperationsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsDataConnectorsCheckRequirementsOperations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsCheckRequirementsOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - 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 (dataConnectorsCheckRequirements == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataConnectorsCheckRequirements is required and cannot be null.")); - } else { - dataConnectorsCheckRequirements.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .post( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorsCheckRequirements, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> postWithResponseAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - 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 (dataConnectorsCheckRequirements == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter dataConnectorsCheckRequirements is required and cannot be null.")); - } else { - dataConnectorsCheckRequirements.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .post( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorsCheckRequirements, - accept, - context); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorRequirementsStateInner post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements).block(); - } - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) - .block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java deleted file mode 100644 index 1c97eca6aff9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java +++ /dev/null @@ -1,71 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorRequirementsState; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.DataConnectorsCheckRequirementsOperations; - -public final class DataConnectorsCheckRequirementsOperationsImpl implements DataConnectorsCheckRequirementsOperations { - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorsCheckRequirementsOperationsImpl.class); - - private final DataConnectorsCheckRequirementsOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public DataConnectorsCheckRequirementsOperationsImpl( - DataConnectorsCheckRequirementsOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - DataConnectorRequirementsStateInner inner = - this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); - if (inner != null) { - return new DataConnectorRequirementsStateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - Response inner = - this - .serviceClient() - .postWithResponse(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataConnectorRequirementsStateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private DataConnectorsCheckRequirementsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java index 1a58d841aa80..bbf1ca16662f 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 @@ -13,7 +13,6 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -31,7 +30,6 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; import com.azure.resourcemanager.securityinsights.models.DataConnectorList; import reactor.core.publisher.Mono; @@ -125,41 +123,6 @@ Mono> delete( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/connect") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> connect( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @BodyParam("application/json") DataConnectorConnectBody connectBody, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}" - + "/disconnect") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disconnect( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("dataConnectorId") String dataConnectorId, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -477,14 +440,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. + * @return a data connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId) { - return getAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -493,16 +458,14 @@ public DataConnectorInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector along with {@link Response}. + * @return a data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId) { + return getWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE).getValue(); } /** @@ -655,15 +618,22 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param dataConnector The data connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return data connector along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataConnectorId, dataConnector).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String dataConnectorId, + DataConnectorInner dataConnector, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) + .block(); } /** @@ -673,22 +643,17 @@ public DataConnectorInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param dataConnector The data connector. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector along with {@link Response}. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) - .block(); + public DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, dataConnectorId, dataConnector, Context.NONE) + .getValue(); } /** @@ -814,21 +779,6 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S .flatMap(ignored -> Mono.empty()); } - /** - * Delete the data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - deleteAsync(resourceGroupName, workspaceName, dataConnectorId).block(); - } - /** * Delete the data connector. * @@ -848,343 +798,18 @@ public Response deleteWithResponse( } /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> connectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - 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 (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (connectBody == null) { - return Mono.error(new IllegalArgumentException("Parameter connectBody is required and cannot be null.")); - } else { - connectBody.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .connect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - connectBody, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> connectWithResponseAsync( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - 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 (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - if (connectBody == null) { - return Mono.error(new IllegalArgumentException("Parameter connectBody is required and cannot be null.")); - } else { - connectBody.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .connect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - connectBody, - accept, - context); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono connectAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - connectAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody).block(); - } - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) - .block(); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disconnectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId) { - 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 (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disconnectWithResponseAsync( - String resourceGroupName, String workspaceName, String dataConnectorId, 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 (dataConnectorId == null) { - return Mono - .error(new IllegalArgumentException("Parameter dataConnectorId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - dataConnectorId, - accept, - context); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disconnectAsync(String resourceGroupName, String workspaceName, String dataConnectorId) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - disconnectAsync(resourceGroupName, workspaceName, dataConnectorId).block(); - } - - /** - * Disconnect a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java index 33b8c30d1247..6e1fa4b53fdf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; import com.azure.resourcemanager.securityinsights.models.DataConnector; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; import com.azure.resourcemanager.securityinsights.models.DataConnectors; public final class DataConnectorsImpl implements DataConnectors { @@ -39,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new DataConnectorImpl(inner1, this.manager())); } - public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { - DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); - if (inner != null) { - return new DataConnectorImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { Response inner = @@ -63,10 +53,8 @@ public Response getWithResponse( } } - public DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - DataConnectorInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { + DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); if (inner != null) { return new DataConnectorImpl(inner, this.manager()); } else { @@ -95,8 +83,15 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); + public DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + DataConnectorInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + if (inner != null) { + return new DataConnectorImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,29 +99,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); } - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); - } - - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return this - .serviceClient() - .connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, context); - } - - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); - } - - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return this.serviceClient().disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); } private DataConnectorsClient serviceClient() { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java deleted file mode 100644 index 918c289e473c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java +++ /dev/null @@ -1,211 +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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DomainWhoisClient. */ -public final class DomainWhoisClientImpl implements DomainWhoisClient { - /** The proxy service used to perform REST calls. */ - private final DomainWhoisService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of DomainWhoisClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DomainWhoisClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(DomainWhoisService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsDomainWhois to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsDoma") - private interface DomainWhoisService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/domain/whois/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("domain") String domain, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String domain) { - 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 (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - domain, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String domain, 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 (domain == null) { - return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - domain, - accept, - context); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String domain) { - return getWithResponseAsync(resourceGroupName, domain).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { - return getAsync(resourceGroupName, domain).block(); - } - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domain, Context context) { - return getWithResponseAsync(resourceGroupName, domain, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java deleted file mode 100644 index be9939f6abc0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java +++ /dev/null @@ -1,60 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import com.azure.resourcemanager.securityinsights.models.DomainWhois; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhois; - -public final class DomainWhoisImpl implements DomainWhois { - private static final ClientLogger LOGGER = new ClientLogger(DomainWhoisImpl.class); - - private final DomainWhoisClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public DomainWhoisImpl( - DomainWhoisClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EnrichmentDomainWhois get(String resourceGroupName, String domain) { - EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); - if (inner != null) { - return new EnrichmentDomainWhoisImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String domain, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, domain, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnrichmentDomainWhoisImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private DomainWhoisClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java deleted file mode 100644 index 4f643ea4b717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentDomainWhoisImpl.java +++ /dev/null @@ -1,55 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhois; -import com.azure.resourcemanager.securityinsights.models.EnrichmentDomainWhoisDetails; -import java.time.OffsetDateTime; - -public final class EnrichmentDomainWhoisImpl implements EnrichmentDomainWhois { - private EnrichmentDomainWhoisInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EnrichmentDomainWhoisImpl( - EnrichmentDomainWhoisInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String domain() { - return this.innerModel().domain(); - } - - public String server() { - return this.innerModel().server(); - } - - public OffsetDateTime created() { - return this.innerModel().created(); - } - - public OffsetDateTime updated() { - return this.innerModel().updated(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public EnrichmentDomainWhoisDetails parsedWhois() { - return this.innerModel().parsedWhois(); - } - - public EnrichmentDomainWhoisInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java deleted file mode 100644 index 75885149ad4d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EnrichmentIpGeodataImpl.java +++ /dev/null @@ -1,97 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentIpGeodata; - -public final class EnrichmentIpGeodataImpl implements EnrichmentIpGeodata { - private EnrichmentIpGeodataInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EnrichmentIpGeodataImpl( - EnrichmentIpGeodataInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String asn() { - return this.innerModel().asn(); - } - - public String carrier() { - return this.innerModel().carrier(); - } - - public String city() { - return this.innerModel().city(); - } - - public Integer cityCf() { - return this.innerModel().cityCf(); - } - - public String continent() { - return this.innerModel().continent(); - } - - public String country() { - return this.innerModel().country(); - } - - public Integer countryCf() { - return this.innerModel().countryCf(); - } - - public String ipAddr() { - return this.innerModel().ipAddr(); - } - - public String ipRoutingType() { - return this.innerModel().ipRoutingType(); - } - - public String latitude() { - return this.innerModel().latitude(); - } - - public String longitude() { - return this.innerModel().longitude(); - } - - public String organization() { - return this.innerModel().organization(); - } - - public String organizationType() { - return this.innerModel().organizationType(); - } - - public String region() { - return this.innerModel().region(); - } - - public String state() { - return this.innerModel().state(); - } - - public Integer stateCf() { - return this.innerModel().stateCf(); - } - - public String stateCode() { - return this.innerModel().stateCode(); - } - - public EnrichmentIpGeodataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java deleted file mode 100644 index f9c1c922a5b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java +++ /dev/null @@ -1,1102 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; -import com.azure.resourcemanager.securityinsights.models.EntityList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesClient. */ -public final class EntitiesClientImpl implements EntitiesClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesClientImpl(SecurityInsightsImpl client) { - this.service = RestProxy.create(EntitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntities to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expand( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityExpandParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/queries") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> queries( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @QueryParam("kind") EntityItemQueryKind kind, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getInsights") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getInsights( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityGetInsightsParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entities. - * - * @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 entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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 entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entities. - * - * @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 entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entities. - * - * @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 entities 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 entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - accept, - context); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String entityId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { - return getAsync(resourceGroupName, workspaceName, entityId).block(); - } - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono expandAsync( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queriesWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (kind == null) { - return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .queries( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - kind, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> queriesWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (kind == null) { - return Mono.error(new IllegalArgumentException("Parameter kind is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .queries( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - kind, - accept, - context); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono queriesAsync( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesAsync(resourceGroupName, workspaceName, entityId, kind).block(); - } - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInsightsWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInsightsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getInsights( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getInsightsAsync( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java deleted file mode 100644 index f2cffddbe566..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java +++ /dev/null @@ -1,258 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesGetTimelinesClient. */ -public final class EntitiesGetTimelinesClientImpl implements EntitiesGetTimelinesClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesGetTimelinesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesGetTimelinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesGetTimelinesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(EntitiesGetTimelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntitiesGetTimelines to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesGetTimelinesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/getTimeline") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @BodyParam("application/json") EntityTimelineParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - parameters, - accept, - context); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listAsync(resourceGroupName, workspaceName, entityId, parameters).block(); - } - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java deleted file mode 100644 index 79b119a109c9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java +++ /dev/null @@ -1,68 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntitiesGetTimelines; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineResponse; - -public final class EntitiesGetTimelinesImpl implements EntitiesGetTimelines { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesGetTimelinesImpl.class); - - private final EntitiesGetTimelinesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesGetTimelinesImpl( - EntitiesGetTimelinesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - EntityTimelineResponseInner inner = - this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityTimelineResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityTimelineResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntitiesGetTimelinesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java deleted file mode 100644 index 6ce063fd52fe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java +++ /dev/null @@ -1,167 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.Entities; -import com.azure.resourcemanager.securityinsights.models.Entity; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponse; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; -import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; - -public final class EntitiesImpl implements Entities { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesImpl.class); - - private final EntitiesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesImpl( - EntitiesClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityImpl(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 EntityImpl(inner1, this.manager())); - } - - public Entity get(String resourceGroupName, String workspaceName, String entityId) { - EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); - if (inner != null) { - return new EntityImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - EntityExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - Response inner = - this.serviceClient().expandWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityExpandResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); - if (inner != null) { - return new GetQueriesResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - Response inner = - this.serviceClient().queriesWithResponse(resourceGroupName, workspaceName, entityId, kind, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new GetQueriesResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - EntityGetInsightsResponseInner inner = - this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityGetInsightsResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - Response inner = - this - .serviceClient() - .getInsightsWithResponse(resourceGroupName, workspaceName, entityId, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityGetInsightsResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntitiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java deleted file mode 100644 index d1fbb7073274..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java +++ /dev/null @@ -1,458 +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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.RelationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntitiesRelationsClient. */ -public final class EntitiesRelationsClientImpl implements EntitiesRelationsClient { - /** The proxy service used to perform REST calls. */ - private final EntitiesRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntitiesRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntitiesRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntitiesRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntitiesRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String entityId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken)); - } - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of relations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java deleted file mode 100644 index 328b7929d8aa..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsImpl.java +++ /dev/null @@ -1,57 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.EntitiesRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class EntitiesRelationsImpl implements EntitiesRelations { - private static final ClientLogger LOGGER = new ClientLogger(EntitiesRelationsImpl.class); - - private final EntitiesRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntitiesRelationsImpl( - EntitiesRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String entityId) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, entityId); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, entityId, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); - } - - private EntitiesRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java deleted file mode 100644 index bebd12d78d76..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityExpandResponseImpl.java +++ /dev/null @@ -1,39 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponse; -import com.azure.resourcemanager.securityinsights.models.EntityExpandResponseValue; -import com.azure.resourcemanager.securityinsights.models.ExpansionResultsMetadata; - -public final class EntityExpandResponseImpl implements EntityExpandResponse { - private EntityExpandResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityExpandResponseImpl( - EntityExpandResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ExpansionResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public EntityExpandResponseValue value() { - return this.innerModel().value(); - } - - public EntityExpandResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java deleted file mode 100644 index ebe0040b31fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityGetInsightsResponseImpl.java +++ /dev/null @@ -1,46 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsResponse; -import com.azure.resourcemanager.securityinsights.models.EntityInsightItem; -import com.azure.resourcemanager.securityinsights.models.GetInsightsResultsMetadata; -import java.util.Collections; -import java.util.List; - -public final class EntityGetInsightsResponseImpl implements EntityGetInsightsResponse { - private EntityGetInsightsResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityGetInsightsResponseImpl( - EntityGetInsightsResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public GetInsightsResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EntityGetInsightsResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java deleted file mode 100644 index 419788334c11..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityImpl.java +++ /dev/null @@ -1,45 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.azure.resourcemanager.securityinsights.models.Entity; - -public final class EntityImpl implements Entity { - private EntityInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityImpl( - EntityInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java deleted file mode 100644 index cff5f927a832..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java +++ /dev/null @@ -1,911 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; -import com.azure.resourcemanager.securityinsights.models.EntityQueryList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityQueriesClient. */ -public final class EntityQueriesClientImpl implements EntityQueriesClient { - /** The proxy service used to perform REST calls. */ - private final EntityQueriesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityQueriesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityQueriesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntityQueriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityQueries to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueriesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("kind") EntityQueriesKind kind, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @BodyParam("application/json") CustomEntityQuery entityQuery, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries/{entityQueryId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryId") String entityQueryId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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 entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity queries. - * - * @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 entity queries as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final EntityQueriesKind kind = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entity queries. - * - * @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 entity queries as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final EntityQueriesKind kind = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); - } - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId) { - 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String entityQueryId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { - return getAsync(resourceGroupName, workspaceName, entityQueryId).block(); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - if (entityQuery == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQuery is required and cannot be null.")); - } else { - entityQuery.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - entityQuery, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - if (entityQuery == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQuery is required and cannot be null.")); - } else { - entityQuery.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - entityQuery, - accept, - context); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery).block(); - } - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) - .block(); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId) { - 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryId, 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 (entityQueryId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityQueryId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryId, - accept, - context); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String entityQueryId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - deleteAsync(resourceGroupName, workspaceName, entityQueryId).block(); - } - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity queries along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java deleted file mode 100644 index 66f6d4fb5322..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java +++ /dev/null @@ -1,117 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.CustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.EntityQueries; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; -import com.azure.resourcemanager.securityinsights.models.EntityQuery; - -public final class EntityQueriesImpl implements EntityQueries { - private static final ClientLogger LOGGER = new ClientLogger(EntityQueriesImpl.class); - - private final EntityQueriesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityQueriesImpl( - EntityQueriesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, kind, context); - return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); - } - - public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { - EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityQueryId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - EntityQueryInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, entityQueryId, entityQuery, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, context); - } - - private EntityQueriesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java deleted file mode 100644 index aed9918b1c34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryImpl.java +++ /dev/null @@ -1,50 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.models.EntityQuery; - -public final class EntityQueryImpl implements EntityQuery { - private EntityQueryInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityQueryImpl( - EntityQueryInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityQueryInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java deleted file mode 100644 index 36db8654b8da..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplateImpl.java +++ /dev/null @@ -1,46 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; - -public final class EntityQueryTemplateImpl implements EntityQueryTemplate { - private EntityQueryTemplateInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityQueryTemplateImpl( - EntityQueryTemplateInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EntityQueryTemplateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java deleted file mode 100644 index e60bfb3413bf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java +++ /dev/null @@ -1,544 +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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ -public final class EntityQueryTemplatesClientImpl implements EntityQueryTemplatesClient { - /** The proxy service used to perform REST calls. */ - private final EntityQueryTemplatesService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityQueryTemplatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityQueryTemplatesClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(EntityQueryTemplatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityQueryTemplates to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueryTemplatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("kind") Constant88 kind, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueryTemplates" - + "/{entityQueryTemplateId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityQueryTemplateId") String entityQueryTemplateId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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 entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - kind, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); - } - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - 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 (entityQueryTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter entityQueryTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryTemplateId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, 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 (entityQueryTemplateId == null) { - return Mono - .error(new IllegalArgumentException("Parameter entityQueryTemplateId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityQueryTemplateId, - accept, - context); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getAsync(resourceGroupName, workspaceName, entityQueryTemplateId).block(); - } - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the entity query templates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java deleted file mode 100644 index 040dcb3be9b1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java +++ /dev/null @@ -1,76 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; -import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; - -public final class EntityQueryTemplatesImpl implements EntityQueryTemplates { - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplatesImpl.class); - - private final EntityQueryTemplatesClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityQueryTemplatesImpl( - EntityQueryTemplatesClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, kind, context); - return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); - } - - public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - EntityQueryTemplateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); - if (inner != null) { - return new EntityQueryTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, entityQueryTemplateId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EntityQueryTemplateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntityQueryTemplatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java deleted file mode 100644 index a30ef2467eab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java +++ /dev/null @@ -1,242 +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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EntityRelationsClient. */ -public final class EntityRelationsClientImpl implements EntityRelationsClient { - /** The proxy service used to perform REST calls. */ - private final EntityRelationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of EntityRelationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EntityRelationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(EntityRelationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsEntityRelations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityRelationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/relations" - + "/{relationName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getRelation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("entityId") String entityId, - @PathParam("relationName") String relationName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRelationWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getRelation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - relationName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRelationWithResponseAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName, 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 (entityId == null) { - return Mono.error(new IllegalArgumentException("Parameter entityId is required and cannot be null.")); - } - if (relationName == null) { - return Mono.error(new IllegalArgumentException("Parameter relationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getRelation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - entityId, - relationName, - accept, - context); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRelationAsync( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner getRelation( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationAsync(resourceGroupName, workspaceName, entityId, relationName).block(); - } - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java deleted file mode 100644 index 6521f11e7b25..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java +++ /dev/null @@ -1,64 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; -import com.azure.resourcemanager.securityinsights.models.EntityRelations; -import com.azure.resourcemanager.securityinsights.models.Relation; - -public final class EntityRelationsImpl implements EntityRelations { - private static final ClientLogger LOGGER = new ClientLogger(EntityRelationsImpl.class); - - private final EntityRelationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public EntityRelationsImpl( - EntityRelationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { - RelationInner inner = - this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - Response inner = - this - .serviceClient() - .getRelationWithResponse(resourceGroupName, workspaceName, entityId, relationName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private EntityRelationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java deleted file mode 100644 index a6c772737410..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityTimelineResponseImpl.java +++ /dev/null @@ -1,46 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineItem; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineResponse; -import com.azure.resourcemanager.securityinsights.models.TimelineResultsMetadata; -import java.util.Collections; -import java.util.List; - -public final class EntityTimelineResponseImpl implements EntityTimelineResponse { - private EntityTimelineResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - EntityTimelineResponseImpl( - EntityTimelineResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public TimelineResultsMetadata metadata() { - return this.innerModel().metadata(); - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EntityTimelineResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java deleted file mode 100644 index 370082d59375..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportImpl.java +++ /dev/null @@ -1,190 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImport; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileImportState; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; -import com.azure.resourcemanager.securityinsights.models.ValidationError; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class FileImportImpl implements FileImport, FileImport.Definition { - private FileImportInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - FileImportImpl( - FileImportInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public IngestionMode ingestionMode() { - return this.innerModel().ingestionMode(); - } - - public FileImportContentType contentType() { - return this.innerModel().contentType(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public FileMetadata errorFile() { - return this.innerModel().errorFile(); - } - - public List errorsPreview() { - List inner = this.innerModel().errorsPreview(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public FileMetadata importFile() { - return this.innerModel().importFile(); - } - - public Integer ingestedRecordCount() { - return this.innerModel().ingestedRecordCount(); - } - - public String source() { - return this.innerModel().source(); - } - - public FileImportState state() { - return this.innerModel().state(); - } - - public Integer totalRecordCount() { - return this.innerModel().totalRecordCount(); - } - - public Integer validRecordCount() { - return this.innerModel().validRecordCount(); - } - - public OffsetDateTime filesValidUntilTimeUtc() { - return this.innerModel().filesValidUntilTimeUtc(); - } - - public OffsetDateTime importValidUntilTimeUtc() { - return this.innerModel().importValidUntilTimeUtc(); - } - - public FileImportInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String fileImportId; - - public FileImportImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public FileImport create() { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .createWithResponse(resourceGroupName, workspaceName, fileImportId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public FileImport create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .createWithResponse(resourceGroupName, workspaceName, fileImportId, this.innerModel(), context) - .getValue(); - return this; - } - - FileImportImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new FileImportInner(); - this.serviceManager = serviceManager; - this.fileImportId = name; - } - - public FileImport refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE) - .getValue(); - return this; - } - - public FileImport refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getFileImports() - .getWithResponse(resourceGroupName, workspaceName, fileImportId, context) - .getValue(); - return this; - } - - public FileImportImpl withIngestionMode(IngestionMode ingestionMode) { - this.innerModel().withIngestionMode(ingestionMode); - return this; - } - - public FileImportImpl withContentType(FileImportContentType contentType) { - this.innerModel().withContentType(contentType); - return this; - } - - public FileImportImpl withImportFile(FileMetadata importFile) { - this.innerModel().withImportFile(importFile); - return this; - } - - public FileImportImpl withSource(String source) { - this.innerModel().withSource(source); - return this; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java deleted file mode 100644 index 4b6a38958664..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java +++ /dev/null @@ -1,1082 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImportList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in FileImportsClient. */ -public final class FileImportsClientImpl implements FileImportsClient { - /** The proxy service used to perform REST calls. */ - private final FileImportsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of FileImportsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FileImportsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(FileImportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsFileImports to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsFile") - private interface FileImportsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @BodyParam("application/json") FileImportInner fileImport, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("fileImportId") String fileImportId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all file imports. - * - * @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 file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all file imports. - * - * @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 file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); - } - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String fileImportId) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { - return getAsync(resourceGroupName, workspaceName, fileImportId).block(); - } - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - if (fileImport == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImport is required and cannot be null.")); - } else { - fileImport.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - fileImport, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - if (fileImport == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImport is required and cannot be null.")); - } else { - fileImport.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - fileImport, - accept, - context); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createAsync(resourceGroupName, workspaceName, fileImportId, fileImport).block(); - } - - /** - * Creates the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param fileImport The file import. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String fileImportId, 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 (fileImportId == null) { - return Mono.error(new IllegalArgumentException("Parameter fileImportId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - fileImportId, - accept, - context); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FileImportInner> beginDeleteAsync( - String resourceGroupName, String workspaceName, String fileImportId) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, fileImportId); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - FileImportInner.class, - FileImportInner.class, - this.client.getContext()); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FileImportInner> beginDeleteAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), FileImportInner.class, FileImportInner.class, context); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FileImportInner> beginDelete( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner delete(String resourceGroupName, String workspaceName, String fileImportId) { - return deleteAsync(resourceGroupName, workspaceName, fileImportId).block(); - } - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner delete( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return deleteAsync(resourceGroupName, workspaceName, fileImportId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the file imports along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java deleted file mode 100644 index 05175bc230d3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java +++ /dev/null @@ -1,206 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.azure.resourcemanager.securityinsights.models.FileImport; -import com.azure.resourcemanager.securityinsights.models.FileImports; - -public final class FileImportsImpl implements FileImports { - private static final ClientLogger LOGGER = new ClientLogger(FileImportsImpl.class); - - private final FileImportsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public FileImportsImpl( - FileImportsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); - return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); - } - - public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, fileImportId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new FileImportImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId, Context context) { - FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId, context); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - - public FileImport getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileImportId, context); - } - - public FileImport deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.delete(resourceGroupName, workspaceName, fileImportId, Context.NONE); - } - - public FileImport deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileImportId = Utils.getValueFromIdByName(id, "fileImports"); - if (fileImportId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileImports'.", id))); - } - return this.delete(resourceGroupName, workspaceName, fileImportId, context); - } - - private FileImportsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public FileImportImpl define(String name) { - return new FileImportImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java deleted file mode 100644 index b1fdfd6e3742..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetQueriesResponseImpl.java +++ /dev/null @@ -1,41 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import com.azure.resourcemanager.securityinsights.models.EntityQueryItem; -import com.azure.resourcemanager.securityinsights.models.GetQueriesResponse; -import java.util.Collections; -import java.util.List; - -public final class GetQueriesResponseImpl implements GetQueriesResponse { - private GetQueriesResponseInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - GetQueriesResponseImpl( - GetQueriesResponseInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public GetQueriesResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java index 5c20f86fb992..7e182d974d68 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 @@ -146,7 +146,7 @@ Mono> listNext( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -160,7 +160,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident comments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all comments for a given incident along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -224,7 +225,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -239,7 +240,8 @@ 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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all comments for a given incident along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -301,7 +303,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -315,7 +317,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 as paginated response with {@link PagedFlux}. + * @return all comments for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -332,7 +334,7 @@ private PagedFlux listAsync( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -340,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 incident comments as paginated response with {@link PagedFlux}. + * @return all comments for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -355,7 +357,7 @@ private PagedFlux listAsync( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -370,7 +372,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 as paginated response with {@link PagedFlux}. + * @return all comments for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -390,7 +392,7 @@ private PagedFlux listAsync( } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -398,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 comments as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -411,7 +413,7 @@ public PagedIterable list(String resourceGroupName, String } /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -426,7 +428,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 as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -443,7 +445,7 @@ public PagedIterable list( } /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -452,7 +454,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response} on successful completion of {@link Mono}. + * @return a comment for a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -502,7 +504,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -512,7 +514,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response} on successful completion of {@link Mono}. + * @return a comment for a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -559,7 +561,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -568,7 +570,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment on successful completion of {@link Mono}. + * @return a comment for a given incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -578,44 +580,45 @@ private Mono getAsync( } /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return a comment for a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - return getAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context).block(); } /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return a comment for a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context).block(); + public IncidentCommentInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE) + .getValue(); } /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -686,7 +689,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -756,7 +759,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -781,58 +784,59 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. + * @return represents an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentCommentInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment) + IncidentCommentInner incidentComment, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, context) .block(); } /** - * Creates or updates the incident comment. + * Creates or updates a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. + * @return represents an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public IncidentCommentInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, context) - .block(); + IncidentCommentInner incidentComment) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, incidentCommentId, incidentComment, Context.NONE) + .getValue(); } /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -891,7 +895,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -948,7 +952,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -967,39 +971,39 @@ private Mono deleteAsync( } /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) + .block(); } /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, incidentCommentId, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java index 8092ca8833a5..61cc928437c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java @@ -50,17 +50,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentCommentImpl(inner1, this.manager())); } - public IncidentComment get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - IncidentCommentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); - if (inner != null) { - return new IncidentCommentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { Response inner = @@ -78,8 +67,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + public IncidentComment get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + IncidentCommentInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); + if (inner != null) { + return new IncidentCommentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -89,6 +85,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); } + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + } + public IncidentComment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java index 317c6b5ed21f..8fc58b9f65b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java @@ -4,14 +4,12 @@ package com.azure.resourcemanager.securityinsights.implementation; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentEntitiesResponseInner; import com.azure.resourcemanager.securityinsights.models.Entity; import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResponse; import com.azure.resourcemanager.securityinsights.models.IncidentEntitiesResultsMetadata; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; public final class IncidentEntitiesResponseImpl implements IncidentEntitiesResponse { private IncidentEntitiesResponseInner innerObject; @@ -26,11 +24,9 @@ public final class IncidentEntitiesResponseImpl implements IncidentEntitiesRespo } public List entities() { - List inner = this.innerModel().entities(); + List inner = this.innerModel().entities(); if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new EntityImpl(inner1, this.manager())).collect(Collectors.toList())); + return Collections.unmodifiableList(inner); } else { return Collections.emptyList(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java index d9c394639227..347e885b8707 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentImpl.java @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.Incident; import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; import com.azure.resourcemanager.securityinsights.models.IncidentAlertList; @@ -20,8 +19,6 @@ import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -96,14 +93,6 @@ public List labels() { } } - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); - } - public OffsetDateTime lastActivityTimeUtc() { return this.innerModel().lastActivityTimeUtc(); } @@ -133,15 +122,6 @@ public IncidentStatus status() { return this.innerModel().status(); } - public TeamInformation teamInformation() { - TeamInformationInner inner = this.innerModel().teamInformation(); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } - } - public String title() { return this.innerModel().title(); } @@ -251,26 +231,12 @@ public Incident refresh(Context context) { return this; } - public TeamInformation createTeam(TeamProperties teamProperties) { - return serviceManager.incidents().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - } - - public Response createTeamWithResponse(TeamProperties teamProperties, Context context) { - return serviceManager - .incidents() - .createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, context); - } - - public IncidentAlertList listAlerts() { - return serviceManager.incidents().listAlerts(resourceGroupName, workspaceName, incidentId); - } - public Response listAlertsWithResponse(Context context) { return serviceManager.incidents().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public IncidentBookmarkList listBookmarks() { - return serviceManager.incidents().listBookmarks(resourceGroupName, workspaceName, incidentId); + public IncidentAlertList listAlerts() { + return serviceManager.incidents().listAlerts(resourceGroupName, workspaceName, incidentId); } public Response listBookmarksWithResponse(Context context) { @@ -279,8 +245,8 @@ public Response listBookmarksWithResponse(Context context) .listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public IncidentEntitiesResponse listEntities() { - return serviceManager.incidents().listEntities(resourceGroupName, workspaceName, incidentId); + public IncidentBookmarkList listBookmarks() { + return serviceManager.incidents().listBookmarks(resourceGroupName, workspaceName, incidentId); } public Response listEntitiesWithResponse(Context context) { @@ -289,6 +255,10 @@ public Response listEntitiesWithResponse(Context conte .listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); } + public IncidentEntitiesResponse listEntities() { + return serviceManager.incidents().listEntities(resourceGroupName, workspaceName, incidentId); + } + public IncidentImpl withEtag(String etag) { this.innerModel().withEtag(etag); return this; @@ -324,16 +294,6 @@ public IncidentImpl withLabels(List labels) { return this; } - public IncidentImpl withProviderName(String providerName) { - this.innerModel().withProviderName(providerName); - return this; - } - - public IncidentImpl withProviderIncidentId(String providerIncidentId) { - this.innerModel().withProviderIncidentId(providerIncidentId); - return this; - } - public IncidentImpl withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { this.innerModel().withLastActivityTimeUtc(lastActivityTimeUtc); return this; @@ -354,11 +314,6 @@ public IncidentImpl withStatus(IncidentStatus status) { return this; } - public IncidentImpl withTeamInformation(TeamInformationInner teamInformation) { - this.innerModel().withTeamInformation(teamInformation); - return this; - } - public IncidentImpl withTitle(String title) { this.innerModel().withTitle(title); return this; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java deleted file mode 100644 index 408f9e893f0f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentPropertiesImpl.java +++ /dev/null @@ -1,136 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.IncidentAdditionalData; -import com.azure.resourcemanager.securityinsights.models.IncidentClassification; -import com.azure.resourcemanager.securityinsights.models.IncidentClassificationReason; -import com.azure.resourcemanager.securityinsights.models.IncidentLabel; -import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; -import com.azure.resourcemanager.securityinsights.models.IncidentProperties; -import com.azure.resourcemanager.securityinsights.models.IncidentSeverity; -import com.azure.resourcemanager.securityinsights.models.IncidentStatus; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class IncidentPropertiesImpl implements IncidentProperties { - private IncidentPropertiesInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - IncidentPropertiesImpl( - IncidentPropertiesInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public IncidentAdditionalData additionalData() { - return this.innerModel().additionalData(); - } - - public IncidentClassification classification() { - return this.innerModel().classification(); - } - - public String classificationComment() { - return this.innerModel().classificationComment(); - } - - public IncidentClassificationReason classificationReason() { - return this.innerModel().classificationReason(); - } - - public OffsetDateTime createdTimeUtc() { - return this.innerModel().createdTimeUtc(); - } - - public String description() { - return this.innerModel().description(); - } - - public OffsetDateTime firstActivityTimeUtc() { - return this.innerModel().firstActivityTimeUtc(); - } - - public String incidentUrl() { - return this.innerModel().incidentUrl(); - } - - public Integer incidentNumber() { - return this.innerModel().incidentNumber(); - } - - public List labels() { - List inner = this.innerModel().labels(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String providerName() { - return this.innerModel().providerName(); - } - - public String providerIncidentId() { - return this.innerModel().providerIncidentId(); - } - - public OffsetDateTime lastActivityTimeUtc() { - return this.innerModel().lastActivityTimeUtc(); - } - - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerModel().lastModifiedTimeUtc(); - } - - public IncidentOwnerInfo owner() { - return this.innerModel().owner(); - } - - public List relatedAnalyticRuleIds() { - List inner = this.innerModel().relatedAnalyticRuleIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public IncidentSeverity severity() { - return this.innerModel().severity(); - } - - public IncidentStatus status() { - return this.innerModel().status(); - } - - public TeamInformation teamInformation() { - TeamInformationInner inner = this.innerModel().teamInformation(); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } - } - - public String title() { - return this.innerModel().title(); - } - - public IncidentPropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java index 2087692a0fbf..78c95e804537 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 @@ -146,7 +146,7 @@ Mono> listNext( } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -160,7 +160,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident relations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all relations for a given incident along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -224,7 +225,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -239,7 +240,8 @@ 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 along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return all relations for a given incident along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -301,7 +303,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -315,7 +317,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 as paginated response with {@link PagedFlux}. + * @return all relations for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -332,7 +334,7 @@ private PagedFlux listAsync( } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -340,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 incident relations as paginated response with {@link PagedFlux}. + * @return all relations for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String incidentId) { @@ -354,7 +356,7 @@ private PagedFlux listAsync(String resourceGroupName, String work } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -369,7 +371,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 as paginated response with {@link PagedFlux}. + * @return all relations for a given incident as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -389,7 +391,7 @@ private PagedFlux listAsync( } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -397,7 +399,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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { @@ -410,7 +412,7 @@ public PagedIterable list(String resourceGroupName, String worksp } /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -425,7 +427,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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -442,7 +444,7 @@ public PagedIterable list( } /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -451,7 +453,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response} on successful completion of {@link Mono}. + * @return a relation for a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -500,7 +502,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -510,7 +512,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response} on successful completion of {@link Mono}. + * @return a relation for a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -556,7 +558,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -565,7 +567,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation on successful completion of {@link Mono}. + * @return a relation for a given incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -575,43 +577,43 @@ private Mono getAsync( } /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. + * @return a relation for a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - return getAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); } /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response}. + * @return a relation for a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); + public RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE).getValue(); } /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -681,7 +683,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -750,7 +752,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -774,57 +776,59 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. * @param relation The relation model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return represents a relation between two resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, relationName, relation).block(); + RelationInner relation, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, incidentId, relationName, relation, context) + .block(); } /** - * Creates or updates the incident relation. + * Creates or updates a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. * @param relation The relation model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public RelationInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, incidentId, relationName, relation, context) - .block(); + RelationInner relation) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, incidentId, relationName, relation, Context.NONE) + .getValue(); } /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -882,7 +886,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -938,7 +942,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -957,38 +961,38 @@ private Mono deleteAsync( } /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, incidentId, relationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); } /** - * Delete the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, relationName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java index ae14e641b851..526606bd3fed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsImpl.java @@ -49,15 +49,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); } - public Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { Response inner = @@ -73,14 +64,8 @@ public Response getWithResponse( } } - public Relation createOrUpdate( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation) { - RelationInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, incidentId, relationName, relation); + public Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName) { + RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId, relationName); if (inner != null) { return new RelationImpl(inner, this.manager()); } else { @@ -88,38 +73,149 @@ public Relation createOrUpdate( } } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, incidentId, relationName, relation, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new RelationImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); } public void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName) { this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, relationName); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context) { + public Relation getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String relationName = Utils.getValueFromIdByName(id, "relations"); + if (relationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); + } return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); + .getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String relationName = Utils.getValueFromIdByName(id, "relations"); + if (relationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String relationName = Utils.getValueFromIdByName(id, "relations"); + if (relationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String relationName = Utils.getValueFromIdByName(id, "relations"); + if (relationName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relations'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context); } private IncidentRelationsClient serviceClient() { @@ -129,4 +225,8 @@ private IncidentRelationsClient serviceClient() { private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { return this.serviceManager; } + + public RelationImpl define(String name) { + return new RelationImpl(name, this.manager()); + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java index a07638efa778..c56fd80716e0 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 @@ -34,10 +34,7 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; 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.IncidentList; -import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ @@ -66,24 +63,6 @@ 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" @@ -152,23 +131,6 @@ Mono> delete( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}/createTeam") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createTeam( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("incidentId") String incidentId, - @BodyParam("application/json") TeamProperties teamProperties, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -228,210 +190,6 @@ 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(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * 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(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * 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. * @@ -696,7 +454,7 @@ public PagedIterable list( } /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -704,7 +462,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response} on successful completion of {@link Mono}. + * @return a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -749,7 +507,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -758,7 +516,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response} on successful completion of {@link Mono}. + * @return a given incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -800,7 +558,7 @@ private Mono> getWithResponseAsync( } /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -808,7 +566,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident on successful completion of {@link Mono}. + * @return a given incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String workspaceName, String incidentId) { @@ -817,41 +575,41 @@ private Mono getAsync(String resourceGroupName, String workspaceN } /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. + * @return a given incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { - return getAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return a given incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -912,7 +670,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -971,7 +729,7 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -990,44 +748,45 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return represents an incident in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incident).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); } /** - * Creates or updates the incident. + * Creates or updates an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. + * @return represents an incident in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); + public IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, incidentId, incident, Context.NONE) + .getValue(); } /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1080,7 +839,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1131,7 +890,7 @@ private Mono> deleteWithResponseAsync( } /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1147,22 +906,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S } /** - * Delete the incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId).block(); - } - - /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1180,190 +924,22 @@ public Response deleteWithResponse( } /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createTeamWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (teamProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter teamProperties is required and cannot be null.")); - } else { - teamProperties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createTeam( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - teamProperties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createTeamWithResponseAsync( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (incidentId == null) { - return Mono.error(new IllegalArgumentException("Parameter incidentId is required and cannot be null.")); - } - if (teamProperties == null) { - return Mono.error(new IllegalArgumentException("Parameter teamProperties is required and cannot be null.")); - } else { - teamProperties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createTeam( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - incidentId, - teamProperties, - accept, - context); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createTeamAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamAsync(resourceGroupName, workspaceName, incidentId, teamProperties).block(); - } - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param teamProperties Team properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE); } /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1371,7 +947,7 @@ public Response createTeamWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response} on successful completion of {@link Mono}. + * @return all alerts for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAlertsWithResponseAsync( @@ -1416,7 +992,7 @@ private Mono> listAlertsWithResponseAsync( } /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1425,7 +1001,7 @@ private Mono> listAlertsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response} on successful completion of {@link Mono}. + * @return all alerts for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAlertsWithResponseAsync( @@ -1467,7 +1043,7 @@ private Mono> listAlertsWithResponseAsync( } /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1475,7 +1051,7 @@ private Mono> listAlertsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts on successful completion of {@link Mono}. + * @return all alerts for an incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAlertsAsync( @@ -1485,41 +1061,41 @@ private Mono listAlertsAsync( } /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all alerts for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - return listAlertsAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all alerts for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { + return listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1527,7 +1103,7 @@ public Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response} on successful completion of {@link Mono}. + * @return all bookmarks for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBookmarksWithResponseAsync( @@ -1572,7 +1148,7 @@ private Mono> listBookmarksWithResponseAsync } /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1581,7 +1157,7 @@ private Mono> listBookmarksWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response} on successful completion of {@link Mono}. + * @return all bookmarks for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBookmarksWithResponseAsync( @@ -1623,7 +1199,7 @@ private Mono> listBookmarksWithResponseAsync } /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1631,7 +1207,7 @@ private Mono> listBookmarksWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks on successful completion of {@link Mono}. + * @return all bookmarks for an incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listBookmarksAsync( @@ -1641,41 +1217,41 @@ private Mono listBookmarksAsync( } /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all bookmarks for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - return listBookmarksAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listBookmarksWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all bookmarks for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { + return listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1683,7 +1259,7 @@ public Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response} on successful completion of {@link Mono}. + * @return all entities for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEntitiesWithResponseAsync( @@ -1728,7 +1304,7 @@ private Mono> listEntitiesWithResponseAs } /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1737,7 +1313,7 @@ private Mono> listEntitiesWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response} on successful completion of {@link Mono}. + * @return all entities for an incident along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listEntitiesWithResponseAsync( @@ -1779,7 +1355,7 @@ private Mono> listEntitiesWithResponseAs } /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -1787,7 +1363,7 @@ private Mono> listEntitiesWithResponseAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities on successful completion of {@link Mono}. + * @return all entities for an incident on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listEntitiesAsync( @@ -1797,38 +1373,38 @@ private Mono listEntitiesAsync( } /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all entities for an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentEntitiesResponseInner listEntities( - String resourceGroupName, String workspaceName, String incidentId) { - return listEntitiesAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listEntitiesWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. + * @return all entities for an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentEntitiesResponseInner listEntities( + String resourceGroupName, String workspaceName, String incidentId) { + return listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java index a49e1a802a76..e220f57b97c2 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 @@ -14,15 +14,11 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentBookmarkListInner; 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.Incident; import com.azure.resourcemanager.securityinsights.models.IncidentAlertList; 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; public final class IncidentsImpl implements Incidents { private static final ClientLogger LOGGER = new ClientLogger(IncidentsImpl.class); @@ -38,21 +34,6 @@ public IncidentsImpl( this.serviceManager = serviceManager; } - public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { - return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); - } - - public Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - 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())); @@ -71,15 +52,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); } - public Incident get(String resourceGroupName, String workspaceName, String incidentId) { - IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context) { Response inner = @@ -95,8 +67,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); + public Incident get(String resourceGroupName, String workspaceName, String incidentId) { + IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); + if (inner != null) { + return new IncidentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,33 +81,20 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - TeamInformationInner inner = - this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); } - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - Response inner = - this - .serviceClient() - .createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, context); + public Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + Response inner = + this.serviceClient().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new TeamInformationImpl(inner.getValue(), this.manager())); + new IncidentAlertListImpl(inner.getValue(), this.manager())); } else { return null; } @@ -145,16 +109,16 @@ public IncidentAlertList listAlerts(String resourceGroupName, String workspaceNa } } - public Response listAlertsWithResponse( + public Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, context); + Response inner = + this.serviceClient().listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new IncidentAlertListImpl(inner.getValue(), this.manager())); + new IncidentBookmarkListImpl(inner.getValue(), this.manager())); } else { return null; } @@ -170,16 +134,16 @@ public IncidentBookmarkList listBookmarks(String resourceGroupName, String works } } - public Response listBookmarksWithResponse( + public Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, context); + Response inner = + this.serviceClient().listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new IncidentBookmarkListImpl(inner.getValue(), this.manager())); + new IncidentEntitiesResponseImpl(inner.getValue(), this.manager())); } else { return null; } @@ -195,21 +159,6 @@ public IncidentEntitiesResponse listEntities(String resourceGroupName, String wo } } - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - Response inner = - this.serviceClient().listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new IncidentEntitiesResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - public Incident getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java deleted file mode 100644 index cfcbc8e039f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java +++ /dev/null @@ -1,209 +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.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in IpGeodatasClient. */ -public final class IpGeodatasClientImpl implements IpGeodatasClient { - /** The proxy service used to perform REST calls. */ - private final IpGeodatasService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of IpGeodatasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - IpGeodatasClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(IpGeodatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsIpGeodatas to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsIpGe") - private interface IpGeodatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" - + "/enrichment/ip/geodata/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("ipAddress") String ipAddress, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String ipAddress) { - 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 (ipAddress == null) { - return Mono.error(new IllegalArgumentException("Parameter ipAddress is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ipAddress, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String ipAddress, 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 (ipAddress == null) { - return Mono.error(new IllegalArgumentException("Parameter ipAddress is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - ipAddress, - accept, - context); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String ipAddress) { - return getWithResponseAsync(resourceGroupName, ipAddress).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { - return getAsync(resourceGroupName, ipAddress).block(); - } - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ipAddress, Context context) { - return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java deleted file mode 100644 index 7afbd00545ef..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java +++ /dev/null @@ -1,60 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; -import com.azure.resourcemanager.securityinsights.models.EnrichmentIpGeodata; -import com.azure.resourcemanager.securityinsights.models.IpGeodatas; - -public final class IpGeodatasImpl implements IpGeodatas { - private static final ClientLogger LOGGER = new ClientLogger(IpGeodatasImpl.class); - - private final IpGeodatasClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public IpGeodatasImpl( - IpGeodatasClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { - EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); - if (inner != null) { - return new EnrichmentIpGeodataImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String ipAddress, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, ipAddress, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnrichmentIpGeodataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private IpGeodatasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java deleted file mode 100644 index 268664bb18db..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java +++ /dev/null @@ -1,458 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import java.time.LocalDate; -import java.util.Collections; -import java.util.List; - -public final class MetadataModelImpl implements MetadataModel, MetadataModel.Definition, MetadataModel.Update { - private MetadataModelInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String contentId() { - return this.innerModel().contentId(); - } - - public String parentId() { - return this.innerModel().parentId(); - } - - public String version() { - return this.innerModel().version(); - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public MetadataSource source() { - return this.innerModel().source(); - } - - public MetadataAuthor author() { - return this.innerModel().author(); - } - - public MetadataSupport support() { - return this.innerModel().support(); - } - - public MetadataDependencies dependencies() { - return this.innerModel().dependencies(); - } - - public MetadataCategories categories() { - return this.innerModel().categories(); - } - - public List providers() { - List inner = this.innerModel().providers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public LocalDate firstPublishDate() { - return this.innerModel().firstPublishDate(); - } - - public LocalDate lastPublishDate() { - return this.innerModel().lastPublishDate(); - } - - public String customVersion() { - return this.innerModel().customVersion(); - } - - public String contentSchemaVersion() { - return this.innerModel().contentSchemaVersion(); - } - - public String icon() { - return this.innerModel().icon(); - } - - public List threatAnalysisTactics() { - List inner = this.innerModel().threatAnalysisTactics(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List threatAnalysisTechniques() { - List inner = this.innerModel().threatAnalysisTechniques(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List previewImages() { - List inner = this.innerModel().previewImages(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List previewImagesDark() { - List inner = this.innerModel().previewImagesDark(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public MetadataModelInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String metadataName; - - private MetadataPatch updateMetadataPatch; - - public MetadataModelImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public MetadataModel create() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .createWithResponse(resourceGroupName, workspaceName, metadataName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public MetadataModel create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .createWithResponse(resourceGroupName, workspaceName, metadataName, this.innerModel(), context) - .getValue(); - return this; - } - - MetadataModelImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new MetadataModelInner(); - this.serviceManager = serviceManager; - this.metadataName = name; - } - - public MetadataModelImpl update() { - this.updateMetadataPatch = new MetadataPatch(); - return this; - } - - public MetadataModel apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .updateWithResponse(resourceGroupName, workspaceName, metadataName, updateMetadataPatch, Context.NONE) - .getValue(); - return this; - } - - public MetadataModel apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .updateWithResponse(resourceGroupName, workspaceName, metadataName, updateMetadataPatch, context) - .getValue(); - return this; - } - - MetadataModelImpl( - MetadataModelInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.metadataName = Utils.getValueFromIdByName(innerObject.id(), "metadata"); - } - - public MetadataModel refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE) - .getValue(); - return this; - } - - public MetadataModel refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMetadatas() - .getWithResponse(resourceGroupName, workspaceName, metadataName, context) - .getValue(); - return this; - } - - public MetadataModelImpl withEtag(String etag) { - if (isInCreateMode()) { - this.innerModel().withEtag(etag); - return this; - } else { - this.updateMetadataPatch.withEtag(etag); - return this; - } - } - - public MetadataModelImpl withContentId(String contentId) { - if (isInCreateMode()) { - this.innerModel().withContentId(contentId); - return this; - } else { - this.updateMetadataPatch.withContentId(contentId); - return this; - } - } - - public MetadataModelImpl withParentId(String parentId) { - if (isInCreateMode()) { - this.innerModel().withParentId(parentId); - return this; - } else { - this.updateMetadataPatch.withParentId(parentId); - return this; - } - } - - public MetadataModelImpl withVersion(String version) { - if (isInCreateMode()) { - this.innerModel().withVersion(version); - return this; - } else { - this.updateMetadataPatch.withVersion(version); - return this; - } - } - - public MetadataModelImpl withKind(Kind kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateMetadataPatch.withKind(kind); - return this; - } - } - - public MetadataModelImpl withSource(MetadataSource source) { - if (isInCreateMode()) { - this.innerModel().withSource(source); - return this; - } else { - this.updateMetadataPatch.withSource(source); - return this; - } - } - - public MetadataModelImpl withAuthor(MetadataAuthor author) { - if (isInCreateMode()) { - this.innerModel().withAuthor(author); - return this; - } else { - this.updateMetadataPatch.withAuthor(author); - return this; - } - } - - public MetadataModelImpl withSupport(MetadataSupport support) { - if (isInCreateMode()) { - this.innerModel().withSupport(support); - return this; - } else { - this.updateMetadataPatch.withSupport(support); - return this; - } - } - - public MetadataModelImpl withDependencies(MetadataDependencies dependencies) { - if (isInCreateMode()) { - this.innerModel().withDependencies(dependencies); - return this; - } else { - this.updateMetadataPatch.withDependencies(dependencies); - return this; - } - } - - public MetadataModelImpl withCategories(MetadataCategories categories) { - if (isInCreateMode()) { - this.innerModel().withCategories(categories); - return this; - } else { - this.updateMetadataPatch.withCategories(categories); - return this; - } - } - - public MetadataModelImpl withProviders(List providers) { - if (isInCreateMode()) { - this.innerModel().withProviders(providers); - return this; - } else { - this.updateMetadataPatch.withProviders(providers); - return this; - } - } - - public MetadataModelImpl withFirstPublishDate(LocalDate firstPublishDate) { - if (isInCreateMode()) { - this.innerModel().withFirstPublishDate(firstPublishDate); - return this; - } else { - this.updateMetadataPatch.withFirstPublishDate(firstPublishDate); - return this; - } - } - - public MetadataModelImpl withLastPublishDate(LocalDate lastPublishDate) { - if (isInCreateMode()) { - this.innerModel().withLastPublishDate(lastPublishDate); - return this; - } else { - this.updateMetadataPatch.withLastPublishDate(lastPublishDate); - return this; - } - } - - 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 deleted file mode 100644 index c99b2cc76eaf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java +++ /dev/null @@ -1,1161 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataList; -import com.azure.resourcemanager.securityinsights.models.MetadataPatch; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in MetadatasClient. */ -public final class MetadatasClientImpl implements MetadatasClient { - /** The proxy service used to perform REST calls. */ - private final MetadatasService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of MetadatasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MetadatasClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(MetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsMetadatas to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsMeta") - private interface MetadatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @QueryParam("$top") Integer top, - @QueryParam("$skip") Integer skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @BodyParam("application/json") MetadataModelInner metadata, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("metadataName") String metadataName, - @BodyParam("application/json") MetadataPatch metadataPatch, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, Integer skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - filter, - orderby, - top, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, Integer skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List of all metadata. - * - * @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 list of all the metadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final Integer skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List of all metadata. - * - * @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 list of all the metadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String filter = null; - final String orderby = null; - final Integer top = null; - final Integer skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skip)); - } - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skip, context)); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName) { - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String metadataName) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { - return getAsync(resourceGroupName, workspaceName, metadataName).block(); - } - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName) { - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - accept, - context); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String metadataName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - deleteAsync(resourceGroupName, workspaceName, metadataName).block(); - } - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadata == null) { - return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); - } else { - metadata.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadata, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadata == null) { - return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); - } else { - metadata.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadata, - accept, - context); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createAsync(resourceGroupName, workspaceName, metadataName, metadata).block(); - } - - /** - * Create a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadata Metadata resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadataPatch == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataPatch is required and cannot be null.")); - } else { - metadataPatch.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadataPatch, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - 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 (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - if (metadataPatch == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataPatch is required and cannot be null.")); - } else { - metadataPatch.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - metadataName, - metadataPatch, - accept, - context); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateAsync(resourceGroupName, workspaceName, metadataName, metadataPatch).block(); - } - - /** - * Update an existing Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java deleted file mode 100644 index fb795703dad2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java +++ /dev/null @@ -1,197 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; -import com.azure.resourcemanager.securityinsights.models.Metadatas; - -public final class MetadatasImpl implements Metadatas { - private static final ClientLogger LOGGER = new ClientLogger(MetadatasImpl.class); - - private final MetadatasClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public MetadatasImpl( - MetadatasClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skip, context); - return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); - } - - public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { - MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); - if (inner != null) { - return new MetadataModelImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, metadataName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new MetadataModelImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - public MetadataModel getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String metadataName = Utils.getValueFromIdByName(id, "metadata"); - if (metadataName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'metadata'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); - } - - private MetadatasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public MetadataModelImpl define(String name) { - return new MetadataModelImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java deleted file mode 100644 index 3ea1193ca8e6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java +++ /dev/null @@ -1,54 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsent; - -public final class OfficeConsentImpl implements OfficeConsent { - private OfficeConsentInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - OfficeConsentImpl( - OfficeConsentInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public String consentId() { - return this.innerModel().consentId(); - } - - public OfficeConsentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java deleted file mode 100644 index fd9d8a21ca81..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java +++ /dev/null @@ -1,677 +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.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsentList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OfficeConsentsClient. */ -public final class OfficeConsentsClientImpl implements OfficeConsentsClient { - /** The proxy service used to perform REST calls. */ - private final OfficeConsentsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of OfficeConsentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OfficeConsentsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(OfficeConsentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsOfficeConsents to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsOffi") - private interface OfficeConsentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("consentId") String consentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/officeConsents/{consentId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("consentId") String consentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all office365 consents. - * - * @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 office365 consents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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 office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all office365 consents. - * - * @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 office365 consents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all office365 consents. - * - * @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 office365 consents 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 office365 consents. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all office365 consents 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)); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId) { - 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 (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId, 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 (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String consentId) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { - return getAsync(resourceGroupName, workspaceName, consentId).block(); - } - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId) { - 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 (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String consentId, 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 (consentId == null) { - return Mono.error(new IllegalArgumentException("Parameter consentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - consentId, - accept, - context); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String consentId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String consentId) { - deleteAsync(resourceGroupName, workspaceName, consentId).block(); - } - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the office365 consents along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java deleted file mode 100644 index 3f6213360a58..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java +++ /dev/null @@ -1,81 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.azure.resourcemanager.securityinsights.models.OfficeConsent; -import com.azure.resourcemanager.securityinsights.models.OfficeConsents; - -public final class OfficeConsentsImpl implements OfficeConsents { - private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentsImpl.class); - - private final OfficeConsentsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public OfficeConsentsImpl( - OfficeConsentsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new OfficeConsentImpl(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 OfficeConsentImpl(inner1, this.manager())); - } - - public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { - OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); - if (inner != null) { - return new OfficeConsentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, consentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OfficeConsentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String consentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, consentId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, consentId, context); - } - - private OfficeConsentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java deleted file mode 100644 index 5a8f6c3d0f22..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java +++ /dev/null @@ -1,744 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ProductSettingsClient. */ -public final class ProductSettingsClientImpl implements ProductSettingsClient { - /** The proxy service used to perform REST calls. */ - private final ProductSettingsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of ProductSettingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ProductSettingsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(ProductSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsProductSettings to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsProd") - private interface ProductSettingsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/settings/{settingsName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("settingsName") String settingsName, - @BodyParam("application/json") SettingsInner settings, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); - } - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName) { - 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String settingsName) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { - return getAsync(resourceGroupName, workspaceName, settingsName).block(); - } - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName) { - 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - accept, - context); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String settingsName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - deleteAsync(resourceGroupName, workspaceName, settingsName).block(); - } - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - if (settings == null) { - return Mono.error(new IllegalArgumentException("Parameter settings is required and cannot be null.")); - } else { - settings.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - settings, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, 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 (settingsName == null) { - return Mono.error(new IllegalArgumentException("Parameter settingsName is required and cannot be null.")); - } - if (settings == null) { - return Mono.error(new IllegalArgumentException("Parameter settings is required and cannot be null.")); - } else { - settings.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - settingsName, - settings, - accept, - context); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateAsync(resourceGroupName, workspaceName, settingsName, settings).block(); - } - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java deleted file mode 100644 index 5596bd0f4aa9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java +++ /dev/null @@ -1,120 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.ProductSettings; -import com.azure.resourcemanager.securityinsights.models.SettingList; -import com.azure.resourcemanager.securityinsights.models.Settings; - -public final class ProductSettingsImpl implements ProductSettings { - private static final ClientLogger LOGGER = new ClientLogger(ProductSettingsImpl.class); - - private final ProductSettingsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public ProductSettingsImpl( - ProductSettingsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public SettingList list(String resourceGroupName, String workspaceName) { - SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SettingListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Settings get(String resourceGroupName, String workspaceName, String settingsName) { - SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, settingsName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsName, context); - } - - public Settings update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - Response inner = - this.serviceClient().updateWithResponse(resourceGroupName, workspaceName, settingsName, settings, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ProductSettingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java index 16262d97eb12..3a3a7a0aab0b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RelationImpl.java @@ -66,14 +66,14 @@ private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manag private String workspaceName; - private String bookmarkId; + private String incidentId; private String relationName; - public RelationImpl withExistingBookmark(String resourceGroupName, String workspaceName, String bookmarkId) { + public RelationImpl withExistingIncident(String resourceGroupName, String workspaceName, String incidentId) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; - this.bookmarkId = bookmarkId; + this.incidentId = incidentId; return this; } @@ -81,9 +81,9 @@ public Relation create() { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() + .getIncidentRelations() .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), Context.NONE) + resourceGroupName, workspaceName, incidentId, relationName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -92,9 +92,9 @@ public Relation create(Context context) { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() + .getIncidentRelations() .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), context) + resourceGroupName, workspaceName, incidentId, relationName, this.innerModel(), context) .getValue(); return this; } @@ -113,9 +113,9 @@ public Relation apply() { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() + .getIncidentRelations() .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), Context.NONE) + resourceGroupName, workspaceName, incidentId, relationName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -124,9 +124,9 @@ public Relation apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() + .getIncidentRelations() .createOrUpdateWithResponse( - resourceGroupName, workspaceName, bookmarkId, relationName, this.innerModel(), context) + resourceGroupName, workspaceName, incidentId, relationName, this.innerModel(), context) .getValue(); return this; } @@ -137,7 +137,7 @@ public Relation apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.bookmarkId = Utils.getValueFromIdByName(innerObject.id(), "bookmarks"); + this.incidentId = Utils.getValueFromIdByName(innerObject.id(), "incidents"); this.relationName = Utils.getValueFromIdByName(innerObject.id(), "relations"); } @@ -145,8 +145,8 @@ public Relation refresh() { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE) + .getIncidentRelations() + .getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, Context.NONE) .getValue(); return this; } @@ -155,8 +155,8 @@ public Relation refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getBookmarkRelations() - .getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context) + .getIncidentRelations() + .getWithResponse(resourceGroupName, workspaceName, incidentId, relationName, context) .getValue(); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java deleted file mode 100644 index fc0358a24f1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RepoImpl.java +++ /dev/null @@ -1,46 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.Repo; -import java.util.Collections; -import java.util.List; - -public final class RepoImpl implements Repo { - private RepoInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - RepoImpl(RepoInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String url() { - return this.innerModel().url(); - } - - public String fullName() { - return this.innerModel().fullName(); - } - - public List branches() { - List inner = this.innerModel().branches(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RepoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java index 86963e3bc62a..a7b8abd0e51e 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 @@ -26,32 +26,15 @@ import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.BookmarkRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.BookmarksClient; -import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsCheckRequirementsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.DataConnectorsClient; -import com.azure.resourcemanager.securityinsights.fluent.DomainWhoisClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesGetTimelinesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntitiesRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueriesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; -import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; -import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; -import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; -import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; -import com.azure.resourcemanager.securityinsights.fluent.OfficeConsentsClient; import com.azure.resourcemanager.securityinsights.fluent.OperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.ProductSettingsClient; import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; import com.azure.resourcemanager.securityinsights.fluent.SecurityMLAnalyticsSettingsClient; import com.azure.resourcemanager.securityinsights.fluent.SentinelOnboardingStatesClient; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; @@ -189,18 +172,6 @@ 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; @@ -213,136 +184,28 @@ public BookmarksClient getBookmarks() { return this.bookmarks; } - /** The BookmarkRelationsClient object to access its operations. */ - private final BookmarkRelationsClient bookmarkRelations; - - /** - * Gets the BookmarkRelationsClient object to access its operations. - * - * @return the BookmarkRelationsClient object. - */ - public BookmarkRelationsClient getBookmarkRelations() { - return this.bookmarkRelations; - } - - /** The BookmarkOperationsClient object to access its operations. */ - private final BookmarkOperationsClient bookmarkOperations; - - /** - * Gets the BookmarkOperationsClient object to access its operations. - * - * @return the BookmarkOperationsClient object. - */ - public BookmarkOperationsClient getBookmarkOperations() { - return this.bookmarkOperations; - } - - /** The IpGeodatasClient object to access its operations. */ - private final IpGeodatasClient ipGeodatas; - - /** - * Gets the IpGeodatasClient object to access its operations. - * - * @return the IpGeodatasClient object. - */ - public IpGeodatasClient getIpGeodatas() { - return this.ipGeodatas; - } - - /** The DomainWhoisClient object to access its operations. */ - private final DomainWhoisClient domainWhois; - - /** - * Gets the DomainWhoisClient object to access its operations. - * - * @return the DomainWhoisClient object. - */ - public DomainWhoisClient getDomainWhois() { - return this.domainWhois; - } - - /** The EntitiesClient object to access its operations. */ - private final EntitiesClient entities; - - /** - * Gets the EntitiesClient object to access its operations. - * - * @return the EntitiesClient object. - */ - public EntitiesClient getEntities() { - return this.entities; - } - - /** The EntitiesGetTimelinesClient object to access its operations. */ - private final EntitiesGetTimelinesClient entitiesGetTimelines; - - /** - * Gets the EntitiesGetTimelinesClient object to access its operations. - * - * @return the EntitiesGetTimelinesClient object. - */ - public EntitiesGetTimelinesClient getEntitiesGetTimelines() { - return this.entitiesGetTimelines; - } - - /** The EntitiesRelationsClient object to access its operations. */ - private final EntitiesRelationsClient entitiesRelations; - - /** - * Gets the EntitiesRelationsClient object to access its operations. - * - * @return the EntitiesRelationsClient object. - */ - public EntitiesRelationsClient getEntitiesRelations() { - return this.entitiesRelations; - } - - /** The EntityRelationsClient object to access its operations. */ - private final EntityRelationsClient entityRelations; - - /** - * Gets the EntityRelationsClient object to access its operations. - * - * @return the EntityRelationsClient object. - */ - public EntityRelationsClient getEntityRelations() { - return this.entityRelations; - } - - /** 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 EntityQueryTemplatesClient object to access its operations. */ - private final EntityQueryTemplatesClient entityQueryTemplates; + /** The DataConnectorsClient object to access its operations. */ + private final DataConnectorsClient dataConnectors; /** - * Gets the EntityQueryTemplatesClient object to access its operations. + * Gets the DataConnectorsClient object to access its operations. * - * @return the EntityQueryTemplatesClient object. + * @return the DataConnectorsClient object. */ - public EntityQueryTemplatesClient getEntityQueryTemplates() { - return this.entityQueryTemplates; + public DataConnectorsClient getDataConnectors() { + return this.dataConnectors; } - /** The FileImportsClient object to access its operations. */ - private final FileImportsClient fileImports; + /** The IncidentsClient object to access its operations. */ + private final IncidentsClient incidents; /** - * Gets the FileImportsClient object to access its operations. + * Gets the IncidentsClient object to access its operations. * - * @return the FileImportsClient object. + * @return the IncidentsClient object. */ - public FileImportsClient getFileImports() { - return this.fileImports; + public IncidentsClient getIncidents() { + return this.incidents; } /** The IncidentCommentsClient object to access its operations. */ @@ -369,30 +232,6 @@ public IncidentRelationsClient getIncidentRelations() { return this.incidentRelations; } - /** The MetadatasClient object to access its operations. */ - private final MetadatasClient metadatas; - - /** - * Gets the MetadatasClient object to access its operations. - * - * @return the MetadatasClient object. - */ - 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; @@ -417,42 +256,6 @@ public SecurityMLAnalyticsSettingsClient getSecurityMLAnalyticsSettings() { return this.securityMLAnalyticsSettings; } - /** The ProductSettingsClient object to access its operations. */ - private final ProductSettingsClient productSettings; - - /** - * Gets the ProductSettingsClient object to access its operations. - * - * @return the ProductSettingsClient object. - */ - public ProductSettingsClient getProductSettings() { - return this.productSettings; - } - - /** The SourceControlsClient object to access its operations. */ - private final SourceControlsClient sourceControls; - - /** - * Gets the SourceControlsClient object to access its operations. - * - * @return the SourceControlsClient object. - */ - public SourceControlsClient getSourceControls() { - return this.sourceControls; - } - - /** The SourceControlsOperationsClient object to access its operations. */ - private final SourceControlsOperationsClient sourceControlsOperations; - - /** - * Gets the SourceControlsOperationsClient object to access its operations. - * - * @return the SourceControlsOperationsClient object. - */ - public SourceControlsOperationsClient getSourceControlsOperations() { - return this.sourceControlsOperations; - } - /** The ThreatIntelligenceIndicatorsClient object to access its operations. */ private final ThreatIntelligenceIndicatorsClient threatIntelligenceIndicators; @@ -513,30 +316,6 @@ public WatchlistItemsClient getWatchlistItems() { return this.watchlistItems; } - /** The DataConnectorsClient object to access its operations. */ - private final DataConnectorsClient dataConnectors; - - /** - * Gets the DataConnectorsClient object to access its operations. - * - * @return the DataConnectorsClient object. - */ - public DataConnectorsClient getDataConnectors() { - return this.dataConnectors; - } - - /** The DataConnectorsCheckRequirementsOperationsClient object to access its operations. */ - private final DataConnectorsCheckRequirementsOperationsClient dataConnectorsCheckRequirementsOperations; - - /** - * Gets the DataConnectorsCheckRequirementsOperationsClient object to access its operations. - * - * @return the DataConnectorsCheckRequirementsOperationsClient object. - */ - public DataConnectorsCheckRequirementsOperationsClient getDataConnectorsCheckRequirementsOperations() { - return this.dataConnectorsCheckRequirementsOperations; - } - /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -571,40 +350,23 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; + this.apiVersion = "2022-11-01"; 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.entities = new EntitiesClientImpl(this); - this.entitiesGetTimelines = new EntitiesGetTimelinesClientImpl(this); - this.entitiesRelations = new EntitiesRelationsClientImpl(this); - this.entityRelations = new EntityRelationsClientImpl(this); - this.entityQueries = new EntityQueriesClientImpl(this); - this.entityQueryTemplates = new EntityQueryTemplatesClientImpl(this); - this.fileImports = new FileImportsClientImpl(this); + this.dataConnectors = new DataConnectorsClientImpl(this); + this.incidents = new IncidentsClientImpl(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.securityMLAnalyticsSettings = new SecurityMLAnalyticsSettingsClientImpl(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.operations = new OperationsClientImpl(this); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java index 2cd597054440..6f0ca70d610d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java @@ -450,15 +450,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner get( - String resourceGroupName, String workspaceName, String settingsResourceName) { - return getAsync(resourceGroupName, workspaceName, settingsResourceName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); } /** @@ -467,16 +468,15 @@ public SecurityMLAnalyticsSettingInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); + public SecurityMLAnalyticsSettingInner get( + String resourceGroupName, String workspaceName, String settingsResourceName) { + return getWithResponse(resourceGroupName, workspaceName, settingsResourceName, Context.NONE).getValue(); } /** @@ -642,18 +642,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SecurityMLAnalyticsSettingInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { - return createOrUpdateAsync(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting) + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context) .block(); } @@ -664,22 +667,20 @@ public SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, context) - .block(); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting, Context.NONE) + .getValue(); } /** @@ -811,13 +812,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - deleteAsync(resourceGroupName, workspaceName, settingsResourceName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); } /** @@ -826,16 +830,13 @@ public void delete(String resourceGroupName, String workspaceName, String settin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsResourceName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { + deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java index f0d4218f31a3..3404cd1a75eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java @@ -41,16 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SecurityMLAnalyticsSettingImpl(inner1, this.manager())); } - public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { - SecurityMLAnalyticsSettingInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); - if (inner != null) { - return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { Response inner = @@ -66,15 +56,9 @@ public Response getWithResponse( } } - public SecurityMLAnalyticsSetting createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { SecurityMLAnalyticsSettingInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); if (inner != null) { return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); } else { @@ -104,8 +88,20 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + public SecurityMLAnalyticsSetting createOrUpdate( + String resourceGroupName, + String workspaceName, + String settingsResourceName, + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + SecurityMLAnalyticsSettingInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + if (inner != null) { + return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -113,6 +109,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, context); } + public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { + this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + } + private SecurityMLAnalyticsSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java index 9035d0d85eef..63d68d7dc677 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java @@ -258,15 +258,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - return getAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); } /** @@ -275,16 +276,15 @@ public SentinelOnboardingStateInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); + public SentinelOnboardingStateInner get( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + return getWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE).getValue(); } /** @@ -420,7 +420,6 @@ private Mono> createWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -428,10 +427,8 @@ private Mono> createWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter) { + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; return createWithResponseAsync( resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -443,18 +440,27 @@ private Mono createAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state on successful completion of {@link Mono}. + * @return sentinel onboarding state along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String sentinelOnboardingStateName, + SentinelOnboardingStateInner sentinelOnboardingStateParameter, + Context context) { return createWithResponseAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + resourceGroupName, + workspaceName, + sentinelOnboardingStateName, + sentinelOnboardingStateParameter, + context) + .block(); } /** @@ -472,38 +478,13 @@ private Mono createAsync( public SentinelOnboardingStateInner create( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { final SentinelOnboardingStateInner sentinelOnboardingStateParameter = null; - return createAsync( - resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter) - .block(); - } - - /** - * Create Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param sentinelOnboardingStateParameter The Sentinel onboarding state parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sentinelOnboardingStateName, - SentinelOnboardingStateInner sentinelOnboardingStateParameter, - Context context) { - return createWithResponseAsync( + return createWithResponse( resourceGroupName, workspaceName, sentinelOnboardingStateName, sentinelOnboardingStateParameter, - context) - .block(); + Context.NONE) + .getValue(); } /** @@ -639,13 +620,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - deleteAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); } /** @@ -654,16 +638,13 @@ public void delete(String resourceGroupName, String workspaceName, String sentin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sentinelOnboardingStateName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, Context.NONE); } /** @@ -780,14 +761,16 @@ private Mono listAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -795,15 +778,13 @@ public SentinelOnboardingStatesListInner list(String resourceGroupName, String w * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java index 805ce3714bf1..807a52a88f80 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java @@ -29,17 +29,6 @@ public SentinelOnboardingStatesImpl( this.serviceManager = serviceManager; } - public SentinelOnboardingState get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - SentinelOnboardingStateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); - if (inner != null) { - return new SentinelOnboardingStateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { Response inner = @@ -57,8 +46,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); + public SentinelOnboardingState get( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + SentinelOnboardingStateInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); + if (inner != null) { + return new SentinelOnboardingStateImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -68,13 +64,8 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); } - public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { - SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SentinelOnboardingStatesListImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); } public Response listWithResponse( @@ -92,6 +83,15 @@ public Response listWithResponse( } } + public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { + SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new SentinelOnboardingStatesListImpl(inner, this.manager()); + } else { + return null; + } + } + public SentinelOnboardingState getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java deleted file mode 100644 index d42aef74defe..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java +++ /dev/null @@ -1,48 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.SettingList; -import com.azure.resourcemanager.securityinsights.models.Settings; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class SettingListImpl implements SettingList { - private SettingListInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SettingListImpl( - SettingListInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new SettingsImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public SettingListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java deleted file mode 100644 index e54bfa38cc02..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingsImpl.java +++ /dev/null @@ -1,49 +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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.models.Settings; - -public final class SettingsImpl implements Settings { - private SettingsInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SettingsImpl( - SettingsInner innerObject, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public SettingsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java deleted file mode 100644 index 8923bdc0d8b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlImpl.java +++ /dev/null @@ -1,208 +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.implementation; - -import com.azure.core.management.SystemData; -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; - -public final class SourceControlImpl implements SourceControl, SourceControl.Definition { - private SourceControlInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - SourceControlImpl( - SourceControlInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String idPropertiesId() { - return this.innerModel().idPropertiesId(); - } - - public Version version() { - return this.innerModel().version(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public RepoType repoType() { - return this.innerModel().repoType(); - } - - public List contentTypes() { - List inner = this.innerModel().contentTypes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - 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; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String sourceControlId; - - public SourceControlImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public SourceControl create() { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .createWithResponse(resourceGroupName, workspaceName, sourceControlId, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public SourceControl create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .createWithResponse(resourceGroupName, workspaceName, sourceControlId, this.innerModel(), context) - .getValue(); - return this; - } - - SourceControlImpl(String name, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = new SourceControlInner(); - this.serviceManager = serviceManager; - this.sourceControlId = name; - } - - public SourceControl refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE) - .getValue(); - return this; - } - - public SourceControl refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSourceControlsOperations() - .getWithResponse(resourceGroupName, workspaceName, sourceControlId, context) - .getValue(); - return this; - } - - public SourceControlImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public SourceControlImpl withIdPropertiesId(String idPropertiesId) { - this.innerModel().withIdPropertiesId(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; - } - - public SourceControlImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public SourceControlImpl withRepoType(RepoType repoType) { - this.innerModel().withRepoType(repoType); - return this; - } - - public SourceControlImpl withContentTypes(List contentTypes) { - this.innerModel().withContentTypes(contentTypes); - return this; - } - - 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 deleted file mode 100644 index 7d0d20b95466..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java +++ /dev/null @@ -1,359 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.RepoList; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SourceControlsClient. */ -public final class SourceControlsClientImpl implements SourceControlsClient { - /** The proxy service used to perform REST calls. */ - private final SourceControlsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SourceControlsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SourceControlsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy.create(SourceControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSourceControls to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/listRepositories") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRepositories( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") RepoType repoType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRepositoriesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesSinglePageAsync( - String resourceGroupName, String workspaceName, RepoType repoType) { - 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 (repoType == null) { - return Mono.error(new IllegalArgumentException("Parameter repoType is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listRepositories( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - repoType, - 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 a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesSinglePageAsync( - String resourceGroupName, String workspaceName, RepoType repoType, 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 (repoType == null) { - return Mono.error(new IllegalArgumentException("Parameter repoType is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRepositories( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - repoType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRepositoriesAsync( - String resourceGroupName, String workspaceName, RepoType repoType) { - return new PagedFlux<>( - () -> listRepositoriesSinglePageAsync(resourceGroupName, workspaceName, repoType), - nextLink -> listRepositoriesNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRepositoriesAsync( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - return new PagedFlux<>( - () -> listRepositoriesSinglePageAsync(resourceGroupName, workspaceName, repoType, context), - nextLink -> listRepositoriesNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType) { - return new PagedIterable<>(listRepositoriesAsync(resourceGroupName, workspaceName, repoType)); - } - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - return new PagedIterable<>(listRepositoriesAsync(resourceGroupName, workspaceName, repoType, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRepositoriesNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listRepositoriesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java deleted file mode 100644 index bb8376e2af85..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsImpl.java +++ /dev/null @@ -1,50 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.azure.resourcemanager.securityinsights.models.Repo; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.SourceControls; - -public final class SourceControlsImpl implements SourceControls { - private static final ClientLogger LOGGER = new ClientLogger(SourceControlsImpl.class); - - private final SourceControlsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SourceControlsImpl( - SourceControlsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType) { - PagedIterable inner = - this.serviceClient().listRepositories(resourceGroupName, workspaceName, repoType); - return Utils.mapPage(inner, inner1 -> new RepoImpl(inner1, this.manager())); - } - - public PagedIterable listRepositories( - String resourceGroupName, String workspaceName, RepoType repoType, Context context) { - PagedIterable inner = - this.serviceClient().listRepositories(resourceGroupName, workspaceName, repoType, context); - return Utils.mapPage(inner, inner1 -> new RepoImpl(inner1, this.manager())); - } - - private SourceControlsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java deleted file mode 100644 index 154c48e0138a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java +++ /dev/null @@ -1,889 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.azure.resourcemanager.securityinsights.models.SourceControlList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SourceControlsOperationsClient. */ -public final class SourceControlsOperationsClientImpl implements SourceControlsOperationsClient { - /** The proxy service used to perform REST calls. */ - private final SourceControlsOperationsService service; - - /** The service client containing this operation class. */ - private final SecurityInsightsImpl client; - - /** - * Initializes an instance of SourceControlsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SourceControlsOperationsClientImpl(SecurityInsightsImpl client) { - this.service = - RestProxy - .create(SourceControlsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for SecurityInsightsSourceControlsOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" - + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/sourcecontrols/{sourceControlId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("sourceControlId") String sourceControlId, - @BodyParam("application/json") SourceControlInner sourceControl, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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 source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all source controls, without source control items along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets all source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all 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) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items 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 source controls, without source control items. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all 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) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId) { - 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String sourceControlId) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { - return getAsync(resourceGroupName, workspaceName, sourceControlId).block(); - } - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId) { - 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - accept, - context); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String sourceControlId) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - deleteAsync(resourceGroupName, workspaceName, sourceControlId).block(); - } - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - if (sourceControl == null) { - return Mono.error(new IllegalArgumentException("Parameter sourceControl is required and cannot be null.")); - } else { - sourceControl.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - sourceControl, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - 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 (sourceControlId == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlId is required and cannot be null.")); - } - if (sourceControl == null) { - return Mono.error(new IllegalArgumentException("Parameter sourceControl is required and cannot be null.")); - } else { - sourceControl.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - sourceControlId, - sourceControl, - accept, - context); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl).block(); - } - - /** - * Creates a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list all the source controls along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java deleted file mode 100644 index 467e637cf289..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java +++ /dev/null @@ -1,193 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.securityinsights.fluent.SourceControlsOperationsClient; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.azure.resourcemanager.securityinsights.models.SourceControl; -import com.azure.resourcemanager.securityinsights.models.SourceControlsOperations; - -public final class SourceControlsOperationsImpl implements SourceControlsOperations { - private static final ClientLogger LOGGER = new ClientLogger(SourceControlsOperationsImpl.class); - - private final SourceControlsOperationsClient innerClient; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - public SourceControlsOperationsImpl( - SourceControlsOperationsClient innerClient, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(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 SourceControlImpl(inner1, this.manager())); - } - - public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SourceControlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - public SourceControl getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String sourceControlId = Utils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); - } - - private SourceControlsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } - - public SourceControlImpl define(String name) { - return new SourceControlImpl(name, this.manager()); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java deleted file mode 100644 index 4193894c5c11..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TeamInformationImpl.java +++ /dev/null @@ -1,50 +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.implementation; - -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import java.time.OffsetDateTime; - -public final class TeamInformationImpl implements TeamInformation { - private TeamInformationInner innerObject; - - private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; - - TeamInformationImpl( - TeamInformationInner innerObject, - com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String teamId() { - return this.innerModel().teamId(); - } - - public String primaryChannelUrl() { - return this.innerModel().primaryChannelUrl(); - } - - public OffsetDateTime teamCreationTimeUtc() { - return this.innerModel().teamCreationTimeUtc(); - } - - public String name() { - return this.innerModel().name(); - } - - public String description() { - return this.innerModel().description(); - } - - public TeamInformationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java index 246f25d1030c..cd51f6e57346 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java @@ -190,14 +190,17 @@ private Mono listAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -205,16 +208,13 @@ public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java index a89b3041bc58..b47abd6de5d0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java @@ -27,15 +27,6 @@ public ThreatIntelligenceIndicatorMetricsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { - ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response listWithResponse( } } + public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { + ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorMetricsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java index c25005bfa019..bbc1c14ec1ac 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 @@ -341,15 +341,20 @@ private Mono createIndicatorAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createIndicatorAsync(resourceGroupName, workspaceName, threatIntelligenceProperties).block(); + public Response createIndicatorWithResponse( + String resourceGroupName, + String workspaceName, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, + Context context) { + return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) + .block(); } /** @@ -358,20 +363,16 @@ public ThreatIntelligenceInformationInner createIndicator( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createIndicatorWithResponse( - String resourceGroupName, - String workspaceName, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createIndicatorWithResponseAsync(resourceGroupName, workspaceName, threatIntelligenceProperties, context) - .block(); + public ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + return createIndicatorWithResponse(resourceGroupName, workspaceName, threatIntelligenceProperties, Context.NONE) + .getValue(); } /** @@ -504,14 +505,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -520,16 +523,14 @@ public ThreatIntelligenceInformationInner get(String resourceGroupName, String w * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** @@ -694,18 +695,21 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner create( + public Response createWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - return createAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties).block(); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) + .block(); } /** @@ -715,21 +719,19 @@ public ThreatIntelligenceInformationInner create( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( + public ThreatIntelligenceInformationInner create( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, name, threatIntelligenceProperties, context) - .block(); + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + return createWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceProperties, Context.NONE) + .getValue(); } /** @@ -857,13 +859,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** @@ -872,16 +877,13 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + public void delete(String resourceGroupName, String workspaceName, String name) { + deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } /** @@ -1271,17 +1273,22 @@ private Mono appendTagsAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void appendTags( + public Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - appendTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags).block(); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context) { + return appendTagsWithResponseAsync( + resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context) + .block(); } /** @@ -1291,22 +1298,17 @@ public void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response appendTagsWithResponse( + public void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context) { - return appendTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context) - .block(); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { + appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, Context.NONE); } /** @@ -1471,18 +1473,22 @@ private Mono replaceTagsAsync( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ThreatIntelligenceInformationInner replaceTags( + public Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - return replaceTagsAsync(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags).block(); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context) { + return replaceTagsWithResponseAsync( + resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) + .block(); } /** @@ -1492,22 +1498,20 @@ public ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response replaceTagsWithResponse( + public ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context) { - return replaceTagsWithResponseAsync( - resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, context) - .block(); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { + return replaceTagsWithResponse( + resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java index ad629fc04fc9..e1dbd4b46918 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java @@ -31,17 +31,6 @@ public ThreatIntelligenceIndicatorsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, @@ -62,8 +51,10 @@ public Response createIndicatorWithResponse( } } - public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { - ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -86,13 +77,8 @@ public Response getWithResponse( } } - public ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { + ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -121,8 +107,18 @@ public Response createWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -130,6 +126,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + public PagedIterable queryIndicators( String resourceGroupName, String workspaceName, @@ -151,14 +151,6 @@ public PagedIterable queryIndicators( return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); } - public void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); - } - public Response appendTagsWithResponse( String resourceGroupName, String workspaceName, @@ -170,18 +162,12 @@ public Response appendTagsWithResponse( .appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context); } - public ThreatIntelligenceInformation replaceTags( + public void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } + ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { + this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); } public Response replaceTagsWithResponse( @@ -206,6 +192,20 @@ public Response replaceTagsWithResponse( } } + public ThreatIntelligenceInformation replaceTags( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java index ac5099ba79a9..3ab795ef15ba 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 @@ -77,9 +77,9 @@ Mono> list( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, @QueryParam("$top") Integer top, @QueryParam("$skipToken") String skipToken, + @QueryParam("$orderby") String orderby, @HeaderParam("Accept") String accept, Context context); @@ -100,11 +100,11 @@ Mono> listNext( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -113,7 +113,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + String resourceGroupName, String workspaceName, String filter, Integer top, String skipToken, String orderby) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -145,9 +145,9 @@ private Mono> listSinglePageAs resourceGroupName, workspaceName, filter, - orderby, top, skipToken, + orderby, accept, context)) .>map( @@ -168,11 +168,11 @@ private Mono> listSinglePageAs * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -185,9 +185,9 @@ private Mono> listSinglePageAs String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -218,9 +218,9 @@ private Mono> listSinglePageAs resourceGroupName, workspaceName, filter, - orderby, top, skipToken, + orderby, accept, context) .map( @@ -240,11 +240,11 @@ private Mono> listSinglePageAs * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -252,9 +252,9 @@ private Mono> listSinglePageAs */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String filter, String orderby, Integer top, String skipToken) { + String resourceGroupName, String workspaceName, String filter, Integer top, String skipToken, String orderby) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -271,11 +271,11 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String filter = null; - final String orderby = null; final Integer top = null; final String skipToken = null; + final String orderby = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken), + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby), nextLink -> listNextSinglePageAsync(nextLink)); } @@ -285,11 +285,11 @@ private PagedFlux listAsync(String resourceG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -301,12 +301,12 @@ private PagedFlux listAsync( String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } @@ -323,10 +323,10 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { final String filter = null; - final String orderby = null; final Integer top = null; final String skipToken = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken)); + final String orderby = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby)); } /** @@ -335,11 +335,11 @@ public PagedIterable list(String resourceGro * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -351,12 +351,12 @@ public PagedIterable list( String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context) { return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context)); + listAsync(resourceGroupName, workspaceName, filter, top, skipToken, orderby, context)); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java index df68b9a281d2..85146cfb466c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsImpl.java @@ -36,12 +36,12 @@ public PagedIterable list( String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, filter, orderby, top, skipToken, context); + this.serviceClient().list(resourceGroupName, workspaceName, filter, top, skipToken, orderby, context); return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); } 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 ba1748990562..de254ef21b71 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.SourceType; +import com.azure.resourcemanager.securityinsights.models.Source; import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.azure.resourcemanager.securityinsights.models.Watchlist; import java.time.Duration; @@ -52,14 +52,10 @@ public String provider() { return this.innerModel().provider(); } - public String source() { + public Source source() { return this.innerModel().source(); } - public SourceType sourceType() { - return this.innerModel().sourceType(); - } - public OffsetDateTime created() { return this.innerModel().created(); } @@ -256,16 +252,11 @@ public WatchlistImpl withProvider(String provider) { return this; } - public WatchlistImpl withSource(String source) { + public WatchlistImpl withSource(Source 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; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java index 4b5b6d0486c8..3f0b8d50c6d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemImpl.java @@ -10,8 +10,6 @@ import com.azure.resourcemanager.securityinsights.models.UserInfo; import com.azure.resourcemanager.securityinsights.models.WatchlistItem; import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; public final class WatchlistItemImpl implements WatchlistItem, WatchlistItem.Definition, WatchlistItem.Update { private WatchlistItemInner innerObject; @@ -70,22 +68,12 @@ public UserInfo updatedBy() { return this.innerModel().updatedBy(); } - public Map itemsKeyValue() { - Map inner = this.innerModel().itemsKeyValue(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } + public Object itemsKeyValue() { + return this.innerModel().itemsKeyValue(); } - public Map entityMapping() { - Map inner = this.innerModel().entityMapping(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } + public Object entityMapping() { + return this.innerModel().entityMapping(); } public String resourceGroupName() { @@ -246,12 +234,12 @@ public WatchlistItemImpl withUpdatedBy(UserInfo updatedBy) { return this; } - public WatchlistItemImpl withItemsKeyValue(Map itemsKeyValue) { + public WatchlistItemImpl withItemsKeyValue(Object itemsKeyValue) { this.innerModel().withItemsKeyValue(itemsKeyValue); return this; } - public WatchlistItemImpl withEntityMapping(Map entityMapping) { + public WatchlistItemImpl withEntityMapping(Object entityMapping) { this.innerModel().withEntityMapping(entityMapping); 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 0257b61bfb20..52a51c85e2f8 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 @@ -72,8 +72,8 @@ Mono> list( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("$skipToken") String skipToken, @PathParam("watchlistAlias") String watchlistAlias, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @@ -144,11 +144,11 @@ Mono> listNext( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -193,8 +193,8 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - skipToken, watchlistAlias, + skipToken, accept, context)) .>map( @@ -210,11 +210,11 @@ private Mono> listSinglePageAsync( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -258,8 +258,8 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, workspaceName, - skipToken, watchlistAlias, + skipToken, accept, context) .map( @@ -274,11 +274,11 @@ private Mono> listSinglePageAsync( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -296,11 +296,11 @@ private PagedFlux listAsync( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -316,11 +316,11 @@ private PagedFlux listAsync( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -339,11 +339,11 @@ private PagedFlux listAsync( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -357,11 +357,11 @@ public PagedIterable list( } /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -378,17 +378,16 @@ public PagedIterable list( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. + * @return a watchlist item along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -438,18 +437,17 @@ private Mono> getWithResponseAsync( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response} on successful completion of {@link - * Mono}. + * @return a watchlist item along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -500,16 +498,16 @@ private Mono> getWithResponseAsync( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items on successful completion of {@link Mono}. + * @return a watchlist item on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -519,44 +517,45 @@ private Mono getAsync( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist item along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist item. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); + public WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE) + .getValue(); } /** @@ -564,8 +563,8 @@ public Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -623,8 +622,8 @@ private Mono> deleteWithResponseAsync( * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -684,8 +683,8 @@ private Mono> deleteWithResponseAsync( * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -703,15 +702,23 @@ private Mono deleteAsync( * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response deleteWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) + .block(); } /** @@ -719,37 +726,29 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE); } /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response} on successful + * @return represents a Watchlist Item in Azure Security Insights along with {@link Response} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -810,18 +809,18 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response} on successful + * @return represents a Watchlist Item in Azure Security Insights along with {@link Response} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -880,17 +879,17 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights on successful completion of {@link Mono}. + * @return represents a Watchlist Item in Azure Security Insights on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -905,54 +904,55 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist Item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem) + WatchlistItemInner watchlistItem, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) .block(); } /** - * Creates or updates a watchlist item. + * Create or update a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist Item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) - .block(); + WatchlistItemInner watchlistItem) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java index fc1cb65f0917..68ce31846010 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java @@ -41,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } - public WatchlistItem get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - WatchlistItemInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - if (inner != null) { - return new WatchlistItemImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, @@ -73,8 +62,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + public WatchlistItem get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + WatchlistItemInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + if (inner != null) { + return new WatchlistItemImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -88,6 +84,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + } + public WatchlistItem getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java index 56e2704b1252..c9ffb3f18f09 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 @@ -31,8 +31,6 @@ 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. */ @@ -99,7 +97,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 +113,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, @@ -138,7 +136,7 @@ Mono> listNext( } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -200,7 +198,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -260,7 +258,7 @@ private Mono> listSinglePageAsync( } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -280,7 +278,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -298,7 +296,7 @@ private PagedFlux listAsync(String resourceGroupName, String wor } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -320,7 +318,7 @@ private PagedFlux listAsync( } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -336,7 +334,7 @@ public PagedIterable list(String resourceGroupName, String works } /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -356,11 +354,11 @@ public PagedIterable list( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -410,11 +408,11 @@ private Mono> getWithResponseAsync( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -462,11 +460,11 @@ private Mono> getWithResponseAsync( } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -479,37 +477,37 @@ private Mono getAsync(String resourceGroupName, String workspace } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE).getValue(); } /** @@ -517,14 +515,14 @@ public Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( + private Mono> deleteWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias) { if (this.client.getEndpoint() == null) { return Mono @@ -570,15 +568,15 @@ private Mono deleteWithResponseAsync( * * @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 watchlistAlias The watchlist alias. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @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 @@ -621,7 +619,7 @@ private Mono deleteWithResponseAsync( * * @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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -638,14 +636,17 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. + * @param watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** @@ -653,37 +654,32 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } /** * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return represents a Watchlist in Azure Security Insights along with {@link Response} 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 @@ -732,23 +728,21 @@ private Mono createOrUpdateWithResponseAsync( /** * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights on successful completion of {@link Mono}. + * @return represents a Watchlist in Azure Security Insights along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String watchlistAlias, @@ -798,14 +792,11 @@ private Mono createOrUpdateWithResponseAsync( /** * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -821,52 +812,47 @@ private Mono createOrUpdateAsync( /** * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist in Azure Security Insights. + * @return represents a Watchlist in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) + .block(); } /** * 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. + * create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties. * * @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 watchlistAlias The watchlist alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) - .block(); + public WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlist, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java index 139a0477f33f..32f2893a5726 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,7 +13,6 @@ 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; public final class WatchlistsImpl implements Watchlists { private static final ClientLogger LOGGER = new ClientLogger(WatchlistsImpl.class); @@ -41,15 +40,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } - public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { - WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); - if (inner != null) { - return new WatchlistImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { Response inner = @@ -65,15 +55,24 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { + WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); + if (inner != null) { + return new WatchlistImpl(inner, this.manager()); + } else { + return null; + } } - public WatchlistsDeleteResponse deleteWithResponse( + public Response deleteWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + } + public Watchlist getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -152,7 +151,7 @@ public void deleteById(String id) { this.deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } - public WatchlistsDeleteResponse 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/models/AadCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java deleted file mode 100644 index bf95fed22e28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.AadCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AAD (Azure Active Directory) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureActiveDirectory") -@Fluent -public final class AadCheckRequirements extends DataConnectorsCheckRequirements { - /* - * AAD (Azure Active Directory) requirements check properties. - */ - @JsonProperty(value = "properties") - private AadCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: AAD (Azure Active Directory) requirements check properties. - * - * @return the innerProperties value. - */ - private AadCheckRequirementsProperties 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/AadDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java index 2c2d4b0f24aa..99ced6ed3cab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java @@ -22,6 +22,10 @@ public final class AadDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AadDataConnectorProperties innerProperties; + /** Creates an instance of AadDataConnector class. */ + public AadDataConnector() { + } + /** * Get the innerProperties property: AAD (Azure Active Directory) data connector properties. * @@ -39,48 +43,48 @@ public AadDataConnector withEtag(String etag) { } /** - * Get the dataTypes property: The available data types for the connector. + * Get the tenantId property: The tenant id to connect to, and get the data from. * - * @return the dataTypes value. + * @return the tenantId value. */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** - * Set the dataTypes property: The available data types for the connector. + * Set the tenantId property: The tenant id to connect to, and get the data from. * - * @param dataTypes the dataTypes value to set. + * @param tenantId the tenantId value to set. * @return the AadDataConnector object itself. */ - public AadDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + public AadDataConnector withTenantId(String tenantId) { if (this.innerProperties() == null) { this.innerProperties = new AadDataConnectorProperties(); } - this.innerProperties().withDataTypes(dataTypes); + this.innerProperties().withTenantId(tenantId); return this; } /** - * Get the tenantId property: The tenant id to connect to, and get the data from. + * Get the dataTypes property: The available data types for the connector. * - * @return the tenantId value. + * @return the dataTypes value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public AlertsDataTypeOfDataConnector dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); } /** - * Set the tenantId property: The tenant id to connect to, and get the data from. + * Set the dataTypes property: The available data types for the connector. * - * @param tenantId the tenantId value to set. + * @param dataTypes the dataTypes value to set. * @return the AadDataConnector object itself. */ - public AadDataConnector withTenantId(String tenantId) { + public AadDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { if (this.innerProperties() == null) { this.innerProperties = new AadDataConnectorProperties(); } - this.innerProperties().withTenantId(tenantId); + this.innerProperties().withDataTypes(dataTypes); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java deleted file mode 100644 index 45cdb56dc88a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.AatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents AATP (Azure Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureAdvancedThreatProtection") -@Fluent -public final class AatpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * AATP (Azure Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private AatpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: AATP (Azure Advanced Threat Protection) requirements check properties. - * - * @return the innerProperties value. - */ - private AatpCheckRequirementsProperties 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/AatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java index 25261e2030c4..c0750bbf489b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java @@ -22,6 +22,10 @@ public final class AatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AatpDataConnectorProperties innerProperties; + /** Creates an instance of AatpDataConnector class. */ + public AatpDataConnector() { + } + /** * Get the innerProperties property: AATP (Azure Advanced Threat Protection) data connector properties. * @@ -39,48 +43,48 @@ public AatpDataConnector withEtag(String etag) { } /** - * Get the dataTypes property: The available data types for the connector. + * Get the tenantId property: The tenant id to connect to, and get the data from. * - * @return the dataTypes value. + * @return the tenantId value. */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** - * Set the dataTypes property: The available data types for the connector. + * Set the tenantId property: The tenant id to connect to, and get the data from. * - * @param dataTypes the dataTypes value to set. + * @param tenantId the tenantId value to set. * @return the AatpDataConnector object itself. */ - public AatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + public AatpDataConnector withTenantId(String tenantId) { if (this.innerProperties() == null) { this.innerProperties = new AatpDataConnectorProperties(); } - this.innerProperties().withDataTypes(dataTypes); + this.innerProperties().withTenantId(tenantId); return this; } /** - * Get the tenantId property: The tenant id to connect to, and get the data from. + * Get the dataTypes property: The available data types for the connector. * - * @return the tenantId value. + * @return the dataTypes value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public AlertsDataTypeOfDataConnector dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); } /** - * Set the tenantId property: The tenant id to connect to, and get the data from. + * Set the dataTypes property: The available data types for the connector. * - * @param tenantId the tenantId value to set. + * @param dataTypes the dataTypes value to set. * @return the AatpDataConnector object itself. */ - public AatpDataConnector withTenantId(String tenantId) { + public AatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { if (this.innerProperties() == null) { this.innerProperties = new AatpDataConnectorProperties(); } - this.innerProperties().withTenantId(tenantId); + this.innerProperties().withDataTypes(dataTypes); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java index d662cdb888ec..20e2ae896d10 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java @@ -5,28 +5,42 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.models.AccountEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; import java.util.UUID; +import java.util.regex.Pattern; -/** Represents an account entity. */ +/** + * Represents an account entity. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Account") -@Fluent -public final class AccountEntity extends EntityInner { +@Immutable +public final class AccountEntity extends Entity { /* * Account entity properties */ @JsonProperty(value = "properties") private AccountEntityProperties innerProperties; + /** + * Creates an instance of AccountEntity class. + */ + public AccountEntity() { + } + /** * Get the innerProperties property: Account entity properties. - * + * * @return the innerProperties value. */ private AccountEntityProperties innerProperties() { @@ -35,7 +49,7 @@ private AccountEntityProperties innerProperties() { /** * Get the aadTenantId property: The Azure Active Directory tenant id. - * + * * @return the aadTenantId value. */ public String aadTenantId() { @@ -44,7 +58,7 @@ public String aadTenantId() { /** * Get the aadUserId property: The Azure Active Directory user id. - * + * * @return the aadUserId value. */ public String aadUserId() { @@ -54,7 +68,7 @@ public String aadUserId() { /** * Get the accountName property: The name of the account. This field should hold only the name without any domain * added to it, i.e. administrator. - * + * * @return the accountName value. */ public String accountName() { @@ -63,7 +77,7 @@ public String accountName() { /** * Get the displayName property: The display name of the account. - * + * * @return the displayName value. */ public String displayName() { @@ -73,7 +87,7 @@ public String displayName() { /** * Get the hostEntityId property: The Host entity id that contains the account in case it is a local account (not * domain joined). - * + * * @return the hostEntityId value. */ public String hostEntityId() { @@ -82,7 +96,7 @@ public String hostEntityId() { /** * Get the isDomainJoined property: Determines whether this is a domain account. - * + * * @return the isDomainJoined value. */ public Boolean isDomainJoined() { @@ -90,9 +104,9 @@ public Boolean isDomainJoined() { } /** - * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format domain/username. Examples: - * NT AUTHORITY. - * + * Get the ntDomain property: The NetBIOS domain name as it appears in the alert format - domain\username. + * Examples: NT AUTHORITY. + * * @return the ntDomain value. */ public String ntDomain() { @@ -102,7 +116,7 @@ public String ntDomain() { /** * Get the objectGuid property: The objectGUID attribute is a single-value attribute that is the unique identifier * for the object, assigned by active directory. - * + * * @return the objectGuid value. */ public UUID objectGuid() { @@ -111,7 +125,7 @@ public UUID objectGuid() { /** * Get the puid property: The Azure Active Directory Passport User ID. - * + * * @return the puid value. */ public String puid() { @@ -120,7 +134,7 @@ public String puid() { /** * Get the sid property: The account security identifier, e.g. S-1-5-18. - * + * * @return the sid value. */ public String sid() { @@ -130,7 +144,7 @@ public String sid() { /** * Get the upnSuffix property: The user principal name suffix for the account, in some cases it is also the domain * name. Examples: contoso.com. - * + * * @return the upnSuffix value. */ public String upnSuffix() { @@ -139,7 +153,7 @@ public String upnSuffix() { /** * Get the dnsDomain property: The fully qualified domain DNS name. - * + * * @return the dnsDomain value. */ public String dnsDomain() { @@ -149,7 +163,7 @@ public String dnsDomain() { /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. - * + * * @return the additionalData value. */ public Map additionalData() { @@ -159,7 +173,7 @@ public Map additionalData() { /** * Get the friendlyName property: The graph item display name which is a short humanly readable description of the * graph item instance. This property is optional and might be system generated. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -168,7 +182,7 @@ public String friendlyName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java index 385e767940bd..17fc2338ded8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java @@ -18,6 +18,10 @@ public class ActionPropertiesBase { @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; + /** Creates an instance of ActionPropertiesBase class. */ + public ActionPropertiesBase() { + } + /** * Get the logicAppResourceId property: Logic App Resource Id, * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java index ccc8692cff41..036949c4ad3c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java @@ -17,6 +17,10 @@ public final class ActionRequest extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionRequestProperties innerProperties; + /** Creates an instance of ActionRequest class. */ + public ActionRequest() { + } + /** * Get the innerProperties property: Action properties for put request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java index 3540eefe0690..945eb10973af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java @@ -32,7 +32,7 @@ public interface ActionResponse { String type(); /** - * Gets the etag property: Etag of the azure resource. + * Gets the etag property: Etag of the action. * * @return the etag value. */ 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 97de0d03303b..45591fc7f1ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java @@ -45,12 +45,14 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ - ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Gets the action of alert rule. @@ -59,14 +61,12 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Delete the action of alert rule. @@ -75,11 +75,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Delete the action of alert rule. @@ -88,14 +91,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Gets the action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java index 4f7ecdd353b9..f9dd5b49803f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java @@ -25,6 +25,10 @@ public final class ActionsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ActionsList class. */ + public ActionsList() { + } + /** * Get the nextLink property: URL to fetch the next set of actions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java deleted file mode 100644 index e010a8c88c2a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java +++ /dev/null @@ -1,283 +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.resourcemanager.securityinsights.fluent.models.ActivityEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityCustomEntityQuery extends CustomEntityQuery { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActivityCustomEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withQueryDefinitions( - ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.innerProperties() == null ? null : this.innerProperties().templateName(); - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withTemplateName(String templateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTemplateName(templateName); - return this; - } - - /** - * Get the enabled property: Determines whether this activity 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 activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityCustomEntityQuery object itself. - */ - public ActivityCustomEntityQuery withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity 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 activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * 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/ActivityEntityQueriesPropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java deleted file mode 100644 index 610d4eff8d46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java +++ /dev/null @@ -1,46 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The Activity query definitions. */ -@Fluent -public final class ActivityEntityQueriesPropertiesQueryDefinitions { - /* - * The Activity query to run on a given entity - */ - @JsonProperty(value = "query") - private String query; - - /** - * Get the query property: The Activity query to run on a given entity. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The Activity query to run on a given entity. - * - * @param query the query value to set. - * @return the ActivityEntityQueriesPropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions withQuery(String query) { - this.query = query; - 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/ActivityEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java deleted file mode 100644 index 7aadce92dcd4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java +++ /dev/null @@ -1,283 +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.resourcemanager.securityinsights.fluent.models.ActivityEntityQueriesProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityEntityQuery extends EntityQueryInner { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ActivityEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withQueryDefinitions(ActivityEntityQueriesPropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Get the templateName property: The template id this activity was created from. - * - * @return the templateName value. - */ - public String templateName() { - return this.innerProperties() == null ? null : this.innerProperties().templateName(); - } - - /** - * Set the templateName property: The template id this activity was created from. - * - * @param templateName the templateName value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withTemplateName(String templateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withTemplateName(templateName); - return this; - } - - /** - * Get the enabled property: Determines whether this activity 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 activity is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the ActivityEntityQuery object itself. - */ - public ActivityEntityQuery withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueriesProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the createdTimeUtc property: The time the activity 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 activity was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - - /** - * 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/ActivityEntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java deleted file mode 100644 index 9066b404574c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java +++ /dev/null @@ -1,235 +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.resourcemanager.securityinsights.fluent.models.ActivityEntityQueryTemplateProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -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; - -/** Represents Activity entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityEntityQueryTemplate extends EntityQueryTemplateInner { - /* - * Activity entity query properties - */ - @JsonProperty(value = "properties") - private ActivityEntityQueryTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Activity entity query properties. - * - * @return the innerProperties value. - */ - private ActivityEntityQueryTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the title property: The entity query title. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The entity query title. - * - * @param title the title value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the content property: The entity query content to display in timeline. - * - * @return the content value. - */ - public String content() { - return this.innerProperties() == null ? null : this.innerProperties().content(); - } - - /** - * Set the content property: The entity query content to display in timeline. - * - * @param content the content value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withContent(String content) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withContent(content); - return this; - } - - /** - * Get the description property: The entity query description. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The entity query description. - * - * @param description the description value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the queryDefinitions property: The Activity query definitions. - * - * @return the queryDefinitions value. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions() { - return this.innerProperties() == null ? null : this.innerProperties().queryDefinitions(); - } - - /** - * Set the queryDefinitions property: The Activity query definitions. - * - * @param queryDefinitions the queryDefinitions value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withQueryDefinitions( - ActivityEntityQueryTemplatePropertiesQueryDefinitions queryDefinitions) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withQueryDefinitions(queryDefinitions); - return this; - } - - /** - * Get the dataTypes property: List of required data types for the given entity query template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: List of required data types for the given entity query template. - * - * @param dataTypes the dataTypes value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withDataTypes(List dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withDataTypes(dataTypes); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.innerProperties() == null ? null : this.innerProperties().requiredInputFieldsSets(); - } - - /** - * Set the requiredInputFieldsSets property: List of the fields of the source entity that are required to run the - * query. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Map> entitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().entitiesFilter(); - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the ActivityEntityQueryTemplate object itself. - */ - public ActivityEntityQueryTemplate withEntitiesFilter(Map> entitiesFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new ActivityEntityQueryTemplateProperties(); - } - this.innerProperties().withEntitiesFilter(entitiesFilter); - 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/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java deleted file mode 100644 index 9a85f95ebfa3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java +++ /dev/null @@ -1,74 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The Activity query definitions. */ -@Fluent -public final class ActivityEntityQueryTemplatePropertiesQueryDefinitions { - /* - * The Activity query to run on a given entity - */ - @JsonProperty(value = "query") - private String query; - - /* - * The dimensions we want to summarize the timeline results on, this is comma separated list - */ - @JsonProperty(value = "summarizeBy") - private String summarizeBy; - - /** - * Get the query property: The Activity query to run on a given entity. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The Activity query to run on a given entity. - * - * @param query the query value to set. - * @return the ActivityEntityQueryTemplatePropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the summarizeBy property: The dimensions we want to summarize the timeline results on, this is comma - * separated list. - * - * @return the summarizeBy value. - */ - public String summarizeBy() { - return this.summarizeBy; - } - - /** - * Set the summarizeBy property: The dimensions we want to summarize the timeline results on, this is comma - * separated list. - * - * @param summarizeBy the summarizeBy value to set. - * @return the ActivityEntityQueryTemplatePropertiesQueryDefinitions object itself. - */ - public ActivityEntityQueryTemplatePropertiesQueryDefinitions withSummarizeBy(String summarizeBy) { - this.summarizeBy = summarizeBy; - 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/ActivityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java deleted file mode 100644 index 1e6b52c71395..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Represents Activity timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Activity") -@Fluent -public final class ActivityTimelineItem extends EntityTimelineItem { - /* - * The activity query id. - */ - @JsonProperty(value = "queryId", required = true) - private String queryId; - - /* - * The grouping bucket start time. - */ - @JsonProperty(value = "bucketStartTimeUTC", required = true) - private OffsetDateTime bucketStartTimeUtc; - - /* - * The grouping bucket end time. - */ - @JsonProperty(value = "bucketEndTimeUTC", required = true) - private OffsetDateTime bucketEndTimeUtc; - - /* - * The time of the first activity in the grouping bucket. - */ - @JsonProperty(value = "firstActivityTimeUTC", required = true) - private OffsetDateTime firstActivityTimeUtc; - - /* - * The time of the last activity in the grouping bucket. - */ - @JsonProperty(value = "lastActivityTimeUTC", required = true) - private OffsetDateTime lastActivityTimeUtc; - - /* - * The activity timeline content. - */ - @JsonProperty(value = "content", required = true) - private String content; - - /* - * The activity timeline title. - */ - @JsonProperty(value = "title", required = true) - private String title; - - /** - * Get the queryId property: The activity query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: The activity query id. - * - * @param queryId the queryId value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the bucketStartTimeUtc property: The grouping bucket start time. - * - * @return the bucketStartTimeUtc value. - */ - public OffsetDateTime bucketStartTimeUtc() { - return this.bucketStartTimeUtc; - } - - /** - * Set the bucketStartTimeUtc property: The grouping bucket start time. - * - * @param bucketStartTimeUtc the bucketStartTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withBucketStartTimeUtc(OffsetDateTime bucketStartTimeUtc) { - this.bucketStartTimeUtc = bucketStartTimeUtc; - return this; - } - - /** - * Get the bucketEndTimeUtc property: The grouping bucket end time. - * - * @return the bucketEndTimeUtc value. - */ - public OffsetDateTime bucketEndTimeUtc() { - return this.bucketEndTimeUtc; - } - - /** - * Set the bucketEndTimeUtc property: The grouping bucket end time. - * - * @param bucketEndTimeUtc the bucketEndTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withBucketEndTimeUtc(OffsetDateTime bucketEndTimeUtc) { - this.bucketEndTimeUtc = bucketEndTimeUtc; - return this; - } - - /** - * Get the firstActivityTimeUtc property: The time of the first activity in the grouping bucket. - * - * @return the firstActivityTimeUtc value. - */ - public OffsetDateTime firstActivityTimeUtc() { - return this.firstActivityTimeUtc; - } - - /** - * Set the firstActivityTimeUtc property: The time of the first activity in the grouping bucket. - * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.firstActivityTimeUtc = firstActivityTimeUtc; - return this; - } - - /** - * Get the lastActivityTimeUtc property: The time of the last activity in the grouping bucket. - * - * @return the lastActivityTimeUtc value. - */ - public OffsetDateTime lastActivityTimeUtc() { - return this.lastActivityTimeUtc; - } - - /** - * Set the lastActivityTimeUtc property: The time of the last activity in the grouping bucket. - * - * @param lastActivityTimeUtc the lastActivityTimeUtc value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc) { - this.lastActivityTimeUtc = lastActivityTimeUtc; - return this; - } - - /** - * Get the content property: The activity timeline content. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The activity timeline content. - * - * @param content the content value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the title property: The activity timeline title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The activity timeline title. - * - * @param title the title value to set. - * @return the ActivityTimelineItem object itself. - */ - public ActivityTimelineItem withTitle(String title) { - this.title = title; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (queryId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property queryId in model ActivityTimelineItem")); - } - if (bucketStartTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bucketStartTimeUtc in model ActivityTimelineItem")); - } - if (bucketEndTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property bucketEndTimeUtc in model ActivityTimelineItem")); - } - if (firstActivityTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property firstActivityTimeUtc in model ActivityTimelineItem")); - } - if (lastActivityTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property lastActivityTimeUtc in model ActivityTimelineItem")); - } - if (content() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property content in model ActivityTimelineItem")); - } - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model ActivityTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ActivityTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java index 6abe8f54b47d..5b2396d7cfe1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java @@ -34,6 +34,10 @@ public final class AlertDetailsOverride { @JsonProperty(value = "alertSeverityColumnName") private String alertSeverityColumnName; + /** Creates an instance of AlertDetailsOverride class. */ + public AlertDetailsOverride() { + } + /** * Get the alertDisplayNameFormat property: the format containing columns name(s) to override the alert name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java index fb0c0d7f86b2..72b9a89056a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java @@ -20,15 +20,6 @@ public final class AlertRuleKind extends ExpandableStringEnum { /** Static value Fusion for AlertRuleKind. */ public static final AlertRuleKind FUSION = fromString("Fusion"); - /** Static value MLBehaviorAnalytics for AlertRuleKind. */ - public static final AlertRuleKind MLBEHAVIOR_ANALYTICS = fromString("MLBehaviorAnalytics"); - - /** Static value ThreatIntelligence for AlertRuleKind. */ - public static final AlertRuleKind THREAT_INTELLIGENCE = fromString("ThreatIntelligence"); - - /** Static value NRT for AlertRuleKind. */ - public static final AlertRuleKind NRT = fromString("NRT"); - /** * Creates or finds a AlertRuleKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java index a8705467713b..483e3438ebf5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java @@ -23,6 +23,10 @@ public final class AlertRuleTemplateDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of AlertRuleTemplateDataSource class. */ + public AlertRuleTemplateDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java deleted file mode 100644 index 9ec04325df71..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java +++ /dev/null @@ -1,187 +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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Base alert rule template property bag. */ -@Fluent -public class AlertRuleTemplatePropertiesBase { - /* - * the number of alert rules that were created by this template - */ - @JsonProperty(value = "alertRulesCreatedByTemplateCount") - private Integer alertRulesCreatedByTemplateCount; - - /* - * The last time that this alert rule template has been updated. - */ - @JsonProperty(value = "lastUpdatedDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastUpdatedDateUtc; - - /* - * The time that this alert rule template has been added. - */ - @JsonProperty(value = "createdDateUTC", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdDateUtc; - - /* - * 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 sources for this template - */ - @JsonProperty(value = "requiredDataConnectors") - private List requiredDataConnectors; - - /* - * The alert rule template status. - */ - @JsonProperty(value = "status") - private TemplateStatus status; - - /** - * 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 AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - this.alertRulesCreatedByTemplateCount = alertRulesCreatedByTemplateCount; - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.lastUpdatedDateUtc; - } - - /** - * 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 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 AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase 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 AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.requiredDataConnectors; - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase 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 AlertRuleTemplatePropertiesBase object itself. - */ - public AlertRuleTemplatePropertiesBase withStatus(TemplateStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredDataConnectors() != null) { - requiredDataConnectors().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 7ab1567de6d3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java +++ /dev/null @@ -1,112 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Alert rule template with MITRE property bag. */ -@Fluent -public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePropertiesBase { - /* - * 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 6c1e23964aae..f1d562c1c487 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java @@ -41,12 +41,14 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ - AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -54,12 +56,10 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java index 8292bf9e3852..b6aa4aa014af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java @@ -25,6 +25,10 @@ public final class AlertRuleTemplatesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRuleTemplatesList class. */ + public AlertRuleTemplatesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rule templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java index 4ce770f0de66..22b64b10d08d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java @@ -42,12 +42,13 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ - AlertRule get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -55,13 +56,12 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRule get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -70,12 +70,14 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ - AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -84,14 +86,12 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -99,11 +99,13 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -111,11 +113,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java index c758bd659a27..886714757288 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java @@ -25,6 +25,10 @@ public final class AlertRulesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRulesList class. */ + public AlertRulesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java index 2b9ea1a54378..414a07074240 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** Alerts data type for data connectors. */ @@ -14,9 +13,13 @@ public class AlertsDataTypeOfDataConnector { /* * Alerts data type connection. */ - @JsonProperty(value = "alerts", required = true) + @JsonProperty(value = "alerts") private DataConnectorDataTypeCommon alerts; + /** Creates an instance of AlertsDataTypeOfDataConnector class. */ + public AlertsDataTypeOfDataConnector() { + } + /** * Get the alerts property: Alerts data type connection. * @@ -43,15 +46,8 @@ public AlertsDataTypeOfDataConnector withAlerts(DataConnectorDataTypeCommon aler * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (alerts() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alerts in model AlertsDataTypeOfDataConnector")); - } else { + if (alerts() != null) { alerts().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(AlertsDataTypeOfDataConnector.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java deleted file mode 100644 index a06d6aea9018..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java +++ /dev/null @@ -1,62 +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.resourcemanager.securityinsights.fluent.models.AnomaliesSettingsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Anomalies") -@Fluent -public final class Anomalies extends SettingsInner { - /* - * Anomalies properties - */ - @JsonProperty(value = "properties") - private AnomaliesSettingsProperties innerProperties; - - /** - * Get the innerProperties property: Anomalies properties. - * - * @return the innerProperties value. - */ - private AnomaliesSettingsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Anomalies withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); - } - - /** - * 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/AnomalySecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java index 3a67f21d0c14..73454b1a181d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java @@ -26,6 +26,10 @@ public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalytic @JsonProperty(value = "properties") private AnomalySecurityMLAnalyticsSettingsProperties innerProperties; + /** Creates an instance of AnomalySecurityMLAnalyticsSettings class. */ + public AnomalySecurityMLAnalyticsSettings() { + } + /** * Get the innerProperties property: Anomaly Security ML Analytics Settings properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java deleted file mode 100644 index 28ec81da3af0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents anomaly timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Anomaly") -@Fluent -public final class AnomalyTimelineItem extends EntityTimelineItem { - /* - * The anomaly azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The anomaly product name. - */ - @JsonProperty(value = "productName") - private String productName; - - /* - * The anomaly description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The anomaly name. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The anomaly end time. - */ - @JsonProperty(value = "endTimeUtc", required = true) - private OffsetDateTime endTimeUtc; - - /* - * The anomaly start time. - */ - @JsonProperty(value = "startTimeUtc", required = true) - private OffsetDateTime startTimeUtc; - - /* - * The anomaly generated time. - */ - @JsonProperty(value = "timeGenerated", required = true) - private OffsetDateTime timeGenerated; - - /* - * The name of the anomaly vendor. - */ - @JsonProperty(value = "vendor") - private String vendor; - - /* - * The intent of the anomaly. - */ - @JsonProperty(value = "intent") - private String intent; - - /* - * The techniques of the anomaly. - */ - @JsonProperty(value = "techniques") - private List techniques; - - /* - * The reasons that cause the anomaly. - */ - @JsonProperty(value = "reasons") - private List reasons; - - /** - * Get the azureResourceId property: The anomaly azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The anomaly azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the productName property: The anomaly product name. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Set the productName property: The anomaly product name. - * - * @param productName the productName value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withProductName(String productName) { - this.productName = productName; - return this; - } - - /** - * Get the description property: The anomaly description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The anomaly description. - * - * @param description the description value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The anomaly name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The anomaly name. - * - * @param displayName the displayName value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the endTimeUtc property: The anomaly end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The anomaly end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The anomaly start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The anomaly start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the timeGenerated property: The anomaly generated time. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.timeGenerated; - } - - /** - * Set the timeGenerated property: The anomaly generated time. - * - * @param timeGenerated the timeGenerated value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withTimeGenerated(OffsetDateTime timeGenerated) { - this.timeGenerated = timeGenerated; - return this; - } - - /** - * Get the vendor property: The name of the anomaly vendor. - * - * @return the vendor value. - */ - public String vendor() { - return this.vendor; - } - - /** - * Set the vendor property: The name of the anomaly vendor. - * - * @param vendor the vendor value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withVendor(String vendor) { - this.vendor = vendor; - return this; - } - - /** - * Get the intent property: The intent of the anomaly. - * - * @return the intent value. - */ - public String intent() { - return this.intent; - } - - /** - * Set the intent property: The intent of the anomaly. - * - * @param intent the intent value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withIntent(String intent) { - this.intent = intent; - return this; - } - - /** - * Get the techniques property: The techniques of the anomaly. - * - * @return the techniques value. - */ - public List techniques() { - return this.techniques; - } - - /** - * Set the techniques property: The techniques of the anomaly. - * - * @param techniques the techniques value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withTechniques(List techniques) { - this.techniques = techniques; - return this; - } - - /** - * Get the reasons property: The reasons that cause the anomaly. - * - * @return the reasons value. - */ - public List reasons() { - return this.reasons; - } - - /** - * Set the reasons property: The reasons that cause the anomaly. - * - * @param reasons the reasons value to set. - * @return the AnomalyTimelineItem object itself. - */ - public AnomalyTimelineItem withReasons(List reasons) { - this.reasons = reasons; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model AnomalyTimelineItem")); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property displayName in model AnomalyTimelineItem")); - } - if (endTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property endTimeUtc in model AnomalyTimelineItem")); - } - if (startTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimeUtc in model AnomalyTimelineItem")); - } - if (timeGenerated() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeGenerated in model AnomalyTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AnomalyTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java deleted file mode 100644 index 836a4a6fdd8f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscCheckRequirements.java +++ /dev/null @@ -1,68 +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.resourcemanager.securityinsights.fluent.models.AscCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents ASC (Azure Security Center) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AzureSecurityCenter") -@Fluent -public final class AscCheckRequirements extends DataConnectorsCheckRequirements { - /* - * ASC (Azure Security Center) requirements check properties. - */ - @JsonProperty(value = "properties") - private AscCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: ASC (Azure Security Center) requirements check properties. - * - * @return the innerProperties value. - */ - private AscCheckRequirementsProperties 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 AscCheckRequirements object itself. - */ - public AscCheckRequirements withSubscriptionId(String subscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new AscCheckRequirementsProperties(); - } - 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/AscDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java index 683d6beac5b1..ad42050543f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AscDataConnector.java @@ -22,6 +22,10 @@ public final class AscDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AscDataConnectorProperties innerProperties; + /** Creates an instance of AscDataConnector class. */ + public AscDataConnector() { + } + /** * Get the innerProperties property: ASC (Azure Security Center) data connector properties. * 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 76325ea78317..1e9f347c2653 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 @@ -146,7 +146,7 @@ interface WithParentResource { /** The stage of the AutomationRule definition allowing to specify displayName. */ interface WithDisplayName { /** - * Specifies the displayName property: The display name of the automation rule.. + * Specifies the displayName property: The display name of the automation rule. * * @param displayName The display name of the automation rule. * @return the next definition stage. @@ -156,7 +156,7 @@ interface WithDisplayName { /** The stage of the AutomationRule definition allowing to specify order. */ interface WithOrder { /** - * Specifies the order property: The order of execution of the automation rule.. + * Specifies the order property: The order of execution of the automation rule. * * @param order The order of execution of the automation rule. * @return the next definition stage. @@ -166,7 +166,7 @@ interface WithOrder { /** The stage of the AutomationRule definition allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: Describes automation rule triggering logic.. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. @@ -176,7 +176,7 @@ interface WithTriggeringLogic { /** The stage of the AutomationRule definition allowing to specify actions. */ interface WithActions { /** - * Specifies the actions property: The actions to execute when the automation rule is triggered.. + * Specifies the actions property: The actions to execute when the automation rule is triggered. * * @param actions The actions to execute when the automation rule is triggered. * @return the next definition stage. @@ -258,7 +258,7 @@ interface WithEtag { /** The stage of the AutomationRule update allowing to specify displayName. */ interface WithDisplayName { /** - * Specifies the displayName property: The display name of the automation rule.. + * Specifies the displayName property: The display name of the automation rule. * * @param displayName The display name of the automation rule. * @return the next definition stage. @@ -268,7 +268,7 @@ interface WithDisplayName { /** The stage of the AutomationRule update allowing to specify order. */ interface WithOrder { /** - * Specifies the order property: The order of execution of the automation rule.. + * Specifies the order property: The order of execution of the automation rule. * * @param order The order of execution of the automation rule. * @return the next definition stage. @@ -278,7 +278,7 @@ interface WithOrder { /** The stage of the AutomationRule update allowing to specify triggeringLogic. */ interface WithTriggeringLogic { /** - * Specifies the triggeringLogic property: Describes automation rule triggering logic.. + * Specifies the triggeringLogic property: Describes automation rule triggering logic. * * @param triggeringLogic Describes automation rule triggering logic. * @return the next definition stage. @@ -288,7 +288,7 @@ interface WithTriggeringLogic { /** The stage of the AutomationRule update allowing to specify actions. */ interface WithActions { /** - * Specifies the actions property: The actions to execute when the automation rule is triggered.. + * Specifies the actions property: The actions to execute when the automation rule is triggered. * * @param actions The actions to execute when the automation rule is triggered. * @return the next definition stage. 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 3ff1bf1a59fe..c95dd2247b4b 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 @@ -29,6 +29,10 @@ public class AutomationRuleAction { @JsonProperty(value = "order", required = true) private int order; + /** Creates an instance of AutomationRuleAction class. */ + public AutomationRuleAction() { + } + /** * Get the order property: The order property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java deleted file mode 100644 index 0eee30498e7c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java +++ /dev/null @@ -1,76 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRuleBooleanCondition model. */ -@Fluent -public final class AutomationRuleBooleanCondition { - /* - * The operator property. - */ - @JsonProperty(value = "operator") - private AutomationRuleBooleanConditionSupportedOperator operator; - - /* - * The innerConditions property. - */ - @JsonProperty(value = "innerConditions") - private List innerConditions; - - /** - * Get the operator property: The operator property. - * - * @return the operator value. - */ - public AutomationRuleBooleanConditionSupportedOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The operator property. - * - * @param operator the operator value to set. - * @return the AutomationRuleBooleanCondition object itself. - */ - public AutomationRuleBooleanCondition withOperator(AutomationRuleBooleanConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the innerConditions property: The innerConditions property. - * - * @return the innerConditions value. - */ - public List innerConditions() { - return this.innerConditions; - } - - /** - * Set the innerConditions property: The innerConditions property. - * - * @param innerConditions the innerConditions value to set. - * @return the AutomationRuleBooleanCondition object itself. - */ - public AutomationRuleBooleanCondition withInnerConditions(List innerConditions) { - this.innerConditions = innerConditions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerConditions() != null) { - innerConditions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java deleted file mode 100644 index a703cfcce4e4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java +++ /dev/null @@ -1,39 +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 AutomationRuleBooleanConditionSupportedOperator. */ -public final class AutomationRuleBooleanConditionSupportedOperator - extends ExpandableStringEnum { - /** Static value And for AutomationRuleBooleanConditionSupportedOperator. */ - public static final AutomationRuleBooleanConditionSupportedOperator AND = fromString("And"); - - /** Static value Or for AutomationRuleBooleanConditionSupportedOperator. */ - public static final AutomationRuleBooleanConditionSupportedOperator OR = fromString("Or"); - - /** - * Creates or finds a AutomationRuleBooleanConditionSupportedOperator from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRuleBooleanConditionSupportedOperator. - */ - @JsonCreator - public static AutomationRuleBooleanConditionSupportedOperator fromString(String name) { - return fromString(name, AutomationRuleBooleanConditionSupportedOperator.class); - } - - /** - * Gets known AutomationRuleBooleanConditionSupportedOperator values. - * - * @return known AutomationRuleBooleanConditionSupportedOperator values. - */ - public static Collection values() { - return values(AutomationRuleBooleanConditionSupportedOperator.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 fbd2b4bcaef2..79da464be3d9 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 @@ -16,15 +16,13 @@ property = "conditionType", defaultImpl = AutomationRuleCondition.class) @JsonTypeName("AutomationRuleCondition") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Boolean", value = BooleanConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyArrayChanged", value = PropertyArrayChangedConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyArray", value = PropertyArrayConditionProperties.class), - @JsonSubTypes.Type(name = "PropertyChanged", value = PropertyChangedConditionProperties.class), - @JsonSubTypes.Type(name = "Property", value = PropertyConditionProperties.class) -}) +@JsonSubTypes({@JsonSubTypes.Type(name = "Property", value = PropertyConditionProperties.class)}) @Immutable public class AutomationRuleCondition { + /** Creates an instance of AutomationRuleCondition class. */ + public AutomationRuleCondition() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java index 0f56b3772f36..7671608ffc48 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAc @JsonProperty(value = "actionConfiguration") private IncidentPropertiesAction actionConfiguration; + /** Creates an instance of AutomationRuleModifyPropertiesAction class. */ + public AutomationRuleModifyPropertiesAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java deleted file mode 100644 index 6b0b8389178c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java +++ /dev/null @@ -1,45 +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 AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ -public final class AutomationRulePropertyArrayChangedConditionSupportedArrayType - extends ExpandableStringEnum { - /** Static value Alerts for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType ALERTS = fromString("Alerts"); - - /** Static value Labels for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType LABELS = fromString("Labels"); - - /** Static value Tactics for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType TACTICS = fromString("Tactics"); - - /** Static value Comments for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType COMMENTS = fromString("Comments"); - - /** - * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedArrayType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayChangedConditionSupportedArrayType. - */ - @JsonCreator - public static AutomationRulePropertyArrayChangedConditionSupportedArrayType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayChangedConditionSupportedArrayType.class); - } - - /** - * Gets known AutomationRulePropertyArrayChangedConditionSupportedArrayType values. - * - * @return known AutomationRulePropertyArrayChangedConditionSupportedArrayType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayChangedConditionSupportedArrayType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java deleted file mode 100644 index 1d0e54020290..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java +++ /dev/null @@ -1,36 +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 AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ -public final class AutomationRulePropertyArrayChangedConditionSupportedChangeType - extends ExpandableStringEnum { - /** Static value Added for AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ - public static final AutomationRulePropertyArrayChangedConditionSupportedChangeType ADDED = fromString("Added"); - - /** - * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedChangeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayChangedConditionSupportedChangeType. - */ - @JsonCreator - public static AutomationRulePropertyArrayChangedConditionSupportedChangeType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayChangedConditionSupportedChangeType.class); - } - - /** - * Gets known AutomationRulePropertyArrayChangedConditionSupportedChangeType values. - * - * @return known AutomationRulePropertyArrayChangedConditionSupportedChangeType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayChangedConditionSupportedChangeType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java deleted file mode 100644 index 33ee0d2d5aee..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java +++ /dev/null @@ -1,74 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The AutomationRulePropertyArrayChangedValuesCondition model. */ -@Fluent -public final class AutomationRulePropertyArrayChangedValuesCondition { - /* - * The arrayType property. - */ - @JsonProperty(value = "arrayType") - private AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType; - - /* - * The changeType property. - */ - @JsonProperty(value = "changeType") - private AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType; - - /** - * Get the arrayType property: The arrayType property. - * - * @return the arrayType value. - */ - public AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType() { - return this.arrayType; - } - - /** - * Set the arrayType property: The arrayType property. - * - * @param arrayType the arrayType value to set. - * @return the AutomationRulePropertyArrayChangedValuesCondition object itself. - */ - public AutomationRulePropertyArrayChangedValuesCondition withArrayType( - AutomationRulePropertyArrayChangedConditionSupportedArrayType arrayType) { - this.arrayType = arrayType; - return this; - } - - /** - * Get the changeType property: The changeType property. - * - * @return the changeType value. - */ - public AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType() { - return this.changeType; - } - - /** - * Set the changeType property: The changeType property. - * - * @param changeType the changeType value to set. - * @return the AutomationRulePropertyArrayChangedValuesCondition object itself. - */ - public AutomationRulePropertyArrayChangedValuesCondition withChangeType( - AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType) { - this.changeType = changeType; - 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/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java deleted file mode 100644 index 670c64ea5936..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java +++ /dev/null @@ -1,38 +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 AutomationRulePropertyArrayConditionSupportedArrayConditionType. */ -public final class AutomationRulePropertyArrayConditionSupportedArrayConditionType - extends ExpandableStringEnum { - /** Static value AnyItem for AutomationRulePropertyArrayConditionSupportedArrayConditionType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayConditionType ANY_ITEM = - fromString("AnyItem"); - - /** - * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayConditionType from its string - * representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayConditionSupportedArrayConditionType. - */ - @JsonCreator - public static AutomationRulePropertyArrayConditionSupportedArrayConditionType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayConditionSupportedArrayConditionType.class); - } - - /** - * Gets known AutomationRulePropertyArrayConditionSupportedArrayConditionType values. - * - * @return known AutomationRulePropertyArrayConditionSupportedArrayConditionType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayConditionSupportedArrayConditionType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java deleted file mode 100644 index af5e23b9d813..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java +++ /dev/null @@ -1,41 +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 AutomationRulePropertyArrayConditionSupportedArrayType. */ -public final class AutomationRulePropertyArrayConditionSupportedArrayType - extends ExpandableStringEnum { - /** Static value CustomDetails for AutomationRulePropertyArrayConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAILS = - fromString("CustomDetails"); - - /** Static value CustomDetailValues for AutomationRulePropertyArrayConditionSupportedArrayType. */ - public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAIL_VALUES = - fromString("CustomDetailValues"); - - /** - * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyArrayConditionSupportedArrayType. - */ - @JsonCreator - public static AutomationRulePropertyArrayConditionSupportedArrayType fromString(String name) { - return fromString(name, AutomationRulePropertyArrayConditionSupportedArrayType.class); - } - - /** - * Gets known AutomationRulePropertyArrayConditionSupportedArrayType values. - * - * @return known AutomationRulePropertyArrayConditionSupportedArrayType values. - */ - public static Collection values() { - return values(AutomationRulePropertyArrayConditionSupportedArrayType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java deleted file mode 100644 index 40158ab460bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java +++ /dev/null @@ -1,104 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulePropertyArrayValuesCondition model. */ -@Fluent -public final class AutomationRulePropertyArrayValuesCondition { - /* - * The arrayType property. - */ - @JsonProperty(value = "arrayType") - private AutomationRulePropertyArrayConditionSupportedArrayType arrayType; - - /* - * The arrayConditionType property. - */ - @JsonProperty(value = "arrayConditionType") - private AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType; - - /* - * The itemConditions property. - */ - @JsonProperty(value = "itemConditions") - private List itemConditions; - - /** - * Get the arrayType property: The arrayType property. - * - * @return the arrayType value. - */ - public AutomationRulePropertyArrayConditionSupportedArrayType arrayType() { - return this.arrayType; - } - - /** - * Set the arrayType property: The arrayType property. - * - * @param arrayType the arrayType value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withArrayType( - AutomationRulePropertyArrayConditionSupportedArrayType arrayType) { - this.arrayType = arrayType; - return this; - } - - /** - * Get the arrayConditionType property: The arrayConditionType property. - * - * @return the arrayConditionType value. - */ - public AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType() { - return this.arrayConditionType; - } - - /** - * Set the arrayConditionType property: The arrayConditionType property. - * - * @param arrayConditionType the arrayConditionType value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withArrayConditionType( - AutomationRulePropertyArrayConditionSupportedArrayConditionType arrayConditionType) { - this.arrayConditionType = arrayConditionType; - return this; - } - - /** - * Get the itemConditions property: The itemConditions property. - * - * @return the itemConditions value. - */ - public List itemConditions() { - return this.itemConditions; - } - - /** - * Set the itemConditions property: The itemConditions property. - * - * @param itemConditions the itemConditions value to set. - * @return the AutomationRulePropertyArrayValuesCondition object itself. - */ - public AutomationRulePropertyArrayValuesCondition withItemConditions(List itemConditions) { - this.itemConditions = itemConditions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (itemConditions() != null) { - itemConditions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java deleted file mode 100644 index 1ca0b7145030..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java +++ /dev/null @@ -1,40 +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 AutomationRulePropertyChangedConditionSupportedChangedType. */ -public final class AutomationRulePropertyChangedConditionSupportedChangedType - extends ExpandableStringEnum { - /** Static value ChangedFrom for AutomationRulePropertyChangedConditionSupportedChangedType. */ - public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_FROM = - fromString("ChangedFrom"); - - /** Static value ChangedTo for AutomationRulePropertyChangedConditionSupportedChangedType. */ - public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_TO = fromString("ChangedTo"); - - /** - * Creates or finds a AutomationRulePropertyChangedConditionSupportedChangedType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyChangedConditionSupportedChangedType. - */ - @JsonCreator - public static AutomationRulePropertyChangedConditionSupportedChangedType fromString(String name) { - return fromString(name, AutomationRulePropertyChangedConditionSupportedChangedType.class); - } - - /** - * Gets known AutomationRulePropertyChangedConditionSupportedChangedType values. - * - * @return known AutomationRulePropertyChangedConditionSupportedChangedType values. - */ - public static Collection values() { - return values(AutomationRulePropertyChangedConditionSupportedChangedType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java deleted file mode 100644 index 7f7b6618b841..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java +++ /dev/null @@ -1,45 +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 AutomationRulePropertyChangedConditionSupportedPropertyType. */ -public final class AutomationRulePropertyChangedConditionSupportedPropertyType - extends ExpandableStringEnum { - /** Static value IncidentSeverity for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_SEVERITY = - fromString("IncidentSeverity"); - - /** Static value IncidentStatus for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_STATUS = - fromString("IncidentStatus"); - - /** Static value IncidentOwner for AutomationRulePropertyChangedConditionSupportedPropertyType. */ - public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_OWNER = - fromString("IncidentOwner"); - - /** - * Creates or finds a AutomationRulePropertyChangedConditionSupportedPropertyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutomationRulePropertyChangedConditionSupportedPropertyType. - */ - @JsonCreator - public static AutomationRulePropertyChangedConditionSupportedPropertyType fromString(String name) { - return fromString(name, AutomationRulePropertyChangedConditionSupportedPropertyType.class); - } - - /** - * Gets known AutomationRulePropertyChangedConditionSupportedPropertyType values. - * - * @return known AutomationRulePropertyChangedConditionSupportedPropertyType values. - */ - public static Collection values() { - return values(AutomationRulePropertyChangedConditionSupportedPropertyType.class); - } -} 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 72af96f863db..d62d10483191 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 @@ -40,18 +40,6 @@ public final class AutomationRulePropertyConditionSupportedProperty public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_PROVIDER_NAME = fromString("IncidentProviderName"); - /** Static value IncidentUpdatedBySource for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_UPDATED_BY_SOURCE = - fromString("IncidentUpdatedBySource"); - - /** Static value IncidentCustomDetailsKey for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_CUSTOM_DETAILS_KEY = - fromString("IncidentCustomDetailsKey"); - - /** Static value IncidentCustomDetailsValue for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty INCIDENT_CUSTOM_DETAILS_VALUE = - fromString("IncidentCustomDetailsValue"); - /** Static value AccountAadTenantId for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty ACCOUNT_AAD_TENANT_ID = fromString("AccountAadTenantId"); @@ -85,10 +73,6 @@ public final class AutomationRulePropertyConditionSupportedProperty public static final AutomationRulePropertyConditionSupportedProperty ALERT_PRODUCT_NAMES = fromString("AlertProductNames"); - /** Static value AlertAnalyticRuleIds for AutomationRulePropertyConditionSupportedProperty. */ - public static final AutomationRulePropertyConditionSupportedProperty ALERT_ANALYTIC_RULE_IDS = - fromString("AlertAnalyticRuleIds"); - /** 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/AutomationRulePropertyValuesChangedCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java deleted file mode 100644 index 9996382f4bdd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java +++ /dev/null @@ -1,128 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The AutomationRulePropertyValuesChangedCondition model. */ -@Fluent -public final class AutomationRulePropertyValuesChangedCondition { - /* - * The propertyName property. - */ - @JsonProperty(value = "propertyName") - private AutomationRulePropertyChangedConditionSupportedPropertyType propertyName; - - /* - * The changeType property. - */ - @JsonProperty(value = "changeType") - private AutomationRulePropertyChangedConditionSupportedChangedType changeType; - - /* - * The operator property. - */ - @JsonProperty(value = "operator") - private AutomationRulePropertyConditionSupportedOperator operator; - - /* - * The propertyValues property. - */ - @JsonProperty(value = "propertyValues") - private List propertyValues; - - /** - * Get the propertyName property: The propertyName property. - * - * @return the propertyName value. - */ - public AutomationRulePropertyChangedConditionSupportedPropertyType propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The propertyName property. - * - * @param propertyName the propertyName value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withPropertyName( - AutomationRulePropertyChangedConditionSupportedPropertyType propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the changeType property: The changeType property. - * - * @return the changeType value. - */ - public AutomationRulePropertyChangedConditionSupportedChangedType changeType() { - return this.changeType; - } - - /** - * Set the changeType property: The changeType property. - * - * @param changeType the changeType value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withChangeType( - AutomationRulePropertyChangedConditionSupportedChangedType changeType) { - this.changeType = changeType; - 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 AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition withOperator( - AutomationRulePropertyConditionSupportedOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the propertyValues property: The propertyValues property. - * - * @return the propertyValues value. - */ - public List propertyValues() { - return this.propertyValues; - } - - /** - * Set the propertyValues property: The propertyValues property. - * - * @param propertyValues the propertyValues value to set. - * @return the AutomationRulePropertyValuesChangedCondition object itself. - */ - public AutomationRulePropertyValuesChangedCondition 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/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java index d04dd33f2854..a7fcefcff2b7 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 @@ -12,7 +12,7 @@ @Fluent public final class AutomationRulePropertyValuesCondition { /* - * The property to evaluate in an automation rule property condition. + * The property to evaluate in an automation rule property condition */ @JsonProperty(value = "propertyName") private AutomationRulePropertyConditionSupportedProperty propertyName; @@ -29,6 +29,10 @@ public final class AutomationRulePropertyValuesCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesCondition class. */ + public AutomationRulePropertyValuesCondition() { + } + /** * Get the propertyName property: The property to evaluate in an automation rule property condition. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index f2b367315f61..a8f694f9859c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction @JsonProperty(value = "actionConfiguration") private PlaybookActionProperties actionConfiguration; + /** Creates an instance of AutomationRuleRunPlaybookAction class. */ + public AutomationRuleRunPlaybookAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java index 066a10e1830e..4b4f981d41b4 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 @@ -14,7 +14,7 @@ @Fluent public final class AutomationRuleTriggeringLogic { /* - * 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; @@ -38,11 +38,15 @@ public final class AutomationRuleTriggeringLogic { private TriggersWhen triggersWhen; /* - * The conditions to evaluate to determine if the automation rule should be triggered on a given object. + * The conditions to evaluate to determine if the automation rule should be triggered on a given object */ @JsonProperty(value = "conditions") private List conditions; + /** Creates an instance of AutomationRuleTriggeringLogic class. */ + public AutomationRuleTriggeringLogic() { + } + /** * Get the isEnabled property: Determines whether the automation rule is enabled or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java index 157bf09eeafd..5a3125430eb8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java @@ -16,12 +16,14 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Gets the automation rule. @@ -29,14 +31,12 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -44,12 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Delete the automation rule. @@ -57,14 +59,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Gets all automation rules. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java index ca0dc3474b77..272b819532b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java @@ -24,6 +24,10 @@ public final class AutomationRulesList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AutomationRulesList class. */ + public AutomationRulesList() { + } + /** * Get the value property: The value property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java deleted file mode 100644 index 30665983543b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Connector Availability Status. */ -@Fluent -public final class Availability { - /* - * The connector Availability Status - */ - @JsonProperty(value = "status") - private AvailabilityStatus status; - - /* - * Set connector as preview - */ - @JsonProperty(value = "isPreview") - private Boolean isPreview; - - /** - * Get the status property: The connector Availability Status. - * - * @return the status value. - */ - public AvailabilityStatus status() { - return this.status; - } - - /** - * Set the status property: The connector Availability Status. - * - * @param status the status value to set. - * @return the Availability object itself. - */ - public Availability withStatus(AvailabilityStatus status) { - this.status = status; - return this; - } - - /** - * Get the isPreview property: Set connector as preview. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Set connector as preview. - * - * @param isPreview the isPreview value to set. - * @return the Availability object itself. - */ - public Availability withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - 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/AvailabilityStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AvailabilityStatus.java deleted file mode 100644 index 4943056eabbf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AvailabilityStatus.java +++ /dev/null @@ -1,48 +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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** The connector Availability Status. */ -public enum AvailabilityStatus { - /** Enum value 1. */ - ONE(1); - - /** The actual serialized value for a AvailabilityStatus instance. */ - private final int value; - - AvailabilityStatus(int value) { - this.value = value; - } - - /** - * Parses a serialized value to a AvailabilityStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed AvailabilityStatus object, or null if unable to parse. - */ - @JsonCreator - public static AvailabilityStatus fromInt(int value) { - AvailabilityStatus[] items = AvailabilityStatus.values(); - for (AvailabilityStatus item : items) { - if (item.toInt() == value) { - return item; - } - } - return null; - } - - /** - * De-serializes the instance to int value. - * - * @return the int value. - */ - @JsonValue - public int toInt() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java deleted file mode 100644 index 047f80cbc5a1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java +++ /dev/null @@ -1,25 +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.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Amazon Web Services CloudTrail requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesCloudTrail") -@Immutable -public final class AwsCloudTrailCheckRequirements extends DataConnectorsCheckRequirements { - /** - * 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/AwsCloudTrailDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java index 85fed62b4c13..bd6fabfc5678 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java @@ -22,6 +22,10 @@ public final class AwsCloudTrailDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsCloudTrailDataConnectorProperties innerProperties; + /** Creates an instance of AwsCloudTrailDataConnector class. */ + public AwsCloudTrailDataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services CloudTrail data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java index 019e54161be6..25aa4f6f6201 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for Amazon Web Services CloudTrail data connector. */ @@ -14,9 +13,13 @@ public final class AwsCloudTrailDataConnectorDataTypes { /* * Logs data type. */ - @JsonProperty(value = "logs", required = true) + @JsonProperty(value = "logs") private AwsCloudTrailDataConnectorDataTypesLogs logs; + /** Creates an instance of AwsCloudTrailDataConnectorDataTypes class. */ + public AwsCloudTrailDataConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * @@ -43,15 +46,8 @@ public AwsCloudTrailDataConnectorDataTypes withLogs(AwsCloudTrailDataConnectorDa * @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 AwsCloudTrailDataConnectorDataTypes")); - } else { + if (logs() != null) { logs().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(AwsCloudTrailDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java index f11d9c72a1d9..bb73c9450fe5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsCloudTrailDataConnectorDataTypesLogs class. */ + public AwsCloudTrailDataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsCloudTrailDataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java deleted file mode 100644 index ddfb6f7d40c1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java +++ /dev/null @@ -1,25 +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.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Amazon Web Services S3 requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesS3") -@Immutable -public final class AwsS3CheckRequirements extends DataConnectorsCheckRequirements { - /** - * 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/AwsS3DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java deleted file mode 100644 index 3739b6ccb523..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java +++ /dev/null @@ -1,146 +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.resourcemanager.securityinsights.fluent.models.AwsS3DataConnectorProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents Amazon Web Services S3 data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("AmazonWebServicesS3") -@Fluent -public final class AwsS3DataConnector extends DataConnectorInner { - /* - * Amazon Web Services S3 data connector properties. - */ - @JsonProperty(value = "properties") - private AwsS3DataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Amazon Web Services S3 data connector properties. - * - * @return the innerProperties value. - */ - private AwsS3DataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public AwsS3DataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the destinationTable property: The logs destination table name in LogAnalytics. - * - * @return the destinationTable value. - */ - public String destinationTable() { - return this.innerProperties() == null ? null : this.innerProperties().destinationTable(); - } - - /** - * Set the destinationTable property: The logs destination table name in LogAnalytics. - * - * @param destinationTable the destinationTable value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withDestinationTable(String destinationTable) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withDestinationTable(destinationTable); - return this; - } - - /** - * Get the sqsUrls property: The AWS sqs urls for the connector. - * - * @return the sqsUrls value. - */ - public List sqsUrls() { - return this.innerProperties() == null ? null : this.innerProperties().sqsUrls(); - } - - /** - * Set the sqsUrls property: The AWS sqs urls for the connector. - * - * @param sqsUrls the sqsUrls value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withSqsUrls(List sqsUrls) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withSqsUrls(sqsUrls); - return this; - } - - /** - * Get the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @return the roleArn value. - */ - public String roleArn() { - return this.innerProperties() == null ? null : this.innerProperties().roleArn(); - } - - /** - * Set the roleArn property: The Aws Role Arn that is used to access the Aws account. - * - * @param roleArn the roleArn value to set. - * @return the AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withRoleArn(String roleArn) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - this.innerProperties().withRoleArn(roleArn); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public AwsS3DataConnectorDataTypes 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 AwsS3DataConnector object itself. - */ - public AwsS3DataConnector withDataTypes(AwsS3DataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new AwsS3DataConnectorProperties(); - } - 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/AwsS3DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java deleted file mode 100644 index 14c7a6754785..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Amazon Web Services S3 data connector. */ -@Fluent -public final class AwsS3DataConnectorDataTypes { - /* - * Logs data type. - */ - @JsonProperty(value = "logs", required = true) - private AwsS3DataConnectorDataTypesLogs logs; - - /** - * Get the logs property: Logs data type. - * - * @return the logs value. - */ - public AwsS3DataConnectorDataTypesLogs logs() { - return this.logs; - } - - /** - * Set the logs property: Logs data type. - * - * @param logs the logs value to set. - * @return the AwsS3DataConnectorDataTypes object itself. - */ - public AwsS3DataConnectorDataTypes withLogs(AwsS3DataConnectorDataTypesLogs 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 AwsS3DataConnectorDataTypes")); - } else { - logs().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AwsS3DataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java deleted file mode 100644 index dd24d8ad6de3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +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; - -/** Logs data type. */ -@Fluent -public final class AwsS3DataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public AwsS3DataConnectorDataTypesLogs 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/AzureDevOpsResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java deleted file mode 100644 index 4c8ea0212461..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in Azure DevOps repository. */ -@Fluent -public final class AzureDevOpsResourceInfo { - /* - * 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/AzureResourceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java index 64b4871d5cf4..2b51e84ec521 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.AzureResourceEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,14 +14,18 @@ /** Represents an azure resource entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AzureResource") -@Fluent -public final class AzureResourceEntity extends EntityInner { +@Immutable +public final class AzureResourceEntity extends Entity { /* * AzureResource entity properties */ @JsonProperty(value = "properties") private AzureResourceEntityProperties innerProperties; + /** Creates an instance of AzureResourceEntity class. */ + public AzureResourceEntity() { + } + /** * Get the innerProperties property: AzureResource entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmark.java index bfdfb6f62b95..c798de30db51 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,27 +138,6 @@ 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 name of the resource group. * @@ -211,10 +190,7 @@ interface WithCreate DefinitionStages.WithEventTime, DefinitionStages.WithQueryStartTime, DefinitionStages.WithQueryEndTime, - DefinitionStages.WithIncidentInfo, - DefinitionStages.WithEntityMappings, - DefinitionStages.WithTactics, - DefinitionStages.WithTechniques { + DefinitionStages.WithIncidentInfo { /** * Executes the create request. * @@ -370,36 +346,6 @@ 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. @@ -423,10 +369,7 @@ interface Update UpdateStages.WithEventTime, UpdateStages.WithQueryStartTime, UpdateStages.WithQueryEndTime, - UpdateStages.WithIncidentInfo, - UpdateStages.WithEntityMappings, - UpdateStages.WithTactics, - UpdateStages.WithTechniques { + UpdateStages.WithIncidentInfo { /** * Executes the update request. * @@ -584,36 +527,6 @@ 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 deleted file mode 100644 index b46a2d88c95d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java +++ /dev/null @@ -1,76 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the entity mappings of a single entity. */ -@Fluent -public final class BookmarkEntityMappings { - /* - * 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/BookmarkExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java deleted file mode 100644 index ea70e0521448..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java +++ /dev/null @@ -1,100 +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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** The parameters required to execute an expand operation on the given bookmark. */ -@Fluent -public final class BookmarkExpandParameters { - /* - * The end date filter, so the only expansion results returned are before this date. - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * The Id of the expansion to perform. - */ - @JsonProperty(value = "expansionId") - private UUID expansionId; - - /* - * The start date filter, so the only expansion results returned are after this date. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /** - * Get the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the expansionId property: The Id of the expansion to perform. - * - * @return the expansionId value. - */ - public UUID expansionId() { - return this.expansionId; - } - - /** - * Set the expansionId property: The Id of the expansion to perform. - * - * @param expansionId the expansionId value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withExpansionId(UUID expansionId) { - this.expansionId = expansionId; - return this; - } - - /** - * Get the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the BookmarkExpandParameters object itself. - */ - public BookmarkExpandParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - 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/BookmarkExpandResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponse.java deleted file mode 100644 index 0df634388d5e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponse.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.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner; - -/** An immutable client-side representation of BookmarkExpandResponse. */ -public interface BookmarkExpandResponse { - /** - * Gets the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - ExpansionResultsMetadata metadata(); - - /** - * Gets the value property: The expansion result values. - * - * @return the value value. - */ - BookmarkExpandResponseValue value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.BookmarkExpandResponseInner object. - * - * @return the inner object. - */ - BookmarkExpandResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java deleted file mode 100644 index b9b48339a131..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java +++ /dev/null @@ -1,80 +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.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The expansion result values. */ -@Fluent -public final class BookmarkExpandResponseValue { - /* - * Array of the expansion result entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * Array of expansion result connected entities - */ - @JsonProperty(value = "edges") - private List edges; - - /** - * Get the entities property: Array of the expansion result entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Array of the expansion result entities. - * - * @param entities the entities value to set. - * @return the BookmarkExpandResponseValue object itself. - */ - public BookmarkExpandResponseValue withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the edges property: Array of expansion result connected entities. - * - * @return the edges value. - */ - public List edges() { - return this.edges; - } - - /** - * Set the edges property: Array of expansion result connected entities. - * - * @param edges the edges value to set. - * @return the BookmarkExpandResponseValue object itself. - */ - public BookmarkExpandResponseValue withEdges(List edges) { - this.edges = edges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() != null) { - entities().forEach(e -> e.validate()); - } - if (edges() != null) { - edges().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 f89890b19242..99216fdd6580 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 @@ -14,7 +14,7 @@ @Fluent public final class BookmarkList { /* - * URL to fetch the next set of bookmarks. + * URL to fetch the next set of cases. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; @@ -25,8 +25,12 @@ public final class BookmarkList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of BookmarkList class. */ + public BookmarkList() { + } + /** - * Get the nextLink property: URL to fetch the next set of bookmarks. + * Get the nextLink property: URL to fetch the next set of cases. * * @return the nextLink value. */ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java deleted file mode 100644 index cf54322f2c78..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java +++ /dev/null @@ -1,46 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of BookmarkOperations. */ -public interface BookmarkOperations { - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); - - /** - * Expand an bookmark. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); -} 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 deleted file mode 100644 index e1db491640d0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java +++ /dev/null @@ -1,165 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of BookmarkRelations. */ -public interface BookmarkRelations { - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark 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 bookmark relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String bookmarkId); - - /** - * Gets all bookmark relations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all bookmark relations as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String bookmarkId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. - */ - Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - - /** - * Delete the bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); - - /** - * Gets a bookmark relation. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. - */ - Relation getById(String id); - - /** - * Gets a bookmark relation. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the bookmark relation. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete the bookmark relation. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Relation resource. - * - * @param name resource name. - * @return the first stage of the new Relation definition. - */ - Relation.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java deleted file mode 100644 index bfad411f1ce6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents bookmark timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Bookmark") -@Fluent -public final class BookmarkTimelineItem extends EntityTimelineItem { - /* - * The bookmark azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The bookmark display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The notes of the bookmark - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The bookmark end time. - */ - @JsonProperty(value = "endTimeUtc") - private OffsetDateTime endTimeUtc; - - /* - * The bookmark start time. - */ - @JsonProperty(value = "startTimeUtc") - private OffsetDateTime startTimeUtc; - - /* - * The bookmark event time. - */ - @JsonProperty(value = "eventTime") - private OffsetDateTime eventTime; - - /* - * Describes a user that created the bookmark - */ - @JsonProperty(value = "createdBy") - private UserInfo createdBy; - - /* - * List of labels relevant to this bookmark - */ - @JsonProperty(value = "labels") - private List labels; - - /** - * Get the azureResourceId property: The bookmark azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The bookmark azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the displayName property: The bookmark display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The bookmark display name. - * - * @param displayName the displayName value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the notes property: The notes of the bookmark. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: The notes of the bookmark. - * - * @param notes the notes value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the endTimeUtc property: The bookmark end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The bookmark end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The bookmark start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The bookmark start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the eventTime property: The bookmark event time. - * - * @return the eventTime value. - */ - public OffsetDateTime eventTime() { - return this.eventTime; - } - - /** - * Set the eventTime property: The bookmark event time. - * - * @param eventTime the eventTime value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withEventTime(OffsetDateTime eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Get the createdBy property: Describes a user that created the bookmark. - * - * @return the createdBy value. - */ - public UserInfo createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: Describes a user that created the bookmark. - * - * @param createdBy the createdBy value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withCreatedBy(UserInfo createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the labels property: List of labels relevant to this bookmark. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: List of labels relevant to this bookmark. - * - * @param labels the labels value to set. - * @return the BookmarkTimelineItem object itself. - */ - public BookmarkTimelineItem withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model BookmarkTimelineItem")); - } - if (createdBy() != null) { - createdBy().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BookmarkTimelineItem.class); -} 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 3b3706f36fd8..844d404d4847 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java @@ -41,12 +41,14 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ - Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -54,14 +56,12 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Delete the bookmark. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); /** * Gets a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java deleted file mode 100644 index be26717140de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java +++ /dev/null @@ -1,55 +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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that applies a boolean operator (e.g AND, OR) to conditions. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("Boolean") -@Fluent -public final class BooleanConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRuleBooleanCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRuleBooleanCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the BooleanConditionProperties object itself. - */ - public BooleanConditionProperties withConditionProperties(AutomationRuleBooleanCondition 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/ClientInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java index 9d6d5e61b586..df99e16b4d4a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java @@ -35,6 +35,10 @@ public final class ClientInfo { @JsonProperty(value = "userPrincipalName") private String userPrincipalName; + /** Creates an instance of ClientInfo class. */ + public ClientInfo() { + } + /** * Get the email property: The email of the client. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java index 2d0908e927da..c6f4e9ef38fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.CloudApplicationEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -15,14 +14,18 @@ /** Represents a cloud application entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("CloudApplication") -@Fluent -public final class CloudApplicationEntity extends EntityInner { +@Immutable +public final class CloudApplicationEntity extends Entity { /* * CloudApplication entity properties */ @JsonProperty(value = "properties") private CloudApplicationEntityProperties innerProperties; + /** Creates an instance of CloudApplicationEntity class. */ + public CloudApplicationEntity() { + } + /** * Get the innerProperties property: CloudApplication entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java deleted file mode 100644 index 396d69282da3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java +++ /dev/null @@ -1,100 +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.resourcemanager.securityinsights.fluent.models.ApiPollingParameters; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Codeless API Polling data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("APIPolling") -@Fluent -public final class CodelessApiPollingDataConnector extends DataConnectorInner { - /* - * Codeless poling data connector properties - */ - @JsonProperty(value = "properties") - private ApiPollingParameters innerProperties; - - /** - * Get the innerProperties property: Codeless poling data connector properties. - * - * @return the innerProperties value. - */ - private ApiPollingParameters innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CodelessApiPollingDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.innerProperties() == null ? null : this.innerProperties().connectorUiConfig(); - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessApiPollingDataConnector object itself. - */ - public CodelessApiPollingDataConnector withConnectorUiConfig( - CodelessUiConnectorConfigProperties connectorUiConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiPollingParameters(); - } - this.innerProperties().withConnectorUiConfig(connectorUiConfig); - return this; - } - - /** - * Get the pollingConfig property: Config to describe the polling instructions. - * - * @return the pollingConfig value. - */ - public CodelessConnectorPollingConfigProperties pollingConfig() { - return this.innerProperties() == null ? null : this.innerProperties().pollingConfig(); - } - - /** - * Set the pollingConfig property: Config to describe the polling instructions. - * - * @param pollingConfig the pollingConfig value to set. - * @return the CodelessApiPollingDataConnector object itself. - */ - public CodelessApiPollingDataConnector withPollingConfig(CodelessConnectorPollingConfigProperties pollingConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new ApiPollingParameters(); - } - this.innerProperties().withPollingConfig(pollingConfig); - 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/CodelessConnectorPollingAuthProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java deleted file mode 100644 index a9a781b14c94..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the authentication properties needed to successfully authenticate with the server. */ -@Fluent -public final class CodelessConnectorPollingAuthProperties { - /* - * The authentication type - */ - @JsonProperty(value = "authType", required = true) - private String authType; - - /* - * The header name which the token is sent with - */ - @JsonProperty(value = "apiKeyName") - private String apiKeyName; - - /* - * A prefix send in the header before the actual token - */ - @JsonProperty(value = "apiKeyIdentifier") - private String apiKeyIdentifier; - - /* - * Marks if the key should sent in header - */ - @JsonProperty(value = "isApiKeyInPostPayload") - private String isApiKeyInPostPayload; - - /* - * Describes the flow name, for example 'AuthCode' for Oauth 2.0 - */ - @JsonProperty(value = "flowName") - private String flowName; - - /* - * The endpoint used to issue a token, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpoint") - private String tokenEndpoint; - - /* - * The endpoint used to authorize the user, used in Oauth 2.0 flow - */ - @JsonProperty(value = "authorizationEndpoint") - private String authorizationEndpoint; - - /* - * The query parameters used in authorization request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "authorizationEndpointQueryParameters") - private Object authorizationEndpointQueryParameters; - - /* - * The redirect endpoint where we will get the authorization code, used in Oauth 2.0 flow - */ - @JsonProperty(value = "redirectionEndpoint") - private String redirectionEndpoint; - - /* - * The query headers used in token request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpointHeaders") - private Object tokenEndpointHeaders; - - /* - * The query parameters used in token request, used in Oauth 2.0 flow - */ - @JsonProperty(value = "tokenEndpointQueryParameters") - private Object tokenEndpointQueryParameters; - - /* - * Marks if we should send the client secret in header or payload, used in Oauth 2.0 flow - */ - @JsonProperty(value = "isClientSecretInHeader") - private Boolean isClientSecretInHeader; - - /* - * The OAuth token scope - */ - @JsonProperty(value = "scope") - private String scope; - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: The authentication type. - * - * @param authType the authType value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the apiKeyName property: The header name which the token is sent with. - * - * @return the apiKeyName value. - */ - public String apiKeyName() { - return this.apiKeyName; - } - - /** - * Set the apiKeyName property: The header name which the token is sent with. - * - * @param apiKeyName the apiKeyName value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withApiKeyName(String apiKeyName) { - this.apiKeyName = apiKeyName; - return this; - } - - /** - * Get the apiKeyIdentifier property: A prefix send in the header before the actual token. - * - * @return the apiKeyIdentifier value. - */ - public String apiKeyIdentifier() { - return this.apiKeyIdentifier; - } - - /** - * Set the apiKeyIdentifier property: A prefix send in the header before the actual token. - * - * @param apiKeyIdentifier the apiKeyIdentifier value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withApiKeyIdentifier(String apiKeyIdentifier) { - this.apiKeyIdentifier = apiKeyIdentifier; - return this; - } - - /** - * Get the isApiKeyInPostPayload property: Marks if the key should sent in header. - * - * @return the isApiKeyInPostPayload value. - */ - public String isApiKeyInPostPayload() { - return this.isApiKeyInPostPayload; - } - - /** - * Set the isApiKeyInPostPayload property: Marks if the key should sent in header. - * - * @param isApiKeyInPostPayload the isApiKeyInPostPayload value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withIsApiKeyInPostPayload(String isApiKeyInPostPayload) { - this.isApiKeyInPostPayload = isApiKeyInPostPayload; - return this; - } - - /** - * Get the flowName property: Describes the flow name, for example 'AuthCode' for Oauth 2.0. - * - * @return the flowName value. - */ - public String flowName() { - return this.flowName; - } - - /** - * Set the flowName property: Describes the flow name, for example 'AuthCode' for Oauth 2.0. - * - * @param flowName the flowName value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withFlowName(String flowName) { - this.flowName = flowName; - return this; - } - - /** - * Get the tokenEndpoint property: The endpoint used to issue a token, used in Oauth 2.0 flow. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint property: The endpoint used to issue a token, used in Oauth 2.0 flow. - * - * @param tokenEndpoint the tokenEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the authorizationEndpoint property: The endpoint used to authorize the user, used in Oauth 2.0 flow. - * - * @return the authorizationEndpoint value. - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint property: The endpoint used to authorize the user, used in Oauth 2.0 flow. - * - * @param authorizationEndpoint the authorizationEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the authorizationEndpointQueryParameters property: The query parameters used in authorization request, used - * in Oauth 2.0 flow. - * - * @return the authorizationEndpointQueryParameters value. - */ - public Object authorizationEndpointQueryParameters() { - return this.authorizationEndpointQueryParameters; - } - - /** - * Set the authorizationEndpointQueryParameters property: The query parameters used in authorization request, used - * in Oauth 2.0 flow. - * - * @param authorizationEndpointQueryParameters the authorizationEndpointQueryParameters value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withAuthorizationEndpointQueryParameters( - Object authorizationEndpointQueryParameters) { - this.authorizationEndpointQueryParameters = authorizationEndpointQueryParameters; - return this; - } - - /** - * Get the redirectionEndpoint property: The redirect endpoint where we will get the authorization code, used in - * Oauth 2.0 flow. - * - * @return the redirectionEndpoint value. - */ - public String redirectionEndpoint() { - return this.redirectionEndpoint; - } - - /** - * Set the redirectionEndpoint property: The redirect endpoint where we will get the authorization code, used in - * Oauth 2.0 flow. - * - * @param redirectionEndpoint the redirectionEndpoint value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withRedirectionEndpoint(String redirectionEndpoint) { - this.redirectionEndpoint = redirectionEndpoint; - return this; - } - - /** - * Get the tokenEndpointHeaders property: The query headers used in token request, used in Oauth 2.0 flow. - * - * @return the tokenEndpointHeaders value. - */ - public Object tokenEndpointHeaders() { - return this.tokenEndpointHeaders; - } - - /** - * Set the tokenEndpointHeaders property: The query headers used in token request, used in Oauth 2.0 flow. - * - * @param tokenEndpointHeaders the tokenEndpointHeaders value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpointHeaders(Object tokenEndpointHeaders) { - this.tokenEndpointHeaders = tokenEndpointHeaders; - return this; - } - - /** - * Get the tokenEndpointQueryParameters property: The query parameters used in token request, used in Oauth 2.0 - * flow. - * - * @return the tokenEndpointQueryParameters value. - */ - public Object tokenEndpointQueryParameters() { - return this.tokenEndpointQueryParameters; - } - - /** - * Set the tokenEndpointQueryParameters property: The query parameters used in token request, used in Oauth 2.0 - * flow. - * - * @param tokenEndpointQueryParameters the tokenEndpointQueryParameters value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withTokenEndpointQueryParameters( - Object tokenEndpointQueryParameters) { - this.tokenEndpointQueryParameters = tokenEndpointQueryParameters; - return this; - } - - /** - * Get the isClientSecretInHeader property: Marks if we should send the client secret in header or payload, used in - * Oauth 2.0 flow. - * - * @return the isClientSecretInHeader value. - */ - public Boolean isClientSecretInHeader() { - return this.isClientSecretInHeader; - } - - /** - * Set the isClientSecretInHeader property: Marks if we should send the client secret in header or payload, used in - * Oauth 2.0 flow. - * - * @param isClientSecretInHeader the isClientSecretInHeader value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withIsClientSecretInHeader(Boolean isClientSecretInHeader) { - this.isClientSecretInHeader = isClientSecretInHeader; - return this; - } - - /** - * Get the scope property: The OAuth token scope. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The OAuth token scope. - * - * @param scope the scope value to set. - * @return the CodelessConnectorPollingAuthProperties object itself. - */ - public CodelessConnectorPollingAuthProperties withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authType in model CodelessConnectorPollingAuthProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingAuthProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java deleted file mode 100644 index b1040c30de77..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Config to describe the polling config for API poller connector. */ -@Fluent -public final class CodelessConnectorPollingConfigProperties { - /* - * The poller active status - */ - @JsonProperty(value = "isActive") - private Boolean isActive; - - /* - * Describe the authentication type of the poller - */ - @JsonProperty(value = "auth", required = true) - private CodelessConnectorPollingAuthProperties auth; - - /* - * Describe the poll request config parameters of the poller - */ - @JsonProperty(value = "request", required = true) - private CodelessConnectorPollingRequestProperties request; - - /* - * Describe the poll request paging config of the poller - */ - @JsonProperty(value = "paging") - private CodelessConnectorPollingPagingProperties paging; - - /* - * Describe the response config parameters of the poller - */ - @JsonProperty(value = "response") - private CodelessConnectorPollingResponseProperties response; - - /** - * Get the isActive property: The poller active status. - * - * @return the isActive value. - */ - public Boolean isActive() { - return this.isActive; - } - - /** - * Set the isActive property: The poller active status. - * - * @param isActive the isActive value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withIsActive(Boolean isActive) { - this.isActive = isActive; - return this; - } - - /** - * Get the auth property: Describe the authentication type of the poller. - * - * @return the auth value. - */ - public CodelessConnectorPollingAuthProperties auth() { - return this.auth; - } - - /** - * Set the auth property: Describe the authentication type of the poller. - * - * @param auth the auth value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withAuth(CodelessConnectorPollingAuthProperties auth) { - this.auth = auth; - return this; - } - - /** - * Get the request property: Describe the poll request config parameters of the poller. - * - * @return the request value. - */ - public CodelessConnectorPollingRequestProperties request() { - return this.request; - } - - /** - * Set the request property: Describe the poll request config parameters of the poller. - * - * @param request the request value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withRequest(CodelessConnectorPollingRequestProperties request) { - this.request = request; - return this; - } - - /** - * Get the paging property: Describe the poll request paging config of the poller. - * - * @return the paging value. - */ - public CodelessConnectorPollingPagingProperties paging() { - return this.paging; - } - - /** - * Set the paging property: Describe the poll request paging config of the poller. - * - * @param paging the paging value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withPaging(CodelessConnectorPollingPagingProperties paging) { - this.paging = paging; - return this; - } - - /** - * Get the response property: Describe the response config parameters of the poller. - * - * @return the response value. - */ - public CodelessConnectorPollingResponseProperties response() { - return this.response; - } - - /** - * Set the response property: Describe the response config parameters of the poller. - * - * @param response the response value to set. - * @return the CodelessConnectorPollingConfigProperties object itself. - */ - public CodelessConnectorPollingConfigProperties withResponse(CodelessConnectorPollingResponseProperties response) { - this.response = response; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property auth in model CodelessConnectorPollingConfigProperties")); - } else { - auth().validate(); - } - if (request() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property request in model CodelessConnectorPollingConfigProperties")); - } else { - request().validate(); - } - if (paging() != null) { - paging().validate(); - } - if (response() != null) { - response().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingConfigProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java deleted file mode 100644 index a0d01a5af717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the properties needed to make a pagination call. */ -@Fluent -public final class CodelessConnectorPollingPagingProperties { - /* - * Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp' - */ - @JsonProperty(value = "pagingType", required = true) - private String pagingType; - - /* - * Defines the name of a next page attribute - */ - @JsonProperty(value = "nextPageParaName") - private String nextPageParaName; - - /* - * Defines the path to a next page token JSON - */ - @JsonProperty(value = "nextPageTokenJsonPath") - private String nextPageTokenJsonPath; - - /* - * Defines the path to a page count attribute - */ - @JsonProperty(value = "pageCountAttributePath") - private String pageCountAttributePath; - - /* - * Defines the path to a page total count attribute - */ - @JsonProperty(value = "pageTotalCountAttributePath") - private String pageTotalCountAttributePath; - - /* - * Defines the path to a paging time stamp attribute - */ - @JsonProperty(value = "pageTimeStampAttributePath") - private String pageTimestampAttributePath; - - /* - * Determines whether to search for the latest time stamp in the events list - */ - @JsonProperty(value = "searchTheLatestTimeStampFromEventsList") - private String searchTheLatestTimestampFromEventsList; - - /* - * Defines the name of the page size parameter - */ - @JsonProperty(value = "pageSizeParaName") - private String pageSizeParaName; - - /* - * Defines the paging size - */ - @JsonProperty(value = "pageSize") - private Integer pageSize; - - /** - * Get the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. - * - * @return the pagingType value. - */ - public String pagingType() { - return this.pagingType; - } - - /** - * Set the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. - * - * @param pagingType the pagingType value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPagingType(String pagingType) { - this.pagingType = pagingType; - return this; - } - - /** - * Get the nextPageParaName property: Defines the name of a next page attribute. - * - * @return the nextPageParaName value. - */ - public String nextPageParaName() { - return this.nextPageParaName; - } - - /** - * Set the nextPageParaName property: Defines the name of a next page attribute. - * - * @param nextPageParaName the nextPageParaName value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withNextPageParaName(String nextPageParaName) { - this.nextPageParaName = nextPageParaName; - return this; - } - - /** - * Get the nextPageTokenJsonPath property: Defines the path to a next page token JSON. - * - * @return the nextPageTokenJsonPath value. - */ - public String nextPageTokenJsonPath() { - return this.nextPageTokenJsonPath; - } - - /** - * Set the nextPageTokenJsonPath property: Defines the path to a next page token JSON. - * - * @param nextPageTokenJsonPath the nextPageTokenJsonPath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withNextPageTokenJsonPath(String nextPageTokenJsonPath) { - this.nextPageTokenJsonPath = nextPageTokenJsonPath; - return this; - } - - /** - * Get the pageCountAttributePath property: Defines the path to a page count attribute. - * - * @return the pageCountAttributePath value. - */ - public String pageCountAttributePath() { - return this.pageCountAttributePath; - } - - /** - * Set the pageCountAttributePath property: Defines the path to a page count attribute. - * - * @param pageCountAttributePath the pageCountAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageCountAttributePath(String pageCountAttributePath) { - this.pageCountAttributePath = pageCountAttributePath; - return this; - } - - /** - * Get the pageTotalCountAttributePath property: Defines the path to a page total count attribute. - * - * @return the pageTotalCountAttributePath value. - */ - public String pageTotalCountAttributePath() { - return this.pageTotalCountAttributePath; - } - - /** - * Set the pageTotalCountAttributePath property: Defines the path to a page total count attribute. - * - * @param pageTotalCountAttributePath the pageTotalCountAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageTotalCountAttributePath( - String pageTotalCountAttributePath) { - this.pageTotalCountAttributePath = pageTotalCountAttributePath; - return this; - } - - /** - * Get the pageTimestampAttributePath property: Defines the path to a paging time stamp attribute. - * - * @return the pageTimestampAttributePath value. - */ - public String pageTimestampAttributePath() { - return this.pageTimestampAttributePath; - } - - /** - * Set the pageTimestampAttributePath property: Defines the path to a paging time stamp attribute. - * - * @param pageTimestampAttributePath the pageTimestampAttributePath value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageTimestampAttributePath(String pageTimestampAttributePath) { - this.pageTimestampAttributePath = pageTimestampAttributePath; - return this; - } - - /** - * Get the searchTheLatestTimestampFromEventsList property: Determines whether to search for the latest time stamp - * in the events list. - * - * @return the searchTheLatestTimestampFromEventsList value. - */ - public String searchTheLatestTimestampFromEventsList() { - return this.searchTheLatestTimestampFromEventsList; - } - - /** - * Set the searchTheLatestTimestampFromEventsList property: Determines whether to search for the latest time stamp - * in the events list. - * - * @param searchTheLatestTimestampFromEventsList the searchTheLatestTimestampFromEventsList value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withSearchTheLatestTimestampFromEventsList( - String searchTheLatestTimestampFromEventsList) { - this.searchTheLatestTimestampFromEventsList = searchTheLatestTimestampFromEventsList; - return this; - } - - /** - * Get the pageSizeParaName property: Defines the name of the page size parameter. - * - * @return the pageSizeParaName value. - */ - public String pageSizeParaName() { - return this.pageSizeParaName; - } - - /** - * Set the pageSizeParaName property: Defines the name of the page size parameter. - * - * @param pageSizeParaName the pageSizeParaName value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageSizeParaName(String pageSizeParaName) { - this.pageSizeParaName = pageSizeParaName; - return this; - } - - /** - * Get the pageSize property: Defines the paging size. - * - * @return the pageSize value. - */ - public Integer pageSize() { - return this.pageSize; - } - - /** - * Set the pageSize property: Defines the paging size. - * - * @param pageSize the pageSize value to set. - * @return the CodelessConnectorPollingPagingProperties object itself. - */ - public CodelessConnectorPollingPagingProperties withPageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pagingType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property pagingType in model CodelessConnectorPollingPagingProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingPagingProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java deleted file mode 100644 index cf4d6e8754b9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describe the request properties needed to successfully pull from the server. */ -@Fluent -public final class CodelessConnectorPollingRequestProperties { - /* - * Describe the endpoint we should pull the data from - */ - @JsonProperty(value = "apiEndpoint", required = true) - private String apiEndpoint; - - /* - * Defines the rate limit QPS - */ - @JsonProperty(value = "rateLimitQps") - private Integer rateLimitQps; - - /* - * The window interval we will use the pull the data - */ - @JsonProperty(value = "queryWindowInMin", required = true) - private int queryWindowInMin; - - /* - * The http method type we will use in the poll request, GET or POST - */ - @JsonProperty(value = "httpMethod", required = true) - private String httpMethod; - - /* - * The time format will be used the query events in a specific window - */ - @JsonProperty(value = "queryTimeFormat", required = true) - private String queryTimeFormat; - - /* - * Describe the amount of time we should try and poll the data in case of failure - */ - @JsonProperty(value = "retryCount") - private Integer retryCount; - - /* - * The number of seconds we will consider as a request timeout - */ - @JsonProperty(value = "timeoutInSeconds") - private Integer timeoutInSeconds; - - /* - * Describe the headers sent in the poll request - */ - @JsonProperty(value = "headers") - private Object headers; - - /* - * Describe the query parameters sent in the poll request - */ - @JsonProperty(value = "queryParameters") - private Object queryParameters; - - /* - * For advanced scenarios for example user name/password embedded in nested JSON payload - */ - @JsonProperty(value = "queryParametersTemplate") - private String queryParametersTemplate; - - /* - * This will be used the query events from a start of the time window - */ - @JsonProperty(value = "startTimeAttributeName") - private String startTimeAttributeName; - - /* - * This will be used the query events from the end of the time window - */ - @JsonProperty(value = "endTimeAttributeName") - private String endTimeAttributeName; - - /** - * Get the apiEndpoint property: Describe the endpoint we should pull the data from. - * - * @return the apiEndpoint value. - */ - public String apiEndpoint() { - return this.apiEndpoint; - } - - /** - * Set the apiEndpoint property: Describe the endpoint we should pull the data from. - * - * @param apiEndpoint the apiEndpoint value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withApiEndpoint(String apiEndpoint) { - this.apiEndpoint = apiEndpoint; - return this; - } - - /** - * Get the rateLimitQps property: Defines the rate limit QPS. - * - * @return the rateLimitQps value. - */ - public Integer rateLimitQps() { - return this.rateLimitQps; - } - - /** - * Set the rateLimitQps property: Defines the rate limit QPS. - * - * @param rateLimitQps the rateLimitQps value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withRateLimitQps(Integer rateLimitQps) { - this.rateLimitQps = rateLimitQps; - return this; - } - - /** - * Get the queryWindowInMin property: The window interval we will use the pull the data. - * - * @return the queryWindowInMin value. - */ - public int queryWindowInMin() { - return this.queryWindowInMin; - } - - /** - * Set the queryWindowInMin property: The window interval we will use the pull the data. - * - * @param queryWindowInMin the queryWindowInMin value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryWindowInMin(int queryWindowInMin) { - this.queryWindowInMin = queryWindowInMin; - return this; - } - - /** - * Get the httpMethod property: The http method type we will use in the poll request, GET or POST. - * - * @return the httpMethod value. - */ - public String httpMethod() { - return this.httpMethod; - } - - /** - * Set the httpMethod property: The http method type we will use in the poll request, GET or POST. - * - * @param httpMethod the httpMethod value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withHttpMethod(String httpMethod) { - this.httpMethod = httpMethod; - return this; - } - - /** - * Get the queryTimeFormat property: The time format will be used the query events in a specific window. - * - * @return the queryTimeFormat value. - */ - public String queryTimeFormat() { - return this.queryTimeFormat; - } - - /** - * Set the queryTimeFormat property: The time format will be used the query events in a specific window. - * - * @param queryTimeFormat the queryTimeFormat value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryTimeFormat(String queryTimeFormat) { - this.queryTimeFormat = queryTimeFormat; - return this; - } - - /** - * Get the retryCount property: Describe the amount of time we should try and poll the data in case of failure. - * - * @return the retryCount value. - */ - public Integer retryCount() { - return this.retryCount; - } - - /** - * Set the retryCount property: Describe the amount of time we should try and poll the data in case of failure. - * - * @param retryCount the retryCount value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withRetryCount(Integer retryCount) { - this.retryCount = retryCount; - return this; - } - - /** - * Get the timeoutInSeconds property: The number of seconds we will consider as a request timeout. - * - * @return the timeoutInSeconds value. - */ - public Integer timeoutInSeconds() { - return this.timeoutInSeconds; - } - - /** - * Set the timeoutInSeconds property: The number of seconds we will consider as a request timeout. - * - * @param timeoutInSeconds the timeoutInSeconds value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withTimeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - return this; - } - - /** - * Get the headers property: Describe the headers sent in the poll request. - * - * @return the headers value. - */ - public Object headers() { - return this.headers; - } - - /** - * Set the headers property: Describe the headers sent in the poll request. - * - * @param headers the headers value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withHeaders(Object headers) { - this.headers = headers; - return this; - } - - /** - * Get the queryParameters property: Describe the query parameters sent in the poll request. - * - * @return the queryParameters value. - */ - public Object queryParameters() { - return this.queryParameters; - } - - /** - * Set the queryParameters property: Describe the query parameters sent in the poll request. - * - * @param queryParameters the queryParameters value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryParameters(Object queryParameters) { - this.queryParameters = queryParameters; - return this; - } - - /** - * Get the queryParametersTemplate property: For advanced scenarios for example user name/password embedded in - * nested JSON payload. - * - * @return the queryParametersTemplate value. - */ - public String queryParametersTemplate() { - return this.queryParametersTemplate; - } - - /** - * Set the queryParametersTemplate property: For advanced scenarios for example user name/password embedded in - * nested JSON payload. - * - * @param queryParametersTemplate the queryParametersTemplate value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withQueryParametersTemplate(String queryParametersTemplate) { - this.queryParametersTemplate = queryParametersTemplate; - return this; - } - - /** - * Get the startTimeAttributeName property: This will be used the query events from a start of the time window. - * - * @return the startTimeAttributeName value. - */ - public String startTimeAttributeName() { - return this.startTimeAttributeName; - } - - /** - * Set the startTimeAttributeName property: This will be used the query events from a start of the time window. - * - * @param startTimeAttributeName the startTimeAttributeName value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withStartTimeAttributeName(String startTimeAttributeName) { - this.startTimeAttributeName = startTimeAttributeName; - return this; - } - - /** - * Get the endTimeAttributeName property: This will be used the query events from the end of the time window. - * - * @return the endTimeAttributeName value. - */ - public String endTimeAttributeName() { - return this.endTimeAttributeName; - } - - /** - * Set the endTimeAttributeName property: This will be used the query events from the end of the time window. - * - * @param endTimeAttributeName the endTimeAttributeName value to set. - * @return the CodelessConnectorPollingRequestProperties object itself. - */ - public CodelessConnectorPollingRequestProperties withEndTimeAttributeName(String endTimeAttributeName) { - this.endTimeAttributeName = endTimeAttributeName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (apiEndpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property apiEndpoint in model CodelessConnectorPollingRequestProperties")); - } - if (httpMethod() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property httpMethod in model CodelessConnectorPollingRequestProperties")); - } - if (queryTimeFormat() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property queryTimeFormat in model" - + " CodelessConnectorPollingRequestProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingRequestProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java deleted file mode 100644 index 561f409ee82f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the response from the external server. */ -@Fluent -public final class CodelessConnectorPollingResponseProperties { - /* - * Describes the path we should extract the data in the response - */ - @JsonProperty(value = "eventsJsonPaths", required = true) - private List eventsJsonPaths; - - /* - * Describes the path we should extract the status code in the response - */ - @JsonProperty(value = "successStatusJsonPath") - private String successStatusJsonPath; - - /* - * Describes the path we should extract the status value in the response - */ - @JsonProperty(value = "successStatusValue") - private String successStatusValue; - - /* - * Describes if the data in the response is Gzip - */ - @JsonProperty(value = "isGzipCompressed") - private Boolean isGzipCompressed; - - /** - * Get the eventsJsonPaths property: Describes the path we should extract the data in the response. - * - * @return the eventsJsonPaths value. - */ - public List eventsJsonPaths() { - return this.eventsJsonPaths; - } - - /** - * Set the eventsJsonPaths property: Describes the path we should extract the data in the response. - * - * @param eventsJsonPaths the eventsJsonPaths value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withEventsJsonPaths(List eventsJsonPaths) { - this.eventsJsonPaths = eventsJsonPaths; - return this; - } - - /** - * Get the successStatusJsonPath property: Describes the path we should extract the status code in the response. - * - * @return the successStatusJsonPath value. - */ - public String successStatusJsonPath() { - return this.successStatusJsonPath; - } - - /** - * Set the successStatusJsonPath property: Describes the path we should extract the status code in the response. - * - * @param successStatusJsonPath the successStatusJsonPath value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withSuccessStatusJsonPath(String successStatusJsonPath) { - this.successStatusJsonPath = successStatusJsonPath; - return this; - } - - /** - * Get the successStatusValue property: Describes the path we should extract the status value in the response. - * - * @return the successStatusValue value. - */ - public String successStatusValue() { - return this.successStatusValue; - } - - /** - * Set the successStatusValue property: Describes the path we should extract the status value in the response. - * - * @param successStatusValue the successStatusValue value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withSuccessStatusValue(String successStatusValue) { - this.successStatusValue = successStatusValue; - return this; - } - - /** - * Get the isGzipCompressed property: Describes if the data in the response is Gzip. - * - * @return the isGzipCompressed value. - */ - public Boolean isGzipCompressed() { - return this.isGzipCompressed; - } - - /** - * Set the isGzipCompressed property: Describes if the data in the response is Gzip. - * - * @param isGzipCompressed the isGzipCompressed value to set. - * @return the CodelessConnectorPollingResponseProperties object itself. - */ - public CodelessConnectorPollingResponseProperties withIsGzipCompressed(Boolean isGzipCompressed) { - this.isGzipCompressed = isGzipCompressed; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (eventsJsonPaths() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property eventsJsonPaths in model" - + " CodelessConnectorPollingResponseProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessConnectorPollingResponseProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java deleted file mode 100644 index bf0ae2f7d8b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Config to describe the instructions blade. */ -@Fluent -public final class CodelessUiConnectorConfigProperties { - /* - * Connector blade title - */ - @JsonProperty(value = "title", required = true) - private String title; - - /* - * Connector publisher name - */ - @JsonProperty(value = "publisher", required = true) - private String publisher; - - /* - * Connector description - */ - @JsonProperty(value = "descriptionMarkdown", required = true) - private String descriptionMarkdown; - - /* - * An optional custom image to be used when displaying the connector within Azure Sentinel's connector's gallery - */ - @JsonProperty(value = "customImage") - private String customImage; - - /* - * Name of the table the connector will insert the data to - */ - @JsonProperty(value = "graphQueriesTableName", required = true) - private String graphQueriesTableName; - - /* - * The graph query to show the current data status - */ - @JsonProperty(value = "graphQueries", required = true) - private List graphQueries; - - /* - * The sample queries for the connector - */ - @JsonProperty(value = "sampleQueries", required = true) - private List sampleQueries; - - /* - * Data types to check for last data received - */ - @JsonProperty(value = "dataTypes", required = true) - private List dataTypes; - - /* - * Define the way the connector check connectivity - */ - @JsonProperty(value = "connectivityCriteria", required = true) - private List connectivityCriteria; - - /* - * Connector Availability Status - */ - @JsonProperty(value = "availability", required = true) - private Availability availability; - - /* - * Permissions required for the connector - */ - @JsonProperty(value = "permissions", required = true) - private Permissions permissions; - - /* - * Instruction steps to enable the connector - */ - @JsonProperty(value = "instructionSteps", required = true) - private List instructionSteps; - - /** - * Get the title property: Connector blade title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Connector blade title. - * - * @param title the title value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the publisher property: Connector publisher name. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: Connector publisher name. - * - * @param publisher the publisher value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the descriptionMarkdown property: Connector description. - * - * @return the descriptionMarkdown value. - */ - public String descriptionMarkdown() { - return this.descriptionMarkdown; - } - - /** - * Set the descriptionMarkdown property: Connector description. - * - * @param descriptionMarkdown the descriptionMarkdown value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withDescriptionMarkdown(String descriptionMarkdown) { - this.descriptionMarkdown = descriptionMarkdown; - return this; - } - - /** - * Get the customImage property: An optional custom image to be used when displaying the connector within Azure - * Sentinel's connector's gallery. - * - * @return the customImage value. - */ - public String customImage() { - return this.customImage; - } - - /** - * Set the customImage property: An optional custom image to be used when displaying the connector within Azure - * Sentinel's connector's gallery. - * - * @param customImage the customImage value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withCustomImage(String customImage) { - this.customImage = customImage; - return this; - } - - /** - * Get the graphQueriesTableName property: Name of the table the connector will insert the data to. - * - * @return the graphQueriesTableName value. - */ - public String graphQueriesTableName() { - return this.graphQueriesTableName; - } - - /** - * Set the graphQueriesTableName property: Name of the table the connector will insert the data to. - * - * @param graphQueriesTableName the graphQueriesTableName value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withGraphQueriesTableName(String graphQueriesTableName) { - this.graphQueriesTableName = graphQueriesTableName; - return this; - } - - /** - * Get the graphQueries property: The graph query to show the current data status. - * - * @return the graphQueries value. - */ - public List graphQueries() { - return this.graphQueries; - } - - /** - * Set the graphQueries property: The graph query to show the current data status. - * - * @param graphQueries the graphQueries value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withGraphQueries( - List graphQueries) { - this.graphQueries = graphQueries; - return this; - } - - /** - * Get the sampleQueries property: The sample queries for the connector. - * - * @return the sampleQueries value. - */ - public List sampleQueries() { - return this.sampleQueries; - } - - /** - * Set the sampleQueries property: The sample queries for the connector. - * - * @param sampleQueries the sampleQueries value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withSampleQueries( - List sampleQueries) { - this.sampleQueries = sampleQueries; - return this; - } - - /** - * Get the dataTypes property: Data types to check for last data received. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: Data types to check for last data received. - * - * @param dataTypes the dataTypes value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withDataTypes( - List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the connectivityCriteria property: Define the way the connector check connectivity. - * - * @return the connectivityCriteria value. - */ - public List connectivityCriteria() { - return this.connectivityCriteria; - } - - /** - * Set the connectivityCriteria property: Define the way the connector check connectivity. - * - * @param connectivityCriteria the connectivityCriteria value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withConnectivityCriteria( - List connectivityCriteria) { - this.connectivityCriteria = connectivityCriteria; - return this; - } - - /** - * Get the availability property: Connector Availability Status. - * - * @return the availability value. - */ - public Availability availability() { - return this.availability; - } - - /** - * Set the availability property: Connector Availability Status. - * - * @param availability the availability value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withAvailability(Availability availability) { - this.availability = availability; - return this; - } - - /** - * Get the permissions property: Permissions required for the connector. - * - * @return the permissions value. - */ - public Permissions permissions() { - return this.permissions; - } - - /** - * Set the permissions property: Permissions required for the connector. - * - * @param permissions the permissions value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withPermissions(Permissions permissions) { - this.permissions = permissions; - return this; - } - - /** - * Get the instructionSteps property: Instruction steps to enable the connector. - * - * @return the instructionSteps value. - */ - public List instructionSteps() { - return this.instructionSteps; - } - - /** - * Set the instructionSteps property: Instruction steps to enable the connector. - * - * @param instructionSteps the instructionSteps value to set. - * @return the CodelessUiConnectorConfigProperties object itself. - */ - public CodelessUiConnectorConfigProperties withInstructionSteps( - List instructionSteps) { - this.instructionSteps = instructionSteps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property title in model CodelessUiConnectorConfigProperties")); - } - if (publisher() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property publisher in model CodelessUiConnectorConfigProperties")); - } - if (descriptionMarkdown() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property descriptionMarkdown in model CodelessUiConnectorConfigProperties")); - } - if (graphQueriesTableName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property graphQueriesTableName in model" - + " CodelessUiConnectorConfigProperties")); - } - if (graphQueries() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property graphQueries in model CodelessUiConnectorConfigProperties")); - } else { - graphQueries().forEach(e -> e.validate()); - } - if (sampleQueries() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sampleQueries in model CodelessUiConnectorConfigProperties")); - } else { - sampleQueries().forEach(e -> e.validate()); - } - if (dataTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataTypes in model CodelessUiConnectorConfigProperties")); - } else { - dataTypes().forEach(e -> e.validate()); - } - if (connectivityCriteria() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property connectivityCriteria in model CodelessUiConnectorConfigProperties")); - } else { - connectivityCriteria().forEach(e -> e.validate()); - } - if (availability() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property availability in model CodelessUiConnectorConfigProperties")); - } else { - availability().validate(); - } - if (permissions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property permissions in model CodelessUiConnectorConfigProperties")); - } else { - permissions().validate(); - } - if (instructionSteps() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property instructionSteps in model CodelessUiConnectorConfigProperties")); - } else { - instructionSteps().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodelessUiConnectorConfigProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java deleted file mode 100644 index c57fe3ddde43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java +++ /dev/null @@ -1,36 +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 java.util.List; - -/** The CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem extends ConnectivityCriteria { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withType(ConnectivityType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withValue(List value) { - super.withValue(value); - 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/CodelessUiConnectorConfigPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java deleted file mode 100644 index 1f9a8f78eb43..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java +++ /dev/null @@ -1,35 +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; - -/** The CodelessUiConnectorConfigPropertiesDataTypesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesDataTypesItem extends LastDataReceivedDataType { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesDataTypesItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesDataTypesItem withLastDataReceivedQuery(String lastDataReceivedQuery) { - super.withLastDataReceivedQuery(lastDataReceivedQuery); - 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/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java deleted file mode 100644 index 80ff447db0ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java +++ /dev/null @@ -1,42 +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; - -/** The CodelessUiConnectorConfigPropertiesGraphQueriesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesGraphQueriesItem extends GraphQueries { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withMetricName(String metricName) { - super.withMetricName(metricName); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withLegend(String legend) { - super.withLegend(legend); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesGraphQueriesItem withBaseQuery(String baseQuery) { - super.withBaseQuery(baseQuery); - 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/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java deleted file mode 100644 index 187727984833..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java +++ /dev/null @@ -1,44 +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 java.util.List; - -/** The CodelessUiConnectorConfigPropertiesInstructionStepsItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesInstructionStepsItem extends InstructionSteps { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withTitle(String title) { - super.withTitle(title); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesInstructionStepsItem withInstructions( - List instructions) { - super.withInstructions(instructions); - 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/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java deleted file mode 100644 index 288bd8d550f8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java +++ /dev/null @@ -1,35 +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; - -/** The CodelessUiConnectorConfigPropertiesSampleQueriesItem model. */ -@Fluent -public final class CodelessUiConnectorConfigPropertiesSampleQueriesItem extends SampleQueries { - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesSampleQueriesItem withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiConnectorConfigPropertiesSampleQueriesItem withQuery(String query) { - super.withQuery(query); - 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/CodelessUiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java deleted file mode 100644 index 06cd156687bb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java +++ /dev/null @@ -1,76 +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.resourcemanager.securityinsights.fluent.models.CodelessParameters; -import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Codeless UI data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("GenericUI") -@Fluent -public final class CodelessUiDataConnector extends DataConnectorInner { - /* - * Codeless UI data connector properties - */ - @JsonProperty(value = "properties") - private CodelessParameters innerProperties; - - /** - * Get the innerProperties property: Codeless UI data connector properties. - * - * @return the innerProperties value. - */ - private CodelessParameters innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public CodelessUiDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the connectorUiConfig property: Config to describe the instructions blade. - * - * @return the connectorUiConfig value. - */ - public CodelessUiConnectorConfigProperties connectorUiConfig() { - return this.innerProperties() == null ? null : this.innerProperties().connectorUiConfig(); - } - - /** - * Set the connectorUiConfig property: Config to describe the instructions blade. - * - * @param connectorUiConfig the connectorUiConfig value to set. - * @return the CodelessUiDataConnector object itself. - */ - public CodelessUiDataConnector withConnectorUiConfig(CodelessUiConnectorConfigProperties connectorUiConfig) { - if (this.innerProperties() == null) { - this.innerProperties = new CodelessParameters(); - } - this.innerProperties().withConnectorUiConfig(connectorUiConfig); - 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/ConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java index 2e471ac418a2..c813317f7cc5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java @@ -13,18 +13,6 @@ public final class ConditionType extends ExpandableStringEnum { /** Static value Property for ConditionType. */ public static final ConditionType PROPERTY = fromString("Property"); - /** Static value PropertyArray for ConditionType. */ - public static final ConditionType PROPERTY_ARRAY = fromString("PropertyArray"); - - /** Static value PropertyChanged for ConditionType. */ - public static final ConditionType PROPERTY_CHANGED = fromString("PropertyChanged"); - - /** Static value PropertyArrayChanged for ConditionType. */ - public static final ConditionType PROPERTY_ARRAY_CHANGED = fromString("PropertyArrayChanged"); - - /** Static value Boolean for ConditionType. */ - public static final ConditionType BOOLEAN = fromString("Boolean"); - /** * Creates or finds a ConditionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java deleted file mode 100644 index 689962ec3325..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectAuthKind.java +++ /dev/null @@ -1,41 +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; - -/** The authentication kind used to poll the data. */ -public final class ConnectAuthKind extends ExpandableStringEnum { - /** Static value Basic for ConnectAuthKind. */ - public static final ConnectAuthKind BASIC = fromString("Basic"); - - /** Static value OAuth2 for ConnectAuthKind. */ - public static final ConnectAuthKind OAUTH2 = fromString("OAuth2"); - - /** Static value APIKey for ConnectAuthKind. */ - public static final ConnectAuthKind APIKEY = fromString("APIKey"); - - /** - * Creates or finds a ConnectAuthKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectAuthKind. - */ - @JsonCreator - public static ConnectAuthKind fromString(String name) { - return fromString(name, ConnectAuthKind.class); - } - - /** - * Gets known ConnectAuthKind values. - * - * @return known ConnectAuthKind values. - */ - public static Collection values() { - return values(ConnectAuthKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java deleted file mode 100644 index 655facb3559a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Expansion result connected entities. */ -@Fluent -public final class ConnectedEntity { - /* - * Entity Id of the connected entity - */ - @JsonProperty(value = "targetEntityId") - private String targetEntityId; - - /* - * key-value pairs for a connected entity mapping - */ - @JsonProperty(value = "additionalData") - private Object additionalData; - - /** - * Get the targetEntityId property: Entity Id of the connected entity. - * - * @return the targetEntityId value. - */ - public String targetEntityId() { - return this.targetEntityId; - } - - /** - * Set the targetEntityId property: Entity Id of the connected entity. - * - * @param targetEntityId the targetEntityId value to set. - * @return the ConnectedEntity object itself. - */ - public ConnectedEntity withTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Get the additionalData property: key-value pairs for a connected entity mapping. - * - * @return the additionalData value. - */ - public Object additionalData() { - return this.additionalData; - } - - /** - * Set the additionalData property: key-value pairs for a connected entity mapping. - * - * @param additionalData the additionalData value to set. - * @return the ConnectedEntity object itself. - */ - public ConnectedEntity withAdditionalData(Object additionalData) { - this.additionalData = additionalData; - 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/ConnectivityCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java deleted file mode 100644 index da5f0724d422..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java +++ /dev/null @@ -1,73 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Setting for the connector check connectivity. */ -@Fluent -public class ConnectivityCriteria { - /* - * type of connectivity - */ - @JsonProperty(value = "type") - private ConnectivityType type; - - /* - * Queries for checking connectivity - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the type property: type of connectivity. - * - * @return the type value. - */ - public ConnectivityType type() { - return this.type; - } - - /** - * Set the type property: type of connectivity. - * - * @param type the type value to set. - * @return the ConnectivityCriteria object itself. - */ - public ConnectivityCriteria withType(ConnectivityType type) { - this.type = type; - return this; - } - - /** - * Get the value property: Queries for checking connectivity. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Queries for checking connectivity. - * - * @param value the value value to set. - * @return the ConnectivityCriteria object itself. - */ - public ConnectivityCriteria withValue(List 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/ConnectivityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java deleted file mode 100644 index d3298e56cbd9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java +++ /dev/null @@ -1,35 +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; - -/** type of connectivity. */ -public final class ConnectivityType extends ExpandableStringEnum { - /** Static value IsConnectedQuery for ConnectivityType. */ - public static final ConnectivityType IS_CONNECTED_QUERY = fromString("IsConnectedQuery"); - - /** - * Creates or finds a ConnectivityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectivityType. - */ - @JsonCreator - public static ConnectivityType fromString(String name) { - return fromString(name, ConnectivityType.class); - } - - /** - * Gets known ConnectivityType values. - * - * @return known ConnectivityType values. - */ - public static Collection values() { - return values(ConnectivityType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java deleted file mode 100644 index c710b1b251e2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectorInstructionModelBase.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Instruction step details. */ -@Fluent -public class ConnectorInstructionModelBase { - /* - * The parameters for the setting - */ - @JsonProperty(value = "parameters") - private Object parameters; - - /* - * The kind of the setting - */ - @JsonProperty(value = "type", required = true) - private SettingType type; - - /** - * Get the parameters property: The parameters for the setting. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters property: The parameters for the setting. - * - * @param parameters the parameters value to set. - * @return the ConnectorInstructionModelBase object itself. - */ - public ConnectorInstructionModelBase withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the type property: The kind of the setting. - * - * @return the type value. - */ - public SettingType type() { - return this.type; - } - - /** - * Set the type property: The kind of the setting. - * - * @param type the type value to set. - * @return the ConnectorInstructionModelBase object itself. - */ - public ConnectorInstructionModelBase withType(SettingType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property type in model ConnectorInstructionModelBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectorInstructionModelBase.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java deleted file mode 100644 index 32293661fa1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Constant88.java +++ /dev/null @@ -1,48 +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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for Constant88. */ -public enum Constant88 { - /** Enum value Activity. */ - ACTIVITY("Activity"); - - /** The actual serialized value for a Constant88 instance. */ - private final String value; - - Constant88(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Constant88 instance. - * - * @param value the serialized value to parse. - * @return the parsed Constant88 object, or null if unable to parse. - */ - @JsonCreator - public static Constant88 fromString(String value) { - if (value == null) { - return null; - } - Constant88[] items = Constant88.values(); - for (Constant88 item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java deleted file mode 100644 index 55e4aa0cd259..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentPathMap.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The mapping of content type to a repo path. */ -@Fluent -public final class ContentPathMap { - /* - * Content type. - */ - @JsonProperty(value = "contentType") - private ContentType contentType; - - /* - * The path to the content. - */ - @JsonProperty(value = "path") - private String path; - - /** - * Get the contentType property: Content type. - * - * @return the contentType value. - */ - public ContentType contentType() { - return this.contentType; - } - - /** - * Set the contentType property: Content type. - * - * @param contentType the contentType value to set. - * @return the ContentPathMap object itself. - */ - public ContentPathMap withContentType(ContentType contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the path property: The path to the content. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path to the content. - * - * @param path the path value to set. - * @return the ContentPathMap object itself. - */ - public ContentPathMap withPath(String path) { - this.path = path; - 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/ContentType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java deleted file mode 100644 index d9976250f875..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ContentType.java +++ /dev/null @@ -1,38 +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; - -/** The content type of a source control path. */ -public final class ContentType extends ExpandableStringEnum { - /** Static value AnalyticRule for ContentType. */ - public static final ContentType ANALYTIC_RULE = fromString("AnalyticRule"); - - /** Static value Workbook for ContentType. */ - public static final ContentType WORKBOOK = fromString("Workbook"); - - /** - * Creates or finds a ContentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContentType. - */ - @JsonCreator - public static ContentType fromString(String name) { - return fromString(name, ContentType.class); - } - - /** - * Gets known ContentType values. - * - * @return known ContentType values. - */ - public static Collection values() { - return values(ContentType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java deleted file mode 100644 index 76169a7542b0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java +++ /dev/null @@ -1,38 +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.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Specific entity query that supports put requests. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = CustomEntityQuery.class) -@JsonTypeName("CustomEntityQuery") -@JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityCustomEntityQuery.class)}) -@Fluent -public class CustomEntityQuery extends ResourceWithEtag { - /** {@inheritDoc} */ - @Override - public CustomEntityQuery withEtag(String etag) { - super.withEtag(etag); - 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/CustomEntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java deleted file mode 100644 index b0e8395c6c5f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java +++ /dev/null @@ -1,35 +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; - -/** The kind of the entity query that supports put request. */ -public final class CustomEntityQueryKind extends ExpandableStringEnum { - /** Static value Activity for CustomEntityQueryKind. */ - public static final CustomEntityQueryKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a CustomEntityQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding CustomEntityQueryKind. - */ - @JsonCreator - public static CustomEntityQueryKind fromString(String name) { - return fromString(name, CustomEntityQueryKind.class); - } - - /** - * Gets known CustomEntityQueryKind values. - * - * @return known CustomEntityQueryKind values. - */ - public static Collection values() { - return values(CustomEntityQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java deleted file mode 100644 index 9507f46b98de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Customs.java +++ /dev/null @@ -1,35 +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; - -/** Customs permissions required for the connector. */ -@Fluent -public class Customs extends CustomsPermission { - /** {@inheritDoc} */ - @Override - public Customs withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public Customs withDescription(String description) { - super.withDescription(description); - 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/CustomsPermission.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java deleted file mode 100644 index a7ade225346b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomsPermission.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Customs permissions required for the connector. */ -@Fluent -public class CustomsPermission { - /* - * Customs permissions name - */ - @JsonProperty(value = "name") - private String name; - - /* - * Customs permissions description - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the name property: Customs permissions name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Customs permissions name. - * - * @param name the name value to set. - * @return the CustomsPermission object itself. - */ - public CustomsPermission withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Customs permissions description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Customs permissions description. - * - * @param description the description value to set. - * @return the CustomsPermission object itself. - */ - public CustomsPermission withDescription(String description) { - this.description = description; - 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/DataConnectorAuthorizationState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorAuthorizationState.java deleted file mode 100644 index 52380b5cedc2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorAuthorizationState.java +++ /dev/null @@ -1,38 +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; - -/** Describes the state of user's authorization for a connector kind. */ -public final class DataConnectorAuthorizationState extends ExpandableStringEnum { - /** Static value Valid for DataConnectorAuthorizationState. */ - public static final DataConnectorAuthorizationState VALID = fromString("Valid"); - - /** Static value Invalid for DataConnectorAuthorizationState. */ - public static final DataConnectorAuthorizationState INVALID = fromString("Invalid"); - - /** - * Creates or finds a DataConnectorAuthorizationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataConnectorAuthorizationState. - */ - @JsonCreator - public static DataConnectorAuthorizationState fromString(String name) { - return fromString(name, DataConnectorAuthorizationState.class); - } - - /** - * Gets known DataConnectorAuthorizationState values. - * - * @return known DataConnectorAuthorizationState values. - */ - public static Collection values() { - return values(DataConnectorAuthorizationState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java deleted file mode 100644 index 331014e42fa0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorConnectBody.java +++ /dev/null @@ -1,315 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents Codeless API Polling data connector. */ -@Fluent -public final class DataConnectorConnectBody { - /* - * The authentication kind used to poll the data - */ - @JsonProperty(value = "kind") - private ConnectAuthKind kind; - - /* - * The API key of the audit server. - */ - @JsonProperty(value = "apiKey") - private String apiKey; - - /* - * Used in v2 logs connector. Represents the data collection ingestion endpoint in log analytics. - */ - @JsonProperty(value = "dataCollectionEndpoint") - private String dataCollectionEndpoint; - - /* - * Used in v2 logs connector. The data collection rule immutable id, the rule defines the transformation and data - * destination. - */ - @JsonProperty(value = "dataCollectionRuleImmutableId") - private String dataCollectionRuleImmutableId; - - /* - * Used in v2 logs connector. The stream we are sending the data to, this is the name of the streamDeclarations - * defined in the DCR. - */ - @JsonProperty(value = "outputStream") - private String outputStream; - - /* - * The client secret of the OAuth 2.0 application. - */ - @JsonProperty(value = "clientSecret") - private String clientSecret; - - /* - * The client id of the OAuth 2.0 application. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /* - * The authorization code used in OAuth 2.0 code flow to issue a token. - */ - @JsonProperty(value = "authorizationCode") - private String authorizationCode; - - /* - * The user name in the audit log server. - */ - @JsonProperty(value = "userName") - private String username; - - /* - * The user password in the audit log server. - */ - @JsonProperty(value = "password") - private String password; - - /* - * The requestConfigUserInputValues property. - */ - @JsonProperty(value = "requestConfigUserInputValues") - private List requestConfigUserInputValues; - - /** - * Get the kind property: The authentication kind used to poll the data. - * - * @return the kind value. - */ - public ConnectAuthKind kind() { - return this.kind; - } - - /** - * Set the kind property: The authentication kind used to poll the data. - * - * @param kind the kind value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withKind(ConnectAuthKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the apiKey property: The API key of the audit server. - * - * @return the apiKey value. - */ - public String apiKey() { - return this.apiKey; - } - - /** - * Set the apiKey property: The API key of the audit server. - * - * @param apiKey the apiKey value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withApiKey(String apiKey) { - this.apiKey = apiKey; - return this; - } - - /** - * Get the dataCollectionEndpoint property: Used in v2 logs connector. Represents the data collection ingestion - * endpoint in log analytics. - * - * @return the dataCollectionEndpoint value. - */ - public String dataCollectionEndpoint() { - return this.dataCollectionEndpoint; - } - - /** - * Set the dataCollectionEndpoint property: Used in v2 logs connector. Represents the data collection ingestion - * endpoint in log analytics. - * - * @param dataCollectionEndpoint the dataCollectionEndpoint value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withDataCollectionEndpoint(String dataCollectionEndpoint) { - this.dataCollectionEndpoint = dataCollectionEndpoint; - return this; - } - - /** - * Get the dataCollectionRuleImmutableId property: Used in v2 logs connector. The data collection rule immutable id, - * the rule defines the transformation and data destination. - * - * @return the dataCollectionRuleImmutableId value. - */ - public String dataCollectionRuleImmutableId() { - return this.dataCollectionRuleImmutableId; - } - - /** - * Set the dataCollectionRuleImmutableId property: Used in v2 logs connector. The data collection rule immutable id, - * the rule defines the transformation and data destination. - * - * @param dataCollectionRuleImmutableId the dataCollectionRuleImmutableId value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withDataCollectionRuleImmutableId(String dataCollectionRuleImmutableId) { - this.dataCollectionRuleImmutableId = dataCollectionRuleImmutableId; - return this; - } - - /** - * Get the outputStream property: Used in v2 logs connector. The stream we are sending the data to, this is the name - * of the streamDeclarations defined in the DCR. - * - * @return the outputStream value. - */ - public String outputStream() { - return this.outputStream; - } - - /** - * Set the outputStream property: Used in v2 logs connector. The stream we are sending the data to, this is the name - * of the streamDeclarations defined in the DCR. - * - * @param outputStream the outputStream value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withOutputStream(String outputStream) { - this.outputStream = outputStream; - return this; - } - - /** - * Get the clientSecret property: The client secret of the OAuth 2.0 application. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: The client secret of the OAuth 2.0 application. - * - * @param clientSecret the clientSecret value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the clientId property: The client id of the OAuth 2.0 application. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The client id of the OAuth 2.0 application. - * - * @param clientId the clientId value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the authorizationCode property: The authorization code used in OAuth 2.0 code flow to issue a token. - * - * @return the authorizationCode value. - */ - public String authorizationCode() { - return this.authorizationCode; - } - - /** - * Set the authorizationCode property: The authorization code used in OAuth 2.0 code flow to issue a token. - * - * @param authorizationCode the authorizationCode value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withAuthorizationCode(String authorizationCode) { - this.authorizationCode = authorizationCode; - return this; - } - - /** - * Get the username property: The user name in the audit log server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The user name in the audit log server. - * - * @param username the username value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The user password in the audit log server. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The user password in the audit log server. - * - * @param password the password value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the requestConfigUserInputValues property: The requestConfigUserInputValues property. - * - * @return the requestConfigUserInputValues value. - */ - public List requestConfigUserInputValues() { - return this.requestConfigUserInputValues; - } - - /** - * Set the requestConfigUserInputValues property: The requestConfigUserInputValues property. - * - * @param requestConfigUserInputValues the requestConfigUserInputValues value to set. - * @return the DataConnectorConnectBody object itself. - */ - public DataConnectorConnectBody withRequestConfigUserInputValues(List requestConfigUserInputValues) { - this.requestConfigUserInputValues = requestConfigUserInputValues; - 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/DataConnectorDataTypeCommon.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java index 936cd58c9114..36cf764ef9b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** Common field for data type in data connectors. */ @@ -14,9 +13,13 @@ public class DataConnectorDataTypeCommon { /* * Describe whether this data type connection is enabled or not. */ - @JsonProperty(value = "state", required = true) + @JsonProperty(value = "state") private DataTypeState state; + /** Creates an instance of DataConnectorDataTypeCommon class. */ + public DataConnectorDataTypeCommon() { + } + /** * Get the state property: Describe whether this data type connection is enabled or not. * @@ -43,13 +46,5 @@ public DataConnectorDataTypeCommon withState(DataTypeState state) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (state() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model DataConnectorDataTypeCommon")); - } } - - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorDataTypeCommon.class); } 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 b140a12dfff7..bb6e324c2a52 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 @@ -22,30 +22,12 @@ public final class DataConnectorKind extends ExpandableStringEnum { - /** Static value Valid for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState VALID = fromString("Valid"); - - /** Static value Invalid for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState INVALID = fromString("Invalid"); - - /** Static value Unknown for DataConnectorLicenseState. */ - public static final DataConnectorLicenseState UNKNOWN = fromString("Unknown"); - - /** - * Creates or finds a DataConnectorLicenseState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataConnectorLicenseState. - */ - @JsonCreator - public static DataConnectorLicenseState fromString(String name) { - return fromString(name, DataConnectorLicenseState.class); - } - - /** - * Gets known DataConnectorLicenseState values. - * - * @return known DataConnectorLicenseState values. - */ - public static Collection values() { - return values(DataConnectorLicenseState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java index 623d64d420bd..1b61de6441a5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorList.java @@ -25,6 +25,10 @@ public final class DataConnectorList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of DataConnectorList class. */ + public DataConnectorList() { + } + /** * Get the nextLink property: URL to fetch the next set of data connectors. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java deleted file mode 100644 index 96aa7a63791f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorRequirementsState.java +++ /dev/null @@ -1,32 +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.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner; - -/** An immutable client-side representation of DataConnectorRequirementsState. */ -public interface DataConnectorRequirementsState { - /** - * Gets the authorizationState property: Authorization state for this connector. - * - * @return the authorizationState value. - */ - DataConnectorAuthorizationState authorizationState(); - - /** - * Gets the licenseState property: License state for this connector. - * - * @return the licenseState value. - */ - DataConnectorLicenseState licenseState(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorRequirementsStateInner - * object. - * - * @return the inner object. - */ - DataConnectorRequirementsStateInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java deleted file mode 100644 index 36d4914ce98b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties data connector on tenant level. */ -@Fluent -public class DataConnectorTenantId { - /* - * The tenant id to connect to, and get the data from. - */ - @JsonProperty(value = "tenantId", required = true) - private String tenantId; - - /** - * Get the tenantId property: The tenant id to connect to, and get the data from. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.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 DataConnectorTenantId object itself. - */ - public DataConnectorTenantId withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model DataConnectorTenantId")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataConnectorTenantId.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java index e0bbbf5d0334..93fbfed69f7b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java @@ -16,6 +16,10 @@ public class DataConnectorWithAlertsProperties { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of DataConnectorWithAlertsProperties class. */ + public DataConnectorWithAlertsProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java index f80628152117..36a1a1df46a6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java @@ -36,19 +36,6 @@ public interface DataConnectors { */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. - */ - DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -65,19 +52,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ - DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -100,16 +85,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -127,63 +115,14 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); - - /** - * Connects a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @param connectBody The data connector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context); - - /** - * Disconnect a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); - - /** - * Disconnect a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java deleted file mode 100644 index 57317f6ffc3c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java +++ /dev/null @@ -1,47 +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.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Data connector requirements properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = DataConnectorsCheckRequirements.class) -@JsonTypeName("DataConnectorsCheckRequirements") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureActiveDirectory", value = AadCheckRequirements.class), - @JsonSubTypes.Type(name = "AzureAdvancedThreatProtection", value = AatpCheckRequirements.class), - @JsonSubTypes.Type(name = "AzureSecurityCenter", value = AscCheckRequirements.class), - @JsonSubTypes.Type(name = "AmazonWebServicesCloudTrail", value = AwsCloudTrailCheckRequirements.class), - @JsonSubTypes.Type(name = "AmazonWebServicesS3", value = AwsS3CheckRequirements.class), - @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365CheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasCheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftDefenderAdvancedThreatProtection", value = MdatpCheckRequirements.class), - @JsonSubTypes.Type(name = "MicrosoftThreatIntelligence", value = MstiCheckRequirements.class), - @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 = "IOT", value = IoTCheckRequirements.class) -}) -@Immutable -public class DataConnectorsCheckRequirements { - /** - * 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/DataConnectorsCheckRequirementsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java deleted file mode 100644 index 6524d59b3515..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java +++ /dev/null @@ -1,45 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of DataConnectorsCheckRequirementsOperations. */ -public interface DataConnectorsCheckRequirementsOperations { - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. - */ - DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); - - /** - * Get requirements state for a data connector type. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. - */ - Response postWithResponse( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java deleted file mode 100644 index 419ceca40540..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java +++ /dev/null @@ -1,46 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The data type definition. */ -@Fluent -public final class DataTypeDefinitions { - /* - * The data type name - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the dataType property: The data type name. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: The data type name. - * - * @param dataType the dataType value to set. - * @return the DataTypeDefinitions object itself. - */ - public DataTypeDefinitions withDataType(String dataType) { - this.dataType = dataType; - 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/DeleteStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java deleted file mode 100644 index f0501a0e1fbc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java +++ /dev/null @@ -1,41 +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; - -/** Indicates whether the file was deleted from the storage account. */ -public final class DeleteStatus extends ExpandableStringEnum { - /** Static value Deleted for DeleteStatus. */ - public static final DeleteStatus DELETED = fromString("Deleted"); - - /** Static value NotDeleted for DeleteStatus. */ - public static final DeleteStatus NOT_DELETED = fromString("NotDeleted"); - - /** Static value Unspecified for DeleteStatus. */ - public static final DeleteStatus UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a DeleteStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeleteStatus. - */ - @JsonCreator - public static DeleteStatus fromString(String name) { - return fromString(name, DeleteStatus.class); - } - - /** - * Gets known DeleteStatus values. - * - * @return known DeleteStatus values. - */ - public static Collection values() { - return values(DeleteStatus.class); - } -} 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 deleted file mode 100644 index f500a22a553e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java +++ /dev/null @@ -1,151 +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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Description about a deployment. */ -@Fluent -public final class Deployment { - /* - * 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 deleted file mode 100644 index 0cfc63e3b5a8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java +++ /dev/null @@ -1,41 +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; - -/** Status while trying to fetch the deployment information. */ -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); - } - - /** - * Gets known DeploymentFetchStatus values. - * - * @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 deleted file mode 100644 index 6f8b486f4c2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentInfo.java +++ /dev/null @@ -1,101 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Information regarding a deployment. */ -@Fluent -public final class DeploymentInfo { - /* - * 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 deleted file mode 100644 index b9bc8016e8c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentResult.java +++ /dev/null @@ -1,41 +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; - -/** Status while trying to fetch the deployment information. */ -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); - } - - /** - * Gets known DeploymentResult values. - * - * @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 deleted file mode 100644 index 770b490ee8bc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentState.java +++ /dev/null @@ -1,44 +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; - -/** The current state of the deployment. */ -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); - } - - /** - * Gets known DeploymentState values. - * - * @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/DeviceImportance.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java deleted file mode 100644 index 2a78da582b0b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java +++ /dev/null @@ -1,44 +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; - -/** Device importance, determines if the device classified as 'crown jewel'. */ -public final class DeviceImportance extends ExpandableStringEnum { - /** Static value Unknown for DeviceImportance. */ - public static final DeviceImportance UNKNOWN = fromString("Unknown"); - - /** Static value Low for DeviceImportance. */ - public static final DeviceImportance LOW = fromString("Low"); - - /** Static value Normal for DeviceImportance. */ - public static final DeviceImportance NORMAL = fromString("Normal"); - - /** Static value High for DeviceImportance. */ - public static final DeviceImportance HIGH = fromString("High"); - - /** - * Creates or finds a DeviceImportance from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeviceImportance. - */ - @JsonCreator - public static DeviceImportance fromString(String name) { - return fromString(name, DeviceImportance.class); - } - - /** - * Gets known DeviceImportance values. - * - * @return known DeviceImportance values. - */ - public static Collection values() { - return values(DeviceImportance.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java index ed3969162e66..e54f9356482b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DnsEntity.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.DnsEntityProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,14 +15,18 @@ /** Represents a dns entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("DnsResolution") -@Fluent -public final class DnsEntity extends EntityInner { +@Immutable +public final class DnsEntity extends Entity { /* * Dns entity properties */ @JsonProperty(value = "properties") private DnsEntityProperties innerProperties; + /** Creates an instance of DnsEntity class. */ + public DnsEntity() { + } + /** * Get the innerProperties property: Dns entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java deleted file mode 100644 index 56380b6e2f98..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DomainWhois.java +++ /dev/null @@ -1,36 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of DomainWhois. */ -public interface DomainWhois { - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. - */ - EnrichmentDomainWhois get(String resourceGroupName, String domain); - - /** - * Get whois information for a single domain name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String domain, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java deleted file mode 100644 index eaa3c125f567..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.Dynamics365CheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Dynamics365 requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Dynamics365") -@Fluent -public final class Dynamics365CheckRequirements extends DataConnectorsCheckRequirements { - /* - * Dynamics365 requirements check properties. - */ - @JsonProperty(value = "properties") - private Dynamics365CheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Dynamics365 requirements check properties. - * - * @return the innerProperties value. - */ - private Dynamics365CheckRequirementsProperties 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/Dynamics365DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java deleted file mode 100644 index 653d886600c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.Dynamics365DataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Dynamics365 data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Dynamics365") -@Fluent -public final class Dynamics365DataConnector extends DataConnectorInner { - /* - * Dynamics365 data connector properties. - */ - @JsonProperty(value = "properties") - private Dynamics365DataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Dynamics365 data connector properties. - * - * @return the innerProperties value. - */ - private Dynamics365DataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataTypes property: The available data types for the connector. - * - * @return the dataTypes value. - */ - public Dynamics365DataConnectorDataTypes 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 Dynamics365DataConnector object itself. - */ - public Dynamics365DataConnector withDataTypes(Dynamics365DataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new Dynamics365DataConnectorProperties(); - } - 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 Dynamics365DataConnector object itself. - */ - public Dynamics365DataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new Dynamics365DataConnectorProperties(); - } - 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/Dynamics365DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java deleted file mode 100644 index 0df0a2723965..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Dynamics365 data connector. */ -@Fluent -public final class Dynamics365DataConnectorDataTypes { - /* - * Common Data Service data type connection. - */ - @JsonProperty(value = "dynamics365CdsActivities", required = true) - private Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities; - - /** - * Get the dynamics365CdsActivities property: Common Data Service data type connection. - * - * @return the dynamics365CdsActivities value. - */ - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities() { - return this.dynamics365CdsActivities; - } - - /** - * Set the dynamics365CdsActivities property: Common Data Service data type connection. - * - * @param dynamics365CdsActivities the dynamics365CdsActivities value to set. - * @return the Dynamics365DataConnectorDataTypes object itself. - */ - public Dynamics365DataConnectorDataTypes withDynamics365CdsActivities( - Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities) { - this.dynamics365CdsActivities = dynamics365CdsActivities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dynamics365CdsActivities() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dynamics365CdsActivities in model" - + " Dynamics365DataConnectorDataTypes")); - } else { - dynamics365CdsActivities().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Dynamics365DataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java deleted file mode 100644 index d1ed289fd67c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java +++ /dev/null @@ -1,28 +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; - -/** Common Data Service data type connection. */ -@Fluent -public final class Dynamics365DataConnectorDataTypesDynamics365CdsActivities extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public Dynamics365DataConnectorDataTypesDynamics365CdsActivities 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/EnrichmentDomainWhois.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhois.java deleted file mode 100644 index 5b903538b5db..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhois.java +++ /dev/null @@ -1,60 +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.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of EnrichmentDomainWhois. */ -public interface EnrichmentDomainWhois { - /** - * Gets the domain property: The domain for this whois record. - * - * @return the domain value. - */ - String domain(); - - /** - * Gets the server property: The hostname of this registrar's whois server. - * - * @return the server value. - */ - String server(); - - /** - * Gets the created property: The timestamp at which this record was created. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the updated property: The timestamp at which this record was last updated. - * - * @return the updated value. - */ - OffsetDateTime updated(); - - /** - * Gets the expires property: The timestamp at which this record will expire. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the parsedWhois property: The whois record for a given domain. - * - * @return the parsedWhois value. - */ - EnrichmentDomainWhoisDetails parsedWhois(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentDomainWhoisInner object. - * - * @return the inner object. - */ - EnrichmentDomainWhoisInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java deleted file mode 100644 index d75c0f24e472..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java +++ /dev/null @@ -1,281 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An individual contact associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisContact { - /* - * The name of this contact - */ - @JsonProperty(value = "name") - private String name; - - /* - * The organization for this contact - */ - @JsonProperty(value = "org") - private String org; - - /* - * A list describing the street address for this contact - */ - @JsonProperty(value = "street") - private List street; - - /* - * The city for this contact - */ - @JsonProperty(value = "city") - private String city; - - /* - * The state for this contact - */ - @JsonProperty(value = "state") - private String state; - - /* - * The postal code for this contact - */ - @JsonProperty(value = "postal") - private String postal; - - /* - * The country for this contact - */ - @JsonProperty(value = "country") - private String country; - - /* - * The phone number for this contact - */ - @JsonProperty(value = "phone") - private String phone; - - /* - * The fax number for this contact - */ - @JsonProperty(value = "fax") - private String fax; - - /* - * The email address for this contact - */ - @JsonProperty(value = "email") - private String email; - - /** - * Get the name property: The name of this contact. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of this contact. - * - * @param name the name value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withName(String name) { - this.name = name; - return this; - } - - /** - * Get the org property: The organization for this contact. - * - * @return the org value. - */ - public String org() { - return this.org; - } - - /** - * Set the org property: The organization for this contact. - * - * @param org the org value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withOrg(String org) { - this.org = org; - return this; - } - - /** - * Get the street property: A list describing the street address for this contact. - * - * @return the street value. - */ - public List street() { - return this.street; - } - - /** - * Set the street property: A list describing the street address for this contact. - * - * @param street the street value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withStreet(List street) { - this.street = street; - return this; - } - - /** - * Get the city property: The city for this contact. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city for this contact. - * - * @param city the city value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the state property: The state for this contact. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The state for this contact. - * - * @param state the state value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withState(String state) { - this.state = state; - return this; - } - - /** - * Get the postal property: The postal code for this contact. - * - * @return the postal value. - */ - public String postal() { - return this.postal; - } - - /** - * Set the postal property: The postal code for this contact. - * - * @param postal the postal value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withPostal(String postal) { - this.postal = postal; - return this; - } - - /** - * Get the country property: The country for this contact. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: The country for this contact. - * - * @param country the country value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the phone property: The phone number for this contact. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: The phone number for this contact. - * - * @param phone the phone value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the fax property: The fax number for this contact. - * - * @return the fax value. - */ - public String fax() { - return this.fax; - } - - /** - * Set the fax property: The fax number for this contact. - * - * @param fax the fax value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withFax(String fax) { - this.fax = fax; - return this; - } - - /** - * Get the email property: The email address for this contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: The email address for this contact. - * - * @param email the email value to set. - * @return the EnrichmentDomainWhoisContact object itself. - */ - public EnrichmentDomainWhoisContact withEmail(String email) { - this.email = email; - 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/EnrichmentDomainWhoisContacts.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java deleted file mode 100644 index 869d7a774b30..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java +++ /dev/null @@ -1,136 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The set of contacts associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisContacts { - /* - * The admin contact for this whois record - */ - @JsonProperty(value = "admin") - private EnrichmentDomainWhoisContact admin; - - /* - * The billing contact for this whois record - */ - @JsonProperty(value = "billing") - private EnrichmentDomainWhoisContact billing; - - /* - * The registrant contact for this whois record - */ - @JsonProperty(value = "registrant") - private EnrichmentDomainWhoisContact registrant; - - /* - * The technical contact for this whois record - */ - @JsonProperty(value = "tech") - private EnrichmentDomainWhoisContact tech; - - /** - * Get the admin property: The admin contact for this whois record. - * - * @return the admin value. - */ - public EnrichmentDomainWhoisContact admin() { - return this.admin; - } - - /** - * Set the admin property: The admin contact for this whois record. - * - * @param admin the admin value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withAdmin(EnrichmentDomainWhoisContact admin) { - this.admin = admin; - return this; - } - - /** - * Get the billing property: The billing contact for this whois record. - * - * @return the billing value. - */ - public EnrichmentDomainWhoisContact billing() { - return this.billing; - } - - /** - * Set the billing property: The billing contact for this whois record. - * - * @param billing the billing value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withBilling(EnrichmentDomainWhoisContact billing) { - this.billing = billing; - return this; - } - - /** - * Get the registrant property: The registrant contact for this whois record. - * - * @return the registrant value. - */ - public EnrichmentDomainWhoisContact registrant() { - return this.registrant; - } - - /** - * Set the registrant property: The registrant contact for this whois record. - * - * @param registrant the registrant value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withRegistrant(EnrichmentDomainWhoisContact registrant) { - this.registrant = registrant; - return this; - } - - /** - * Get the tech property: The technical contact for this whois record. - * - * @return the tech value. - */ - public EnrichmentDomainWhoisContact tech() { - return this.tech; - } - - /** - * Set the tech property: The technical contact for this whois record. - * - * @param tech the tech value to set. - * @return the EnrichmentDomainWhoisContacts object itself. - */ - public EnrichmentDomainWhoisContacts withTech(EnrichmentDomainWhoisContact tech) { - this.tech = tech; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (admin() != null) { - admin().validate(); - } - if (billing() != null) { - billing().validate(); - } - if (registrant() != null) { - registrant().validate(); - } - if (tech() != null) { - tech().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java deleted file mode 100644 index 7a22dff870a6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java +++ /dev/null @@ -1,131 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The whois record for a given domain. */ -@Fluent -public final class EnrichmentDomainWhoisDetails { - /* - * The registrar associated with this domain - */ - @JsonProperty(value = "registrar") - private EnrichmentDomainWhoisRegistrarDetails registrar; - - /* - * The set of contacts associated with this domain - */ - @JsonProperty(value = "contacts") - private EnrichmentDomainWhoisContacts contacts; - - /* - * A list of name servers associated with this domain - */ - @JsonProperty(value = "nameServers") - private List nameServers; - - /* - * The set of status flags for this whois record - */ - @JsonProperty(value = "statuses") - private List statuses; - - /** - * Get the registrar property: The registrar associated with this domain. - * - * @return the registrar value. - */ - public EnrichmentDomainWhoisRegistrarDetails registrar() { - return this.registrar; - } - - /** - * Set the registrar property: The registrar associated with this domain. - * - * @param registrar the registrar value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withRegistrar(EnrichmentDomainWhoisRegistrarDetails registrar) { - this.registrar = registrar; - return this; - } - - /** - * Get the contacts property: The set of contacts associated with this domain. - * - * @return the contacts value. - */ - public EnrichmentDomainWhoisContacts contacts() { - return this.contacts; - } - - /** - * Set the contacts property: The set of contacts associated with this domain. - * - * @param contacts the contacts value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withContacts(EnrichmentDomainWhoisContacts contacts) { - this.contacts = contacts; - return this; - } - - /** - * Get the nameServers property: A list of name servers associated with this domain. - * - * @return the nameServers value. - */ - public List nameServers() { - return this.nameServers; - } - - /** - * Set the nameServers property: A list of name servers associated with this domain. - * - * @param nameServers the nameServers value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withNameServers(List nameServers) { - this.nameServers = nameServers; - return this; - } - - /** - * Get the statuses property: The set of status flags for this whois record. - * - * @return the statuses value. - */ - public List statuses() { - return this.statuses; - } - - /** - * Set the statuses property: The set of status flags for this whois record. - * - * @param statuses the statuses value to set. - * @return the EnrichmentDomainWhoisDetails object itself. - */ - public EnrichmentDomainWhoisDetails withStatuses(List statuses) { - this.statuses = statuses; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registrar() != null) { - registrar().validate(); - } - if (contacts() != null) { - contacts().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java deleted file mode 100644 index 545f2a28b66b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java +++ /dev/null @@ -1,176 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The registrar associated with this domain. */ -@Fluent -public final class EnrichmentDomainWhoisRegistrarDetails { - /* - * The name of this registrar - */ - @JsonProperty(value = "name") - private String name; - - /* - * This registrar's abuse contact email - */ - @JsonProperty(value = "abuseContactEmail") - private String abuseContactEmail; - - /* - * This registrar's abuse contact phone number - */ - @JsonProperty(value = "abuseContactPhone") - private String abuseContactPhone; - - /* - * This registrar's Internet Assigned Numbers Authority id - */ - @JsonProperty(value = "ianaId") - private String ianaId; - - /* - * This registrar's URL - */ - @JsonProperty(value = "url") - private String url; - - /* - * The hostname of this registrar's whois server - */ - @JsonProperty(value = "whoisServer") - private String whoisServer; - - /** - * Get the name property: The name of this registrar. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of this registrar. - * - * @param name the name value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withName(String name) { - this.name = name; - return this; - } - - /** - * Get the abuseContactEmail property: This registrar's abuse contact email. - * - * @return the abuseContactEmail value. - */ - public String abuseContactEmail() { - return this.abuseContactEmail; - } - - /** - * Set the abuseContactEmail property: This registrar's abuse contact email. - * - * @param abuseContactEmail the abuseContactEmail value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withAbuseContactEmail(String abuseContactEmail) { - this.abuseContactEmail = abuseContactEmail; - return this; - } - - /** - * Get the abuseContactPhone property: This registrar's abuse contact phone number. - * - * @return the abuseContactPhone value. - */ - public String abuseContactPhone() { - return this.abuseContactPhone; - } - - /** - * Set the abuseContactPhone property: This registrar's abuse contact phone number. - * - * @param abuseContactPhone the abuseContactPhone value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withAbuseContactPhone(String abuseContactPhone) { - this.abuseContactPhone = abuseContactPhone; - return this; - } - - /** - * Get the ianaId property: This registrar's Internet Assigned Numbers Authority id. - * - * @return the ianaId value. - */ - public String ianaId() { - return this.ianaId; - } - - /** - * Set the ianaId property: This registrar's Internet Assigned Numbers Authority id. - * - * @param ianaId the ianaId value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withIanaId(String ianaId) { - this.ianaId = ianaId; - return this; - } - - /** - * Get the url property: This registrar's URL. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: This registrar's URL. - * - * @param url the url value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the whoisServer property: The hostname of this registrar's whois server. - * - * @return the whoisServer value. - */ - public String whoisServer() { - return this.whoisServer; - } - - /** - * Set the whoisServer property: The hostname of this registrar's whois server. - * - * @param whoisServer the whoisServer value to set. - * @return the EnrichmentDomainWhoisRegistrarDetails object itself. - */ - public EnrichmentDomainWhoisRegistrarDetails withWhoisServer(String whoisServer) { - this.whoisServer = whoisServer; - 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/EnrichmentIpGeodata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentIpGeodata.java deleted file mode 100644 index d8b2e8ec5925..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentIpGeodata.java +++ /dev/null @@ -1,139 +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.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner; - -/** An immutable client-side representation of EnrichmentIpGeodata. */ -public interface EnrichmentIpGeodata { - /** - * Gets the asn property: The autonomous system number associated with this IP address. - * - * @return the asn value. - */ - String asn(); - - /** - * Gets the carrier property: The name of the carrier for this IP address. - * - * @return the carrier value. - */ - String carrier(); - - /** - * Gets the city property: The city this IP address is located in. - * - * @return the city value. - */ - String city(); - - /** - * Gets the cityCf property: A numeric rating of confidence that the value in the 'city' field is correct, on a - * scale of 0-100. - * - * @return the cityCf value. - */ - Integer cityCf(); - - /** - * Gets the continent property: The continent this IP address is located on. - * - * @return the continent value. - */ - String continent(); - - /** - * Gets the country property: The county this IP address is located in. - * - * @return the country value. - */ - String country(); - - /** - * Gets the countryCf property: A numeric rating of confidence that the value in the 'country' field is correct on a - * scale of 0-100. - * - * @return the countryCf value. - */ - Integer countryCf(); - - /** - * Gets the ipAddr property: The dotted-decimal or colon-separated string representation of the IP address. - * - * @return the ipAddr value. - */ - String ipAddr(); - - /** - * Gets the ipRoutingType property: A description of the connection type of this IP address. - * - * @return the ipRoutingType value. - */ - String ipRoutingType(); - - /** - * Gets the latitude property: The latitude of this IP address. - * - * @return the latitude value. - */ - String latitude(); - - /** - * Gets the longitude property: The longitude of this IP address. - * - * @return the longitude value. - */ - String longitude(); - - /** - * Gets the organization property: The name of the organization for this IP address. - * - * @return the organization value. - */ - String organization(); - - /** - * Gets the organizationType property: The type of the organization for this IP address. - * - * @return the organizationType value. - */ - String organizationType(); - - /** - * Gets the region property: The geographic region this IP address is located in. - * - * @return the region value. - */ - String region(); - - /** - * Gets the state property: The state this IP address is located in. - * - * @return the state value. - */ - String state(); - - /** - * Gets the stateCf property: A numeric rating of confidence that the value in the 'state' field is correct on a - * scale of 0-100. - * - * @return the stateCf value. - */ - Integer stateCf(); - - /** - * Gets the stateCode property: The abbreviated name for the state this IP address is located in. - * - * @return the stateCode value. - */ - String stateCode(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EnrichmentIpGeodataInner object. - * - * @return the inner object. - */ - EnrichmentIpGeodataInner innerModel(); -} 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 deleted file mode 100644 index 182172f2a926..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java +++ /dev/null @@ -1,165 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Entities. */ -public interface Entities { - /** - * Gets all entities. - * - * @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 entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. - */ - Entity get(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String entityId, Context context); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. - */ - EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); - - /** - * Expands an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. - */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. - */ - GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); - - /** - * Get Insights and Activities for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response}. - */ - Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. - */ - EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); - - /** - * Execute Insights for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. - */ - Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java deleted file mode 100644 index 29a184b1bde3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java +++ /dev/null @@ -1,46 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntitiesGetTimelines. */ -public interface EntitiesGetTimelines { - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. - */ - EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); - - /** - * Timeline for an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - 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 deleted file mode 100644 index aa1daf59c56e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesRelations.java +++ /dev/null @@ -1,52 +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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of EntitiesRelations. */ -public interface EntitiesRelations { - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String entityId); - - /** - * Gets all relations of an entity. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all relations of an entity as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String entityId, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java index 664d22e8eae5..244061308706 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entity.java @@ -4,43 +4,70 @@ package com.azure.resourcemanager.securityinsights.models; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; -/** An immutable client-side representation of Entity. */ -public interface Entity { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. +/** Specific entity. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "kind", + defaultImpl = Entity.class) +@JsonTypeName("Entity") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SecurityAlert", value = SecurityAlert.class), + @JsonSubTypes.Type(name = "Bookmark", value = HuntingBookmark.class), + @JsonSubTypes.Type(name = "Account", value = AccountEntity.class), + @JsonSubTypes.Type(name = "AzureResource", value = AzureResourceEntity.class), + @JsonSubTypes.Type(name = "CloudApplication", value = CloudApplicationEntity.class), + @JsonSubTypes.Type(name = "DnsResolution", value = DnsEntity.class), + @JsonSubTypes.Type(name = "File", value = FileEntity.class), + @JsonSubTypes.Type(name = "FileHash", value = FileHashEntity.class), + @JsonSubTypes.Type(name = "Host", value = HostEntity.class), + @JsonSubTypes.Type(name = "IoTDevice", value = IoTDeviceEntity.class), + @JsonSubTypes.Type(name = "Ip", value = IpEntity.class), + @JsonSubTypes.Type(name = "Mailbox", value = MailboxEntity.class), + @JsonSubTypes.Type(name = "MailCluster", value = MailClusterEntity.class), + @JsonSubTypes.Type(name = "MailMessage", value = MailMessageEntity.class), + @JsonSubTypes.Type(name = "Malware", value = MalwareEntity.class), + @JsonSubTypes.Type(name = "Process", value = ProcessEntity.class), + @JsonSubTypes.Type(name = "RegistryKey", value = RegistryKeyEntity.class), + @JsonSubTypes.Type(name = "RegistryValue", value = RegistryValueEntity.class), + @JsonSubTypes.Type(name = "SecurityGroup", value = SecurityGroupEntity.class), + @JsonSubTypes.Type(name = "SubmissionMail", value = SubmissionMailEntity.class), + @JsonSubTypes.Type(name = "Url", value = UrlEntity.class) +}) +@Immutable +public class Entity extends ProxyResource { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - String id(); + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); + /** Creates an instance of Entity class. */ + public Entity() { + } /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ - SystemData systemData(); + public SystemData systemData() { + return this.systemData; + } /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityInner object. + * Validates the instance. * - * @return the inner object. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - EntityInner innerModel(); + public void validate() { + } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java deleted file mode 100644 index 7ebdadd6fc3c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java +++ /dev/null @@ -1,77 +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.resourcemanager.securityinsights.fluent.models.EntityAnalyticsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("EntityAnalytics") -@Fluent -public final class EntityAnalytics extends SettingsInner { - /* - * EntityAnalytics properties - */ - @JsonProperty(value = "properties") - private EntityAnalyticsProperties innerProperties; - - /** - * Get the innerProperties property: EntityAnalytics properties. - * - * @return the innerProperties value. - */ - private EntityAnalyticsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public EntityAnalytics withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the entityProviders property: The relevant entity providers that are synced. - * - * @return the entityProviders value. - */ - public List entityProviders() { - return this.innerProperties() == null ? null : this.innerProperties().entityProviders(); - } - - /** - * Set the entityProviders property: The relevant entity providers that are synced. - * - * @param entityProviders the entityProviders value to set. - * @return the EntityAnalytics object itself. - */ - public EntityAnalytics withEntityProviders(List entityProviders) { - if (this.innerProperties() == null) { - this.innerProperties = new EntityAnalyticsProperties(); - } - this.innerProperties().withEntityProviders(entityProviders); - 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/EntityCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java index 49d3c8f895a1..5252752f3fb1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java @@ -26,6 +26,10 @@ public class EntityCommonProperties { @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; + /** Creates an instance of EntityCommonProperties class. */ + public EntityCommonProperties() { + } + /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java deleted file mode 100644 index e925912285eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java +++ /dev/null @@ -1,77 +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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The edge that connects the entity to the other entity. */ -@Fluent -public final class EntityEdges { - /* - * The target entity Id. - */ - @JsonProperty(value = "targetEntityId") - private String targetEntityId; - - /* - * A bag of custom fields that should be part of the entity and will be presented to the user. - */ - @JsonProperty(value = "additionalData") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map additionalData; - - /** - * Get the targetEntityId property: The target entity Id. - * - * @return the targetEntityId value. - */ - public String targetEntityId() { - return this.targetEntityId; - } - - /** - * Set the targetEntityId property: The target entity Id. - * - * @param targetEntityId the targetEntityId value to set. - * @return the EntityEdges object itself. - */ - public EntityEdges withTargetEntityId(String targetEntityId) { - this.targetEntityId = targetEntityId; - return this; - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.additionalData; - } - - /** - * Set the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @param additionalData the additionalData value to set. - * @return the EntityEdges object itself. - */ - public EntityEdges withAdditionalData(Map additionalData) { - this.additionalData = additionalData; - 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/EntityExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java deleted file mode 100644 index 8d0d6ec6ebdc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java +++ /dev/null @@ -1,100 +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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** The parameters required to execute an expand operation on the given entity. */ -@Fluent -public final class EntityExpandParameters { - /* - * The end date filter, so the only expansion results returned are before this date. - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * The Id of the expansion to perform. - */ - @JsonProperty(value = "expansionId") - private UUID expansionId; - - /* - * The start date filter, so the only expansion results returned are after this date. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /** - * Get the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end date filter, so the only expansion results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the expansionId property: The Id of the expansion to perform. - * - * @return the expansionId value. - */ - public UUID expansionId() { - return this.expansionId; - } - - /** - * Set the expansionId property: The Id of the expansion to perform. - * - * @param expansionId the expansionId value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withExpansionId(UUID expansionId) { - this.expansionId = expansionId; - return this; - } - - /** - * Get the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start date filter, so the only expansion results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityExpandParameters object itself. - */ - public EntityExpandParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - 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/EntityExpandResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponse.java deleted file mode 100644 index fb8e3981d534..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponse.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.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner; - -/** An immutable client-side representation of EntityExpandResponse. */ -public interface EntityExpandResponse { - /** - * Gets the metadata property: The metadata from the expansion operation results. - * - * @return the metadata value. - */ - ExpansionResultsMetadata metadata(); - - /** - * Gets the value property: The expansion result values. - * - * @return the value value. - */ - EntityExpandResponseValue value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityExpandResponseInner object. - * - * @return the inner object. - */ - EntityExpandResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java deleted file mode 100644 index f8558de18c34..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java +++ /dev/null @@ -1,80 +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.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The expansion result values. */ -@Fluent -public final class EntityExpandResponseValue { - /* - * Array of the expansion result entities. - */ - @JsonProperty(value = "entities") - private List entities; - - /* - * Array of edges that connects the entity to the list of entities. - */ - @JsonProperty(value = "edges") - private List edges; - - /** - * Get the entities property: Array of the expansion result entities. - * - * @return the entities value. - */ - public List entities() { - return this.entities; - } - - /** - * Set the entities property: Array of the expansion result entities. - * - * @param entities the entities value to set. - * @return the EntityExpandResponseValue object itself. - */ - public EntityExpandResponseValue withEntities(List entities) { - this.entities = entities; - return this; - } - - /** - * Get the edges property: Array of edges that connects the entity to the list of entities. - * - * @return the edges value. - */ - public List edges() { - return this.edges; - } - - /** - * Set the edges property: Array of edges that connects the entity to the list of entities. - * - * @param edges the edges value to set. - * @return the EntityExpandResponseValue object itself. - */ - public EntityExpandResponseValue withEdges(List edges) { - this.edges = edges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entities() != null) { - entities().forEach(e -> e.validate()); - } - if (edges() != null) { - edges().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 0d2682840793..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Map identifiers of a single entity. */ -@Fluent -public final class EntityFieldMapping { - /* - * 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/EntityGetInsightsParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java deleted file mode 100644 index 04a3e0d4c530..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.UUID; - -/** The parameters required to execute insights operation on the given entity. */ -@Fluent -public final class EntityGetInsightsParameters { - /* - * The start timeline date, so the results returned are after this date. - */ - @JsonProperty(value = "startTime", required = true) - private OffsetDateTime startTime; - - /* - * The end timeline date, so the results returned are before this date. - */ - @JsonProperty(value = "endTime", required = true) - private OffsetDateTime endTime; - - /* - * Indicates if query time range should be extended with default time range of the query. Default value is false - */ - @JsonProperty(value = "addDefaultExtendedTimeRange") - private Boolean addDefaultExtendedTimeRange; - - /* - * List of Insights Query Id. If empty, default value is all insights of this entity - */ - @JsonProperty(value = "insightQueryIds") - private List insightQueryIds; - - /** - * Get the startTime property: The start timeline date, so the results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start timeline date, so the results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end timeline date, so the results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end timeline date, so the results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the addDefaultExtendedTimeRange property: Indicates if query time range should be extended with default time - * range of the query. Default value is false. - * - * @return the addDefaultExtendedTimeRange value. - */ - public Boolean addDefaultExtendedTimeRange() { - return this.addDefaultExtendedTimeRange; - } - - /** - * Set the addDefaultExtendedTimeRange property: Indicates if query time range should be extended with default time - * range of the query. Default value is false. - * - * @param addDefaultExtendedTimeRange the addDefaultExtendedTimeRange value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withAddDefaultExtendedTimeRange(Boolean addDefaultExtendedTimeRange) { - this.addDefaultExtendedTimeRange = addDefaultExtendedTimeRange; - return this; - } - - /** - * Get the insightQueryIds property: List of Insights Query Id. If empty, default value is all insights of this - * entity. - * - * @return the insightQueryIds value. - */ - public List insightQueryIds() { - return this.insightQueryIds; - } - - /** - * Set the insightQueryIds property: List of Insights Query Id. If empty, default value is all insights of this - * entity. - * - * @param insightQueryIds the insightQueryIds value to set. - * @return the EntityGetInsightsParameters object itself. - */ - public EntityGetInsightsParameters withInsightQueryIds(List insightQueryIds) { - this.insightQueryIds = insightQueryIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTime in model EntityGetInsightsParameters")); - } - if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTime in model EntityGetInsightsParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityGetInsightsParameters.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java deleted file mode 100644 index dbb22861ff01..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsResponse.java +++ /dev/null @@ -1,32 +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.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner; -import java.util.List; - -/** An immutable client-side representation of EntityGetInsightsResponse. */ -public interface EntityGetInsightsResponse { - /** - * Gets the metadata property: The metadata from the get insights operation results. - * - * @return the metadata value. - */ - GetInsightsResultsMetadata metadata(); - - /** - * Gets the value property: The insights result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityGetInsightsResponseInner object. - * - * @return the inner object. - */ - EntityGetInsightsResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java deleted file mode 100644 index 15d19b7473a9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Entity insight Item. */ -@Fluent -public final class EntityInsightItem { - /* - * The query id of the insight - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * The Time interval that the query actually executed on. - */ - @JsonProperty(value = "queryTimeInterval") - private EntityInsightItemQueryTimeInterval queryTimeInterval; - - /* - * Query results for table insights query. - */ - @JsonProperty(value = "tableQueryResults") - private InsightsTableResult tableQueryResults; - - /* - * Query results for table insights query. - */ - @JsonProperty(value = "chartQueryResults") - private List chartQueryResults; - - /** - * Get the queryId property: The query id of the insight. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: The query id of the insight. - * - * @param queryId the queryId value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the queryTimeInterval property: The Time interval that the query actually executed on. - * - * @return the queryTimeInterval value. - */ - public EntityInsightItemQueryTimeInterval queryTimeInterval() { - return this.queryTimeInterval; - } - - /** - * Set the queryTimeInterval property: The Time interval that the query actually executed on. - * - * @param queryTimeInterval the queryTimeInterval value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withQueryTimeInterval(EntityInsightItemQueryTimeInterval queryTimeInterval) { - this.queryTimeInterval = queryTimeInterval; - return this; - } - - /** - * Get the tableQueryResults property: Query results for table insights query. - * - * @return the tableQueryResults value. - */ - public InsightsTableResult tableQueryResults() { - return this.tableQueryResults; - } - - /** - * Set the tableQueryResults property: Query results for table insights query. - * - * @param tableQueryResults the tableQueryResults value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withTableQueryResults(InsightsTableResult tableQueryResults) { - this.tableQueryResults = tableQueryResults; - return this; - } - - /** - * Get the chartQueryResults property: Query results for table insights query. - * - * @return the chartQueryResults value. - */ - public List chartQueryResults() { - return this.chartQueryResults; - } - - /** - * Set the chartQueryResults property: Query results for table insights query. - * - * @param chartQueryResults the chartQueryResults value to set. - * @return the EntityInsightItem object itself. - */ - public EntityInsightItem withChartQueryResults(List chartQueryResults) { - this.chartQueryResults = chartQueryResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (queryTimeInterval() != null) { - queryTimeInterval().validate(); - } - if (tableQueryResults() != null) { - tableQueryResults().validate(); - } - if (chartQueryResults() != null) { - chartQueryResults().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java deleted file mode 100644 index e04c157d5dc6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java +++ /dev/null @@ -1,73 +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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The Time interval that the query actually executed on. */ -@Fluent -public final class EntityInsightItemQueryTimeInterval { - /* - * Insight query start time - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * Insight query end time - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /** - * Get the startTime property: Insight query start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Insight query start time. - * - * @param startTime the startTime value to set. - * @return the EntityInsightItemQueryTimeInterval object itself. - */ - public EntityInsightItemQueryTimeInterval withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Insight query end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Insight query end time. - * - * @param endTime the endTime value to set. - * @return the EntityInsightItemQueryTimeInterval object itself. - */ - public EntityInsightItemQueryTimeInterval withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - 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/EntityItemQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java deleted file mode 100644 index 3759170c00e3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java +++ /dev/null @@ -1,35 +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 EntityItemQueryKind. */ -public final class EntityItemQueryKind extends ExpandableStringEnum { - /** Static value Insight for EntityItemQueryKind. */ - public static final EntityItemQueryKind INSIGHT = fromString("Insight"); - - /** - * Creates or finds a EntityItemQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityItemQueryKind. - */ - @JsonCreator - public static EntityItemQueryKind fromString(String name) { - return fromString(name, EntityItemQueryKind.class); - } - - /** - * Gets known EntityItemQueryKind values. - * - * @return known EntityItemQueryKind values. - */ - public static Collection values() { - return values(EntityItemQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java deleted file mode 100644 index 5968f17a56cd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKind.java +++ /dev/null @@ -1,98 +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; - -/** The kind of the entity. */ -public final class EntityKind extends ExpandableStringEnum { - /** Static value Account for EntityKind. */ - public static final EntityKind ACCOUNT = fromString("Account"); - - /** Static value Host for EntityKind. */ - public static final EntityKind HOST = fromString("Host"); - - /** Static value File for EntityKind. */ - public static final EntityKind FILE = fromString("File"); - - /** Static value AzureResource for EntityKind. */ - public static final EntityKind AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value CloudApplication for EntityKind. */ - public static final EntityKind CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DnsResolution for EntityKind. */ - public static final EntityKind DNS_RESOLUTION = fromString("DnsResolution"); - - /** Static value FileHash for EntityKind. */ - public static final EntityKind FILE_HASH = fromString("FileHash"); - - /** Static value Ip for EntityKind. */ - public static final EntityKind IP = fromString("Ip"); - - /** Static value Malware for EntityKind. */ - public static final EntityKind MALWARE = fromString("Malware"); - - /** Static value Process for EntityKind. */ - public static final EntityKind PROCESS = fromString("Process"); - - /** Static value RegistryKey for EntityKind. */ - public static final EntityKind REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityKind. */ - public static final EntityKind REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityKind. */ - public static final EntityKind SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value Url for EntityKind. */ - public static final EntityKind URL = fromString("Url"); - - /** Static value IoTDevice for EntityKind. */ - public static final EntityKind IO_TDEVICE = fromString("IoTDevice"); - - /** Static value SecurityAlert for EntityKind. */ - public static final EntityKind SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value Bookmark for EntityKind. */ - public static final EntityKind BOOKMARK = fromString("Bookmark"); - - /** Static value MailCluster for EntityKind. */ - public static final EntityKind MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityKind. */ - public static final EntityKind MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value Mailbox for EntityKind. */ - public static final EntityKind MAILBOX = fromString("Mailbox"); - - /** Static value SubmissionMail for EntityKind. */ - public static final EntityKind SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** Static value Nic for EntityKind. */ - public static final EntityKind NIC = fromString("Nic"); - - /** - * Creates or finds a EntityKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityKind. - */ - @JsonCreator - public static EntityKind fromString(String name) { - return fromString(name, EntityKind.class); - } - - /** - * Gets known EntityKind values. - * - * @return known EntityKind values. - */ - public static Collection values() { - return values(EntityKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java new file mode 100644 index 000000000000..2875daaccda2 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of the entity. */ +public final class EntityKindEnum extends ExpandableStringEnum { + /** Static value Account for EntityKindEnum. */ + public static final EntityKindEnum ACCOUNT = fromString("Account"); + + /** Static value Host for EntityKindEnum. */ + public static final EntityKindEnum HOST = fromString("Host"); + + /** Static value File for EntityKindEnum. */ + public static final EntityKindEnum FILE = fromString("File"); + + /** Static value AzureResource for EntityKindEnum. */ + public static final EntityKindEnum AZURE_RESOURCE = fromString("AzureResource"); + + /** Static value CloudApplication for EntityKindEnum. */ + public static final EntityKindEnum CLOUD_APPLICATION = fromString("CloudApplication"); + + /** Static value DnsResolution for EntityKindEnum. */ + public static final EntityKindEnum DNS_RESOLUTION = fromString("DnsResolution"); + + /** Static value FileHash for EntityKindEnum. */ + public static final EntityKindEnum FILE_HASH = fromString("FileHash"); + + /** Static value Ip for EntityKindEnum. */ + public static final EntityKindEnum IP = fromString("Ip"); + + /** Static value Malware for EntityKindEnum. */ + public static final EntityKindEnum MALWARE = fromString("Malware"); + + /** Static value Process for EntityKindEnum. */ + public static final EntityKindEnum PROCESS = fromString("Process"); + + /** Static value RegistryKey for EntityKindEnum. */ + public static final EntityKindEnum REGISTRY_KEY = fromString("RegistryKey"); + + /** Static value RegistryValue for EntityKindEnum. */ + public static final EntityKindEnum REGISTRY_VALUE = fromString("RegistryValue"); + + /** Static value SecurityGroup for EntityKindEnum. */ + public static final EntityKindEnum SECURITY_GROUP = fromString("SecurityGroup"); + + /** Static value Url for EntityKindEnum. */ + public static final EntityKindEnum URL = fromString("Url"); + + /** Static value IoTDevice for EntityKindEnum. */ + public static final EntityKindEnum IO_TDEVICE = fromString("IoTDevice"); + + /** Static value SecurityAlert for EntityKindEnum. */ + public static final EntityKindEnum SECURITY_ALERT = fromString("SecurityAlert"); + + /** Static value Bookmark for EntityKindEnum. */ + public static final EntityKindEnum BOOKMARK = fromString("Bookmark"); + + /** Static value MailCluster for EntityKindEnum. */ + public static final EntityKindEnum MAIL_CLUSTER = fromString("MailCluster"); + + /** Static value MailMessage for EntityKindEnum. */ + public static final EntityKindEnum MAIL_MESSAGE = fromString("MailMessage"); + + /** Static value Mailbox for EntityKindEnum. */ + public static final EntityKindEnum MAILBOX = fromString("Mailbox"); + + /** Static value SubmissionMail for EntityKindEnum. */ + public static final EntityKindEnum SUBMISSION_MAIL = fromString("SubmissionMail"); + + /** + * Creates or finds a EntityKindEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding EntityKindEnum. + */ + @JsonCreator + public static EntityKindEnum fromString(String name) { + return fromString(name, EntityKindEnum.class); + } + + /** + * Gets known EntityKindEnum values. + * + * @return known EntityKindEnum values. + */ + public static Collection values() { + return values(EntityKindEnum.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java deleted file mode 100644 index 0e160998fea5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.EntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entities. */ -@Fluent -public final class EntityList { - /* - * URL to fetch the next set of entities. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entities. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entities. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entities. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entities. - * - * @param value the value value to set. - * @return the EntityList object itself. - */ - public EntityList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java index b5081a9937a3..f0fb60fa302b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java @@ -23,6 +23,10 @@ public final class EntityMapping { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of EntityMapping class. */ + public EntityMapping() { + } + /** * Get the entityType property: The V3 type of the mapped entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java deleted file mode 100644 index 3769c8ff2143..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityProviders.java +++ /dev/null @@ -1,38 +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; - -/** The entity provider that is synced. */ -public final class EntityProviders extends ExpandableStringEnum { - /** Static value ActiveDirectory for EntityProviders. */ - public static final EntityProviders ACTIVE_DIRECTORY = fromString("ActiveDirectory"); - - /** Static value AzureActiveDirectory for EntityProviders. */ - public static final EntityProviders AZURE_ACTIVE_DIRECTORY = fromString("AzureActiveDirectory"); - - /** - * Creates or finds a EntityProviders from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityProviders. - */ - @JsonCreator - public static EntityProviders fromString(String name) { - return fromString(name, EntityProviders.class); - } - - /** - * Gets known EntityProviders values. - * - * @return known EntityProviders values. - */ - public static Collection values() { - return values(EntityProviders.class); - } -} 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 deleted file mode 100644 index d0f22a8e74b0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java +++ /dev/null @@ -1,129 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityQueries. */ -public interface EntityQueries { - /** - * Gets all entity queries. - * - * @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 entity queries as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity queries. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. - */ - EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); - - /** - * Creates or updates the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. - */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String entityQueryId); - - /** - * Delete the entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java deleted file mode 100644 index 9af86d0f151c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java +++ /dev/null @@ -1,38 +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 EntityQueriesKind. */ -public final class EntityQueriesKind extends ExpandableStringEnum { - /** Static value Expansion for EntityQueriesKind. */ - public static final EntityQueriesKind EXPANSION = fromString("Expansion"); - - /** Static value Activity for EntityQueriesKind. */ - public static final EntityQueriesKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueriesKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueriesKind. - */ - @JsonCreator - public static EntityQueriesKind fromString(String name) { - return fromString(name, EntityQueriesKind.class); - } - - /** - * Gets known EntityQueriesKind values. - * - * @return known EntityQueriesKind values. - */ - public static Collection values() { - return values(EntityQueriesKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java deleted file mode 100644 index 3b7459c1f213..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQuery.java +++ /dev/null @@ -1,53 +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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; - -/** An immutable client-side representation of EntityQuery. */ -public interface EntityQuery { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner object. - * - * @return the inner object. - */ - EntityQueryInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java deleted file mode 100644 index edd51be3360f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItem.java +++ /dev/null @@ -1,97 +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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An abstract Query item for entity. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityQueryItem.class) -@JsonTypeName("EntityQueryItem") -@JsonSubTypes({@JsonSubTypes.Type(name = "Insight", value = InsightQueryItem.class)}) -@Fluent -public class EntityQueryItem { - /* - * Query Template ARM ID - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Query Template ARM Name - */ - @JsonProperty(value = "name") - private String name; - - /* - * ARM Type - */ - @JsonProperty(value = "type") - private String type; - - /** - * Get the id property: Query Template ARM ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Query Template ARM Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Query Template ARM Name. - * - * @param name the name value to set. - * @return the EntityQueryItem object itself. - */ - public EntityQueryItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: ARM Type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: ARM Type. - * - * @param type the type value to set. - * @return the EntityQueryItem object itself. - */ - public EntityQueryItem withType(String type) { - this.type = type; - 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/EntityQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java deleted file mode 100644 index b1a3ce1e859b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemProperties.java +++ /dev/null @@ -1,128 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An properties abstract Query item for entity. */ -@Fluent -public class EntityQueryItemProperties { - /* - * Data types for template - */ - @JsonProperty(value = "dataTypes") - private List dataTypes; - - /* - * The type of the entity - */ - @JsonProperty(value = "inputEntityType") - private EntityType inputEntityType; - - /* - * Data types for template - */ - @JsonProperty(value = "requiredInputFieldsSets") - private List> requiredInputFieldsSets; - - /* - * The query applied only to entities matching to all filters - */ - @JsonProperty(value = "entitiesFilter") - private Object entitiesFilter; - - /** - * Get the dataTypes property: Data types for template. - * - * @return the dataTypes value. - */ - public List dataTypes() { - return this.dataTypes; - } - - /** - * Set the dataTypes property: Data types for template. - * - * @param dataTypes the dataTypes value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withDataTypes(List dataTypes) { - this.dataTypes = dataTypes; - return this; - } - - /** - * Get the inputEntityType property: The type of the entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.inputEntityType; - } - - /** - * Set the inputEntityType property: The type of the entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withInputEntityType(EntityType inputEntityType) { - this.inputEntityType = inputEntityType; - return this; - } - - /** - * Get the requiredInputFieldsSets property: Data types for template. - * - * @return the requiredInputFieldsSets value. - */ - public List> requiredInputFieldsSets() { - return this.requiredInputFieldsSets; - } - - /** - * Set the requiredInputFieldsSets property: Data types for template. - * - * @param requiredInputFieldsSets the requiredInputFieldsSets value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - this.requiredInputFieldsSets = requiredInputFieldsSets; - return this; - } - - /** - * Get the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @return the entitiesFilter value. - */ - public Object entitiesFilter() { - return this.entitiesFilter; - } - - /** - * Set the entitiesFilter property: The query applied only to entities matching to all filters. - * - * @param entitiesFilter the entitiesFilter value to set. - * @return the EntityQueryItemProperties object itself. - */ - public EntityQueryItemProperties withEntitiesFilter(Object entitiesFilter) { - this.entitiesFilter = entitiesFilter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataTypes() != null) { - dataTypes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java deleted file mode 100644 index f5b1c7988945..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryItemPropertiesDataTypesItem.java +++ /dev/null @@ -1,46 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The EntityQueryItemPropertiesDataTypesItem model. */ -@Fluent -public final class EntityQueryItemPropertiesDataTypesItem { - /* - * Data type name - */ - @JsonProperty(value = "dataType") - private String dataType; - - /** - * Get the dataType property: Data type name. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Data type name. - * - * @param dataType the dataType value to set. - * @return the EntityQueryItemPropertiesDataTypesItem object itself. - */ - public EntityQueryItemPropertiesDataTypesItem withDataType(String dataType) { - this.dataType = dataType; - 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/EntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryKind.java deleted file mode 100644 index 537821cbebab..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryKind.java +++ /dev/null @@ -1,41 +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; - -/** The kind of the entity query. */ -public final class EntityQueryKind extends ExpandableStringEnum { - /** Static value Expansion for EntityQueryKind. */ - public static final EntityQueryKind EXPANSION = fromString("Expansion"); - - /** Static value Insight for EntityQueryKind. */ - public static final EntityQueryKind INSIGHT = fromString("Insight"); - - /** Static value Activity for EntityQueryKind. */ - public static final EntityQueryKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueryKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueryKind. - */ - @JsonCreator - public static EntityQueryKind fromString(String name) { - return fromString(name, EntityQueryKind.class); - } - - /** - * Gets known EntityQueryKind values. - * - * @return known EntityQueryKind values. - */ - public static Collection values() { - return values(EntityQueryKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java deleted file mode 100644 index 28db9eb06460..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entity queries. */ -@Fluent -public final class EntityQueryList { - /* - * URL to fetch the next set of entity queries. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entity queries. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entity queries. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entity queries. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entity queries. - * - * @param value the value value to set. - * @return the EntityQueryList object itself. - */ - public EntityQueryList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityQueryList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java deleted file mode 100644 index cb8a8e6b155e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplate.java +++ /dev/null @@ -1,46 +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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; - -/** An immutable client-side representation of EntityQueryTemplate. */ -public interface EntityQueryTemplate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner object. - * - * @return the inner object. - */ - EntityQueryTemplateInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java deleted file mode 100644 index 21ce0db46791..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java +++ /dev/null @@ -1,35 +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; - -/** The kind of the entity query template. */ -public final class EntityQueryTemplateKind extends ExpandableStringEnum { - /** Static value Activity for EntityQueryTemplateKind. */ - public static final EntityQueryTemplateKind ACTIVITY = fromString("Activity"); - - /** - * Creates or finds a EntityQueryTemplateKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityQueryTemplateKind. - */ - @JsonCreator - public static EntityQueryTemplateKind fromString(String name) { - return fromString(name, EntityQueryTemplateKind.class); - } - - /** - * Gets known EntityQueryTemplateKind values. - * - * @return known EntityQueryTemplateKind values. - */ - public static Collection values() { - return values(EntityQueryTemplateKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java deleted file mode 100644 index a767e8fea94d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the entity query templates. */ -@Fluent -public final class EntityQueryTemplateList { - /* - * URL to fetch the next set of entity query templates. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of entity query templates. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of entity query templates. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of entity query templates. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of entity query templates. - * - * @param value the value value to set. - * @return the EntityQueryTemplateList object itself. - */ - public EntityQueryTemplateList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EntityQueryTemplateList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityQueryTemplateList.class); -} 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 deleted file mode 100644 index 4bddc9d19d91..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java +++ /dev/null @@ -1,67 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityQueryTemplates. */ -public interface EntityQueryTemplates { - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all entity query templates as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all entity query templates. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param kind The entity template query kind we want to fetch. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); - - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java deleted file mode 100644 index 28d08ca8e271..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java +++ /dev/null @@ -1,41 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EntityRelations. */ -public interface EntityRelations { - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. - */ - Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); - - /** - * Gets an entity relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityId entity ID. - * @param relationName Relation Name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. - */ - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java deleted file mode 100644 index fff8bc912310..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Entity timeline Item. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "kind", - defaultImpl = EntityTimelineItem.class) -@JsonTypeName("EntityTimelineItem") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Activity", value = ActivityTimelineItem.class), - @JsonSubTypes.Type(name = "Bookmark", value = BookmarkTimelineItem.class), - @JsonSubTypes.Type(name = "Anomaly", value = AnomalyTimelineItem.class), - @JsonSubTypes.Type(name = "SecurityAlert", value = SecurityAlertTimelineItem.class) -}) -@Immutable -public class EntityTimelineItem { - /** - * 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/EntityTimelineKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java deleted file mode 100644 index e5a502f1acfb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java +++ /dev/null @@ -1,44 +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; - -/** The entity query kind. */ -public final class EntityTimelineKind extends ExpandableStringEnum { - /** Static value Activity for EntityTimelineKind. */ - public static final EntityTimelineKind ACTIVITY = fromString("Activity"); - - /** Static value Bookmark for EntityTimelineKind. */ - public static final EntityTimelineKind BOOKMARK = fromString("Bookmark"); - - /** Static value SecurityAlert for EntityTimelineKind. */ - public static final EntityTimelineKind SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value Anomaly for EntityTimelineKind. */ - public static final EntityTimelineKind ANOMALY = fromString("Anomaly"); - - /** - * Creates or finds a EntityTimelineKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityTimelineKind. - */ - @JsonCreator - public static EntityTimelineKind fromString(String name) { - return fromString(name, EntityTimelineKind.class); - } - - /** - * Gets known EntityTimelineKind values. - * - * @return known EntityTimelineKind values. - */ - public static Collection values() { - return values(EntityTimelineKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java deleted file mode 100644 index 5f024f5132c6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineParameters.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** The parameters required to execute s timeline operation on the given entity. */ -@Fluent -public final class EntityTimelineParameters { - /* - * Array of timeline Item kinds. - */ - @JsonProperty(value = "kinds") - private List kinds; - - /* - * The start timeline date, so the results returned are after this date. - */ - @JsonProperty(value = "startTime", required = true) - private OffsetDateTime startTime; - - /* - * The end timeline date, so the results returned are before this date. - */ - @JsonProperty(value = "endTime", required = true) - private OffsetDateTime endTime; - - /* - * The number of bucket for timeline queries aggregation. - */ - @JsonProperty(value = "numberOfBucket") - private Integer numberOfBucket; - - /** - * Get the kinds property: Array of timeline Item kinds. - * - * @return the kinds value. - */ - public List kinds() { - return this.kinds; - } - - /** - * Set the kinds property: Array of timeline Item kinds. - * - * @param kinds the kinds value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withKinds(List kinds) { - this.kinds = kinds; - return this; - } - - /** - * Get the startTime property: The start timeline date, so the results returned are after this date. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The start timeline date, so the results returned are after this date. - * - * @param startTime the startTime value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The end timeline date, so the results returned are before this date. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The end timeline date, so the results returned are before this date. - * - * @param endTime the endTime value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the numberOfBucket property: The number of bucket for timeline queries aggregation. - * - * @return the numberOfBucket value. - */ - public Integer numberOfBucket() { - return this.numberOfBucket; - } - - /** - * Set the numberOfBucket property: The number of bucket for timeline queries aggregation. - * - * @param numberOfBucket the numberOfBucket value to set. - * @return the EntityTimelineParameters object itself. - */ - public EntityTimelineParameters withNumberOfBucket(Integer numberOfBucket) { - this.numberOfBucket = numberOfBucket; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTime in model EntityTimelineParameters")); - } - if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTime in model EntityTimelineParameters")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EntityTimelineParameters.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java deleted file mode 100644 index f06f9e561d6b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineResponse.java +++ /dev/null @@ -1,32 +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.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner; -import java.util.List; - -/** An immutable client-side representation of EntityTimelineResponse. */ -public interface EntityTimelineResponse { - /** - * Gets the metadata property: The metadata from the timeline operation results. - * - * @return the metadata value. - */ - TimelineResultsMetadata metadata(); - - /** - * Gets the value property: The timeline result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.EntityTimelineResponseInner object. - * - * @return the inner object. - */ - EntityTimelineResponseInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java deleted file mode 100644 index e18fee517f1d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityType.java +++ /dev/null @@ -1,98 +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; - -/** The type of the entity. */ -public final class EntityType extends ExpandableStringEnum { - /** Static value Account for EntityType. */ - public static final EntityType ACCOUNT = fromString("Account"); - - /** Static value Host for EntityType. */ - public static final EntityType HOST = fromString("Host"); - - /** Static value File for EntityType. */ - public static final EntityType FILE = fromString("File"); - - /** Static value AzureResource for EntityType. */ - public static final EntityType AZURE_RESOURCE = fromString("AzureResource"); - - /** Static value CloudApplication for EntityType. */ - public static final EntityType CLOUD_APPLICATION = fromString("CloudApplication"); - - /** Static value DNS for EntityType. */ - public static final EntityType DNS = fromString("DNS"); - - /** Static value FileHash for EntityType. */ - public static final EntityType FILE_HASH = fromString("FileHash"); - - /** Static value IP for EntityType. */ - public static final EntityType IP = fromString("IP"); - - /** Static value Malware for EntityType. */ - public static final EntityType MALWARE = fromString("Malware"); - - /** Static value Process for EntityType. */ - public static final EntityType PROCESS = fromString("Process"); - - /** Static value RegistryKey for EntityType. */ - public static final EntityType REGISTRY_KEY = fromString("RegistryKey"); - - /** Static value RegistryValue for EntityType. */ - public static final EntityType REGISTRY_VALUE = fromString("RegistryValue"); - - /** Static value SecurityGroup for EntityType. */ - public static final EntityType SECURITY_GROUP = fromString("SecurityGroup"); - - /** Static value URL for EntityType. */ - public static final EntityType URL = fromString("URL"); - - /** Static value IoTDevice for EntityType. */ - public static final EntityType IO_TDEVICE = fromString("IoTDevice"); - - /** Static value SecurityAlert for EntityType. */ - public static final EntityType SECURITY_ALERT = fromString("SecurityAlert"); - - /** Static value HuntingBookmark for EntityType. */ - public static final EntityType HUNTING_BOOKMARK = fromString("HuntingBookmark"); - - /** Static value MailCluster for EntityType. */ - public static final EntityType MAIL_CLUSTER = fromString("MailCluster"); - - /** Static value MailMessage for EntityType. */ - public static final EntityType MAIL_MESSAGE = fromString("MailMessage"); - - /** Static value Mailbox for EntityType. */ - public static final EntityType MAILBOX = fromString("Mailbox"); - - /** Static value SubmissionMail for EntityType. */ - public static final EntityType SUBMISSION_MAIL = fromString("SubmissionMail"); - - /** Static value Nic for EntityType. */ - public static final EntityType NIC = fromString("Nic"); - - /** - * Creates or finds a EntityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntityType. - */ - @JsonCreator - public static EntityType fromString(String name) { - return fromString(name, EntityType.class); - } - - /** - * Gets known EntityType values. - * - * @return known EntityType values. - */ - public static Collection values() { - return values(EntityType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java index ed1b01e323bc..edfd15554d59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingSettings.java @@ -16,6 +16,10 @@ public final class EventGroupingSettings { @JsonProperty(value = "aggregationKind") private EventGroupingAggregationKind aggregationKind; + /** Creates an instance of EventGroupingSettings class. */ + public EventGroupingSettings() { + } + /** * Get the aggregationKind property: The event grouping aggregation kinds. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java deleted file mode 100644 index 368b2563e16c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionEntityQuery.java +++ /dev/null @@ -1,192 +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.resourcemanager.securityinsights.fluent.models.EntityQueryInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ExpansionEntityQueriesProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents Expansion entity query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Expansion") -@Fluent -public final class ExpansionEntityQuery extends EntityQueryInner { - /* - * Expansion entity query properties - */ - @JsonProperty(value = "properties") - private ExpansionEntityQueriesProperties innerProperties; - - /** - * Get the innerProperties property: Expansion entity query properties. - * - * @return the innerProperties value. - */ - private ExpansionEntityQueriesProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ExpansionEntityQuery withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataSources property: List of the data sources that are required to run the query. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.innerProperties() == null ? null : this.innerProperties().dataSources(); - } - - /** - * Set the dataSources property: List of the data sources that are required to run the query. - * - * @param dataSources the dataSources value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withDataSources(List dataSources) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withDataSources(dataSources); - return this; - } - - /** - * Get the displayName property: The query display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The query display name. - * - * @param displayName the displayName value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the inputEntityType property: The type of the query's source entity. - * - * @return the inputEntityType value. - */ - public EntityType inputEntityType() { - return this.innerProperties() == null ? null : this.innerProperties().inputEntityType(); - } - - /** - * Set the inputEntityType property: The type of the query's source entity. - * - * @param inputEntityType the inputEntityType value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withInputEntityType(EntityType inputEntityType) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withInputEntityType(inputEntityType); - return this; - } - - /** - * Get the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @return the inputFields value. - */ - public List inputFields() { - return this.innerProperties() == null ? null : this.innerProperties().inputFields(); - } - - /** - * Set the inputFields property: List of the fields of the source entity that are required to run the query. - * - * @param inputFields the inputFields value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withInputFields(List inputFields) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withInputFields(inputFields); - return this; - } - - /** - * Get the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @return the outputEntityTypes value. - */ - public List outputEntityTypes() { - return this.innerProperties() == null ? null : this.innerProperties().outputEntityTypes(); - } - - /** - * Set the outputEntityTypes property: List of the desired output types to be constructed from the result. - * - * @param outputEntityTypes the outputEntityTypes value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withOutputEntityTypes(List outputEntityTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withOutputEntityTypes(outputEntityTypes); - return this; - } - - /** - * Get the queryTemplate property: The template query string to be parsed and formatted. - * - * @return the queryTemplate value. - */ - public String queryTemplate() { - return this.innerProperties() == null ? null : this.innerProperties().queryTemplate(); - } - - /** - * Set the queryTemplate property: The template query string to be parsed and formatted. - * - * @param queryTemplate the queryTemplate value to set. - * @return the ExpansionEntityQuery object itself. - */ - public ExpansionEntityQuery withQueryTemplate(String queryTemplate) { - if (this.innerProperties() == null) { - this.innerProperties = new ExpansionEntityQueriesProperties(); - } - this.innerProperties().withQueryTemplate(queryTemplate); - 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/ExpansionResultAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java deleted file mode 100644 index a3620d7458fc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultAggregation.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Information of a specific aggregation in the expansion result. */ -@Fluent -public final class ExpansionResultAggregation { - /* - * The common type of the aggregation. (for e.g. entity field name) - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /* - * Total number of aggregations of the given kind (and aggregationType if given) in the expansion result. - */ - @JsonProperty(value = "count", required = true) - private int count; - - /* - * The display name of the aggregation by type. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The kind of the aggregated entity. - */ - @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; - - /** - * Get the aggregationType property: The common type of the aggregation. (for e.g. entity field name). - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType property: The common type of the aggregation. (for e.g. entity field name). - * - * @param aggregationType the aggregationType value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the count property: Total number of aggregations of the given kind (and aggregationType if given) in the - * expansion result. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: Total number of aggregations of the given kind (and aggregationType if given) in the - * expansion result. - * - * @param count the count value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the displayName property: The display name of the aggregation by type. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the aggregation by type. - * - * @param displayName the displayName value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the entityKind property: The kind of the aggregated entity. - * - * @return the entityKind value. - */ - public EntityKind entityKind() { - return this.entityKind; - } - - /** - * Set the entityKind property: The kind of the aggregated entity. - * - * @param entityKind the entityKind value to set. - * @return the ExpansionResultAggregation object itself. - */ - public ExpansionResultAggregation withEntityKind(EntityKind entityKind) { - this.entityKind = entityKind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (entityKind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property entityKind in model ExpansionResultAggregation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ExpansionResultAggregation.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java deleted file mode 100644 index 79231d5f4fcd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ExpansionResultsMetadata.java +++ /dev/null @@ -1,50 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Expansion result metadata. */ -@Fluent -public final class ExpansionResultsMetadata { - /* - * Information of the aggregated nodes in the expansion result. - */ - @JsonProperty(value = "aggregations") - private List aggregations; - - /** - * Get the aggregations property: Information of the aggregated nodes in the expansion result. - * - * @return the aggregations value. - */ - public List aggregations() { - return this.aggregations; - } - - /** - * Set the aggregations property: Information of the aggregated nodes in the expansion result. - * - * @param aggregations the aggregations value to set. - * @return the ExpansionResultsMetadata object itself. - */ - public ExpansionResultsMetadata withAggregations(List aggregations) { - this.aggregations = aggregations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregations() != null) { - aggregations().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java deleted file mode 100644 index 05d0db1cba99..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java +++ /dev/null @@ -1,62 +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.resourcemanager.securityinsights.fluent.models.EyesOnSettingsProperties; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("EyesOn") -@Fluent -public final class EyesOn extends SettingsInner { - /* - * EyesOn properties - */ - @JsonProperty(value = "properties") - private EyesOnSettingsProperties innerProperties; - - /** - * Get the innerProperties property: EyesOn properties. - * - * @return the innerProperties value. - */ - private EyesOnSettingsProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public EyesOn withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the isEnabled property: Determines whether the setting is enable or disabled. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); - } - - /** - * 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/FieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java index d01e4fca5f25..218cfb57f5d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java @@ -22,6 +22,10 @@ public final class FieldMapping { @JsonProperty(value = "columnName") private String columnName; + /** Creates an instance of FieldMapping class. */ + public FieldMapping() { + } + /** * Get the identifier property: the V3 identifier of the entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java index 7cfc51143dbb..770c9688fcad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,14 +15,18 @@ /** Represents a file entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("File") -@Fluent -public final class FileEntity extends EntityInner { +@Immutable +public final class FileEntity extends Entity { /* * File entity properties */ @JsonProperty(value = "properties") private FileEntityProperties innerProperties; + /** Creates an instance of FileEntity class. */ + public FileEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java deleted file mode 100644 index b75ccaba87f1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java +++ /dev/null @@ -1,41 +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; - -/** The format of the file. */ -public final class FileFormat extends ExpandableStringEnum { - /** Static value CSV for FileFormat. */ - public static final FileFormat CSV = fromString("CSV"); - - /** Static value JSON for FileFormat. */ - public static final FileFormat JSON = fromString("JSON"); - - /** Static value Unspecified for FileFormat. */ - public static final FileFormat UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileFormat. - */ - @JsonCreator - public static FileFormat fromString(String name) { - return fromString(name, FileFormat.class); - } - - /** - * Gets known FileFormat values. - * - * @return known FileFormat values. - */ - public static Collection values() { - return values(FileFormat.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java index d6252ed9ffe6..b07ad81a35b1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.FileHashEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,14 +14,18 @@ /** Represents a file hash entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("FileHash") -@Fluent -public final class FileHashEntity extends EntityInner { +@Immutable +public final class FileHashEntity extends Entity { /* * FileHash entity properties */ @JsonProperty(value = "properties") private FileHashEntityProperties innerProperties; + /** Creates an instance of FileHashEntity class. */ + public FileHashEntity() { + } + /** * Get the innerProperties property: FileHash entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java deleted file mode 100644 index eba802fc7782..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImport.java +++ /dev/null @@ -1,243 +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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of FileImport. */ -public interface FileImport { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the ingestionMode property: Describes how to ingest the records in the file. - * - * @return the ingestionMode value. - */ - IngestionMode ingestionMode(); - - /** - * Gets the contentType property: The content type of this file. - * - * @return the contentType value. - */ - FileImportContentType contentType(); - - /** - * Gets the createdTimeUtc property: The time the file was imported. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the errorFile property: Represents the error file (if the import was ingested with errors or failed the - * validation). - * - * @return the errorFile value. - */ - FileMetadata errorFile(); - - /** - * Gets the errorsPreview property: An ordered list of some of the errors that were encountered during validation. - * - * @return the errorsPreview value. - */ - List errorsPreview(); - - /** - * Gets the importFile property: Represents the imported file. - * - * @return the importFile value. - */ - FileMetadata importFile(); - - /** - * Gets the ingestedRecordCount property: The number of records that have been successfully ingested. - * - * @return the ingestedRecordCount value. - */ - Integer ingestedRecordCount(); - - /** - * Gets the source property: The source for the data in the file. - * - * @return the source value. - */ - String source(); - - /** - * Gets the state property: The state of the file import. - * - * @return the state value. - */ - FileImportState state(); - - /** - * Gets the totalRecordCount property: The number of records in the file. - * - * @return the totalRecordCount value. - */ - Integer totalRecordCount(); - - /** - * Gets the validRecordCount property: The number of records that have passed validation. - * - * @return the validRecordCount value. - */ - Integer validRecordCount(); - - /** - * Gets the filesValidUntilTimeUtc property: The time the files associated with this import are deleted from the - * storage account. - * - * @return the filesValidUntilTimeUtc value. - */ - OffsetDateTime filesValidUntilTimeUtc(); - - /** - * Gets the importValidUntilTimeUtc property: The time the file import record is soft deleted from the database and - * history. - * - * @return the importValidUntilTimeUtc value. - */ - OffsetDateTime importValidUntilTimeUtc(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.FileImportInner object. - * - * @return the inner object. - */ - FileImportInner innerModel(); - - /** The entirety of the FileImport definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The FileImport definition stages. */ - interface DefinitionStages { - /** The first stage of the FileImport definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the FileImport definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the FileImport 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.WithIngestionMode, - DefinitionStages.WithContentType, - DefinitionStages.WithImportFile, - DefinitionStages.WithSource { - /** - * Executes the create request. - * - * @return the created resource. - */ - FileImport create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FileImport create(Context context); - } - /** The stage of the FileImport definition allowing to specify ingestionMode. */ - interface WithIngestionMode { - /** - * Specifies the ingestionMode property: Describes how to ingest the records in the file.. - * - * @param ingestionMode Describes how to ingest the records in the file. - * @return the next definition stage. - */ - WithCreate withIngestionMode(IngestionMode ingestionMode); - } - /** The stage of the FileImport definition allowing to specify contentType. */ - interface WithContentType { - /** - * Specifies the contentType property: The content type of this file.. - * - * @param contentType The content type of this file. - * @return the next definition stage. - */ - WithCreate withContentType(FileImportContentType contentType); - } - /** The stage of the FileImport definition allowing to specify importFile. */ - interface WithImportFile { - /** - * Specifies the importFile property: Represents the imported file.. - * - * @param importFile Represents the imported file. - * @return the next definition stage. - */ - WithCreate withImportFile(FileMetadata importFile); - } - /** The stage of the FileImport definition allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: The source for the data in the file.. - * - * @param source The source for the data in the file. - * @return the next definition stage. - */ - WithCreate withSource(String source); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FileImport refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FileImport refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java deleted file mode 100644 index 0be57c4ae5d8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportContentType.java +++ /dev/null @@ -1,41 +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; - -/** The content type of this file. */ -public final class FileImportContentType extends ExpandableStringEnum { - /** Static value BasicIndicator for FileImportContentType. */ - public static final FileImportContentType BASIC_INDICATOR = fromString("BasicIndicator"); - - /** Static value StixIndicator for FileImportContentType. */ - public static final FileImportContentType STIX_INDICATOR = fromString("StixIndicator"); - - /** Static value Unspecified for FileImportContentType. */ - public static final FileImportContentType UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileImportContentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileImportContentType. - */ - @JsonCreator - public static FileImportContentType fromString(String name) { - return fromString(name, FileImportContentType.class); - } - - /** - * Gets known FileImportContentType values. - * - * @return known FileImportContentType values. - */ - public static Collection values() { - return values(FileImportContentType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java deleted file mode 100644 index 5037750b2957..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.FileImportInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the file imports. */ -@Fluent -public final class FileImportList { - /* - * URL to fetch the next set of file imports. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of file imports. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of file imports. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of file imports. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of file imports. - * - * @param value the value value to set. - * @return the FileImportList object itself. - */ - public FileImportList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model FileImportList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FileImportList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java deleted file mode 100644 index 865e69307352..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java +++ /dev/null @@ -1,53 +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; - -/** The state of the file import. */ -public final class FileImportState extends ExpandableStringEnum { - /** Static value FatalError for FileImportState. */ - public static final FileImportState FATAL_ERROR = fromString("FatalError"); - - /** Static value Ingested for FileImportState. */ - public static final FileImportState INGESTED = fromString("Ingested"); - - /** Static value IngestedWithErrors for FileImportState. */ - public static final FileImportState INGESTED_WITH_ERRORS = fromString("IngestedWithErrors"); - - /** Static value InProgress for FileImportState. */ - public static final FileImportState IN_PROGRESS = fromString("InProgress"); - - /** Static value Invalid for FileImportState. */ - public static final FileImportState INVALID = fromString("Invalid"); - - /** Static value WaitingForUpload for FileImportState. */ - public static final FileImportState WAITING_FOR_UPLOAD = fromString("WaitingForUpload"); - - /** Static value Unspecified for FileImportState. */ - public static final FileImportState UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a FileImportState from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileImportState. - */ - @JsonCreator - public static FileImportState fromString(String name) { - return fromString(name, FileImportState.class); - } - - /** - * Gets known FileImportState values. - * - * @return known FileImportState values. - */ - public static Collection values() { - return values(FileImportState.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java deleted file mode 100644 index ae0a2d6348d2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java +++ /dev/null @@ -1,159 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of FileImports. */ -public interface FileImports { - /** - * Gets all file imports. - * - * @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 file imports as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all file imports. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that - * specifies a starting point to use for subsequent calls. Optional. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all file imports as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - String skipToken, - Context context); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. - */ - FileImport get(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Gets a file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - FileImport delete(String resourceGroupName, String workspaceName, String fileImportId); - - /** - * Delete the file import. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param fileImportId File import ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - FileImport delete(String resourceGroupName, String workspaceName, String fileImportId, Context context); - - /** - * Gets a file import. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. - */ - FileImport getById(String id); - - /** - * Gets a file import. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the file import. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - FileImport deleteById(String id); - - /** - * Delete the file import. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. - */ - FileImport deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FileImport resource. - * - * @param name resource name. - * @return the first stage of the new FileImport definition. - */ - FileImport.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java deleted file mode 100644 index 39027c4f608c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java +++ /dev/null @@ -1,128 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a file. */ -@Fluent -public final class FileMetadata { - /* - * The format of the file - */ - @JsonProperty(value = "fileFormat") - private FileFormat fileFormat; - - /* - * The name of the file. - */ - @JsonProperty(value = "fileName") - private String fileName; - - /* - * The size of the file. - */ - @JsonProperty(value = "fileSize") - private Integer fileSize; - - /* - * A URI with a valid SAS token to allow uploading / downloading the file. - */ - @JsonProperty(value = "fileContentUri", access = JsonProperty.Access.WRITE_ONLY) - private String fileContentUri; - - /* - * Indicates whether the file was deleted from the storage account. - */ - @JsonProperty(value = "deleteStatus", access = JsonProperty.Access.WRITE_ONLY) - private DeleteStatus deleteStatus; - - /** - * Get the fileFormat property: The format of the file. - * - * @return the fileFormat value. - */ - public FileFormat fileFormat() { - return this.fileFormat; - } - - /** - * Set the fileFormat property: The format of the file. - * - * @param fileFormat the fileFormat value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileFormat(FileFormat fileFormat) { - this.fileFormat = fileFormat; - return this; - } - - /** - * Get the fileName property: The name of the file. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: The name of the file. - * - * @param fileName the fileName value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the fileSize property: The size of the file. - * - * @return the fileSize value. - */ - public Integer fileSize() { - return this.fileSize; - } - - /** - * Set the fileSize property: The size of the file. - * - * @param fileSize the fileSize value to set. - * @return the FileMetadata object itself. - */ - public FileMetadata withFileSize(Integer fileSize) { - this.fileSize = fileSize; - return this; - } - - /** - * Get the fileContentUri property: A URI with a valid SAS token to allow uploading / downloading the file. - * - * @return the fileContentUri value. - */ - public String fileContentUri() { - return this.fileContentUri; - } - - /** - * Get the deleteStatus property: Indicates whether the file was deleted from the storage account. - * - * @return the deleteStatus value. - */ - public DeleteStatus deleteStatus() { - return this.deleteStatus; - } - - /** - * 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/FusionAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java index 792e517d8d10..6da78c6f2a11 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java @@ -24,6 +24,10 @@ public final class FusionAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private FusionAlertRuleProperties innerProperties; + /** Creates an instance of FusionAlertRule class. */ + public FusionAlertRule() { + } + /** * Get the innerProperties property: Fusion alert rule properties. * @@ -104,53 +108,6 @@ 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. * 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 ce4da38707f0..f73a0e6a8f12 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class FusionAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private FusionAlertRuleTemplateProperties innerProperties; + /** Creates an instance of FusionAlertRuleTemplate class. */ + public FusionAlertRuleTemplate() { + } + /** * Get the innerProperties property: Fusion alert rule template properties. * @@ -214,7 +218,7 @@ public FusionAlertRuleTemplate withTactics(List tactics) { } /** - * Get the techniques property: The techniques of the alert rule. + * Get the techniques property: The techniques of the alert rule template. * * @return the techniques value. */ @@ -223,7 +227,7 @@ public List techniques() { } /** - * Set the techniques property: The techniques of the alert rule. + * Set the techniques property: The techniques of the alert rule template. * * @param techniques the techniques value to set. * @return the FusionAlertRuleTemplate object itself. @@ -236,29 +240,6 @@ public FusionAlertRuleTemplate withTechniques(List 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 deleted file mode 100644 index 018fafeb7256..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a Fusion scenario exclusion patterns in Fusion detection. */ -@Fluent -public final class FusionScenarioExclusionPattern { - /* - * 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")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionScenarioExclusionPattern.class); -} 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 deleted file mode 100644 index e551140636d8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a supported source signal configuration in Fusion detection. */ -@Fluent -public final class FusionSourceSettings { - /* - * 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()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSettings.class); -} 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 deleted file mode 100644 index cdf5cd5f9269..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a supported source subtype configuration under a source signal in Fusion detection. */ -@Fluent -public final class FusionSourceSubTypeSetting { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSourceSubTypeSetting.class); -} 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 deleted file mode 100644 index c6ae35c72337..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java +++ /dev/null @@ -1,67 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents severity configuration for a source subtype consumed in Fusion detection. */ -@Fluent -public final class FusionSubTypeSeverityFilter { - /* - * 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 deleted file mode 100644 index 0892d2a46323..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a Severity filter setting for a given source subtype consumed in Fusion detection. */ -@Fluent -public final class FusionSubTypeSeverityFiltersItem { - /* - * 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")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionSubTypeSeverityFiltersItem.class); -} 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 deleted file mode 100644 index 1f2111a56b48..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents a source signal consumed in Fusion detection. */ -@Fluent -public final class FusionTemplateSourceSetting { - /* - * 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()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSetting.class); -} 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 deleted file mode 100644 index 89bfdf241a52..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a source subtype under a source signal consumed in Fusion detection. */ -@Fluent -public final class FusionTemplateSourceSubType { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FusionTemplateSourceSubType.class); -} 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 deleted file mode 100644 index ef8388621d5a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java +++ /dev/null @@ -1,77 +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.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 { - /* - * 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/GeoLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java index 675f38adbbe9..5f7e0a8e0b86 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java @@ -56,6 +56,10 @@ public final class GeoLocation { @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; + /** Creates an instance of GeoLocation class. */ + public GeoLocation() { + } + /** * Get the asn property: Autonomous System Number. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java deleted file mode 100644 index cc444f69cd21..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java +++ /dev/null @@ -1,35 +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; - -/** the query kind. */ -public final class GetInsightsError extends ExpandableStringEnum { - /** Static value Insight for GetInsightsError. */ - public static final GetInsightsError INSIGHT = fromString("Insight"); - - /** - * Creates or finds a GetInsightsError from its string representation. - * - * @param name a name to look for. - * @return the corresponding GetInsightsError. - */ - @JsonCreator - public static GetInsightsError fromString(String name) { - return fromString(name, GetInsightsError.class); - } - - /** - * Gets known GetInsightsError values. - * - * @return known GetInsightsError values. - */ - public static Collection values() { - return values(GetInsightsError.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java deleted file mode 100644 index 8717c6a073ff..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsErrorKind.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** GetInsights Query Errors. */ -@Fluent -public final class GetInsightsErrorKind { - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private GetInsightsError kind; - - /* - * the query id - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * the error message - */ - @JsonProperty(value = "errorMessage", required = true) - private String errorMessage; - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public GetInsightsError kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withKind(GetInsightsError kind) { - this.kind = kind; - return this; - } - - /** - * Get the queryId property: the query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: the query id. - * - * @param queryId the queryId value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the errorMessage property: the error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: the error message. - * - * @param errorMessage the errorMessage value to set. - * @return the GetInsightsErrorKind object itself. - */ - public GetInsightsErrorKind withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - 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 GetInsightsErrorKind")); - } - if (errorMessage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property errorMessage in model GetInsightsErrorKind")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(GetInsightsErrorKind.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java deleted file mode 100644 index c02767abf5e7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsResultsMetadata.java +++ /dev/null @@ -1,76 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Get Insights result metadata. */ -@Fluent -public final class GetInsightsResultsMetadata { - /* - * the total items found for the insights request - */ - @JsonProperty(value = "totalCount", required = true) - private int totalCount; - - /* - * information about the failed queries - */ - @JsonProperty(value = "errors") - private List errors; - - /** - * Get the totalCount property: the total items found for the insights request. - * - * @return the totalCount value. - */ - public int totalCount() { - return this.totalCount; - } - - /** - * Set the totalCount property: the total items found for the insights request. - * - * @param totalCount the totalCount value to set. - * @return the GetInsightsResultsMetadata object itself. - */ - public GetInsightsResultsMetadata withTotalCount(int totalCount) { - this.totalCount = totalCount; - return this; - } - - /** - * Get the errors property: information about the failed queries. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: information about the failed queries. - * - * @param errors the errors value to set. - * @return the GetInsightsResultsMetadata object itself. - */ - public GetInsightsResultsMetadata withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java deleted file mode 100644 index bb0a74c7e027..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetQueriesResponse.java +++ /dev/null @@ -1,25 +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.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner; -import java.util.List; - -/** An immutable client-side representation of GetQueriesResponse. */ -public interface GetQueriesResponse { - /** - * Gets the value property: The query result values. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.GetQueriesResponseInner object. - * - * @return the inner object. - */ - GetQueriesResponseInner innerModel(); -} 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 deleted file mode 100644 index 07ee2d932d26..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java +++ /dev/null @@ -1,46 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in GitHub repository. */ -@Fluent -public final class GitHubResourceInfo { - /* - * 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/GraphQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java deleted file mode 100644 index a0f7e3b56450..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java +++ /dev/null @@ -1,98 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The graph query to show the current data status. */ -@Fluent -public class GraphQueries { - /* - * the metric that the query is checking - */ - @JsonProperty(value = "metricName") - private String metricName; - - /* - * The legend for the graph - */ - @JsonProperty(value = "legend") - private String legend; - - /* - * The base query for the graph - */ - @JsonProperty(value = "baseQuery") - private String baseQuery; - - /** - * Get the metricName property: the metric that the query is checking. - * - * @return the metricName value. - */ - public String metricName() { - return this.metricName; - } - - /** - * Set the metricName property: the metric that the query is checking. - * - * @param metricName the metricName value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withMetricName(String metricName) { - this.metricName = metricName; - return this; - } - - /** - * Get the legend property: The legend for the graph. - * - * @return the legend value. - */ - public String legend() { - return this.legend; - } - - /** - * Set the legend property: The legend for the graph. - * - * @param legend the legend value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withLegend(String legend) { - this.legend = legend; - return this; - } - - /** - * Get the baseQuery property: The base query for the graph. - * - * @return the baseQuery value. - */ - public String baseQuery() { - return this.baseQuery; - } - - /** - * Set the baseQuery property: The base query for the graph. - * - * @param baseQuery the baseQuery value to set. - * @return the GraphQueries object itself. - */ - public GraphQueries withBaseQuery(String baseQuery) { - this.baseQuery = baseQuery; - 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/GroupingConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java index c6a5e97fd9ca..4bdfe6f01688 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java @@ -58,6 +58,10 @@ public final class GroupingConfiguration { @JsonProperty(value = "groupByCustomDetails") private List groupByCustomDetails; + /** Creates an instance of GroupingConfiguration class. */ + public GroupingConfiguration() { + } + /** * Get the enabled property: Grouping enabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java index 08e75c45b2b3..5c97f87d9393 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.HostEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,13 +15,17 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Host") @Fluent -public final class HostEntity extends EntityInner { +public final class HostEntity extends Entity { /* * Host entity properties */ @JsonProperty(value = "properties") private HostEntityProperties innerProperties; + /** Creates an instance of HostEntity class. */ + public HostEntity() { + } + /** * Get the innerProperties property: Host entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java index 3ea294c0b3b5..e532adddbf01 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.HuntingBookmarkProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -18,13 +17,17 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Bookmark") @Fluent -public final class HuntingBookmark extends EntityInner { +public final class HuntingBookmark extends Entity { /* * HuntingBookmark entity properties */ @JsonProperty(value = "properties") private HuntingBookmarkProperties innerProperties; + /** Creates an instance of HuntingBookmark class. */ + public HuntingBookmark() { + } + /** * Get the innerProperties property: HuntingBookmark entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java index 2d051e853f0f..6b46a7e5c07e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java @@ -8,7 +8,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import java.time.OffsetDateTime; import java.util.List; @@ -119,20 +118,6 @@ public interface Incident { */ List labels(); - /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - String providerIncidentId(); - /** * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. * @@ -175,13 +160,6 @@ public interface Incident { */ IncidentStatus status(); - /** - * Gets the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - TeamInformation teamInformation(); - /** * Gets the title property: The title of the incident. * @@ -235,13 +213,10 @@ interface WithCreate DefinitionStages.WithDescription, DefinitionStages.WithFirstActivityTimeUtc, DefinitionStages.WithLabels, - DefinitionStages.WithProviderName, - DefinitionStages.WithProviderIncidentId, DefinitionStages.WithLastActivityTimeUtc, DefinitionStages.WithOwner, DefinitionStages.WithSeverity, DefinitionStages.WithStatus, - DefinitionStages.WithTeamInformation, DefinitionStages.WithTitle { /** * Executes the create request. @@ -328,26 +303,6 @@ interface WithLabels { */ WithCreate withLabels(List labels); } - /** The stage of the Incident definition allowing to specify providerName. */ - interface WithProviderName { - /** - * Specifies the providerName property: The name of the source provider that generated the incident. - * - * @param providerName The name of the source provider that generated the incident. - * @return the next definition stage. - */ - WithCreate withProviderName(String providerName); - } - /** The stage of the Incident definition allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { - /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId The incident ID assigned by the incident provider. - * @return the next definition stage. - */ - WithCreate withProviderIncidentId(String providerIncidentId); - } /** The stage of the Incident definition allowing to specify lastActivityTimeUtc. */ interface WithLastActivityTimeUtc { /** @@ -388,16 +343,6 @@ interface WithStatus { */ WithCreate withStatus(IncidentStatus status); } - /** The stage of the Incident definition allowing to specify teamInformation. */ - interface WithTeamInformation { - /** - * Specifies the teamInformation property: Describes a team for the incident. - * - * @param teamInformation Describes a team for the incident. - * @return the next definition stage. - */ - WithCreate withTeamInformation(TeamInformationInner teamInformation); - } /** The stage of the Incident definition allowing to specify title. */ interface WithTitle { /** @@ -425,13 +370,10 @@ interface Update UpdateStages.WithDescription, UpdateStages.WithFirstActivityTimeUtc, UpdateStages.WithLabels, - UpdateStages.WithProviderName, - UpdateStages.WithProviderIncidentId, UpdateStages.WithLastActivityTimeUtc, UpdateStages.WithOwner, UpdateStages.WithSeverity, UpdateStages.WithStatus, - UpdateStages.WithTeamInformation, UpdateStages.WithTitle { /** * Executes the update request. @@ -520,26 +462,6 @@ interface WithLabels { */ Update withLabels(List labels); } - /** The stage of the Incident update allowing to specify providerName. */ - interface WithProviderName { - /** - * Specifies the providerName property: The name of the source provider that generated the incident. - * - * @param providerName The name of the source provider that generated the incident. - * @return the next definition stage. - */ - Update withProviderName(String providerName); - } - /** The stage of the Incident update allowing to specify providerIncidentId. */ - interface WithProviderIncidentId { - /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @param providerIncidentId The incident ID assigned by the incident provider. - * @return the next definition stage. - */ - Update withProviderIncidentId(String providerIncidentId); - } /** The stage of the Incident update allowing to specify lastActivityTimeUtc. */ interface WithLastActivityTimeUtc { /** @@ -580,16 +502,6 @@ interface WithStatus { */ Update withStatus(IncidentStatus status); } - /** The stage of the Incident update allowing to specify teamInformation. */ - interface WithTeamInformation { - /** - * Specifies the teamInformation property: Describes a team for the incident. - * - * @param teamInformation Describes a team for the incident. - * @return the next definition stage. - */ - Update withTeamInformation(TeamInformationInner teamInformation); - } /** The stage of the Incident update allowing to specify title. */ interface WithTitle { /** @@ -617,85 +529,62 @@ interface WithTitle { Incident refresh(Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Gets all alerts for an incident. * - * @param teamProperties Team properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. - */ - TeamInformation createTeam(TeamProperties teamProperties); - - /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. - * - * @param teamProperties Team properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. + * @return all alerts for an incident along with {@link Response}. */ - Response createTeamWithResponse(TeamProperties teamProperties, Context context); + Response listAlertsWithResponse(Context context); /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all alerts for an incident. */ IncidentAlertList listAlerts(); /** - * Gets all incident alerts. + * Gets all bookmarks for an incident. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all bookmarks for an incident along with {@link Response}. */ - Response listAlertsWithResponse(Context context); + Response listBookmarksWithResponse(Context context); /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all bookmarks for an incident. */ IncidentBookmarkList listBookmarks(); /** - * Gets all incident bookmarks. + * Gets all entities for an incident. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all entities for an incident along with {@link Response}. */ - Response listBookmarksWithResponse(Context context); + Response listEntitiesWithResponse(Context context); /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all entities for an incident. */ IncidentEntitiesResponse listEntities(); - - /** - * Gets all incident related entities. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. - */ - Response listEntitiesWithResponse(Context context); } 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 f86ce54b9f24..c51272dd77e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java @@ -35,23 +35,15 @@ 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; + /** Creates an instance of IncidentAdditionalData class. */ + public IncidentAdditionalData() { + } /** * Get the alertsCount property: The number of alerts in the incident. @@ -89,15 +81,6 @@ public List alertProductNames() { return this.alertProductNames; } - /** - * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. - * - * @return the providerIncidentUrl value. - */ - public String providerIncidentUrl() { - return this.providerIncidentUrl; - } - /** * Get the tactics property: The tactics associated with incident. * @@ -107,15 +90,6 @@ 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/IncidentCommentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java index 2304ded52a75..732b69bcb2d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentCommentList.java @@ -25,6 +25,10 @@ public final class IncidentCommentList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentCommentList class. */ + public IncidentCommentList() { + } + /** * Get the nextLink property: URL to fetch the next set of comments. * 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 3e39bb7cd39c..a8093e07c441 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 @@ -11,7 +11,7 @@ /** Resource collection API of IncidentComments. */ public interface IncidentComments { /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -19,12 +19,12 @@ 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 as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident comments. + * Gets all comments for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -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 as paginated response with {@link PagedIterable}. + * @return all comments for a given incident as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -52,89 +52,89 @@ PagedIterable list( Context context); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return a comment for a given incident along with {@link Response}. */ - IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return a comment for a given incident. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return a comment for a given incident along with {@link Response}. */ IncidentComment getById(String id); /** - * Gets an incident comment. + * Gets a comment for a given incident. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return a comment for a given incident along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,7 +144,7 @@ Response deleteWithResponse( void deleteById(String id); /** - * Delete the incident comment. + * Deletes a comment for a given incident. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java index 3746be98a60a..74a866d473bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java @@ -22,6 +22,10 @@ public final class IncidentConfiguration { @JsonProperty(value = "groupingConfiguration") private GroupingConfiguration groupingConfiguration; + /** Creates an instance of IncidentConfiguration class. */ + public IncidentConfiguration() { + } + /** * Get the createIncident property: Create incidents from alerts triggered by this analytics rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java index f282c15e2c9d..76897316c690 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java @@ -21,7 +21,11 @@ public final class IncidentEntitiesResultsMetadata { * The kind of the aggregated entity. */ @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; + private EntityKindEnum entityKind; + + /** Creates an instance of IncidentEntitiesResultsMetadata class. */ + public IncidentEntitiesResultsMetadata() { + } /** * Get the count property: Total number of aggregations of the given kind in the incident related entities result. @@ -48,7 +52,7 @@ public IncidentEntitiesResultsMetadata withCount(int count) { * * @return the entityKind value. */ - public EntityKind entityKind() { + public EntityKindEnum entityKind() { return this.entityKind; } @@ -58,7 +62,7 @@ public EntityKind entityKind() { * @param entityKind the entityKind value to set. * @return the IncidentEntitiesResultsMetadata object itself. */ - public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { + public IncidentEntitiesResultsMetadata withEntityKind(EntityKindEnum entityKind) { this.entityKind = entityKind; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java index e8ee0d18e29b..1dba99098061 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java @@ -34,6 +34,10 @@ public final class IncidentInfo { @JsonProperty(value = "relationName") private String relationName; + /** Creates an instance of IncidentInfo class. */ + public IncidentInfo() { + } + /** * Get the incidentId property: Incident Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java index c24c4a8522ea..975a88bd59ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java @@ -23,6 +23,10 @@ public final class IncidentLabel { @JsonProperty(value = "labelType", access = JsonProperty.Access.WRITE_ONLY) private IncidentLabelType labelType; + /** Creates an instance of IncidentLabel class. */ + public IncidentLabel() { + } + /** * Get the labelName property: The name of the label. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java index 11cec266205d..5d06bdc24468 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentList.java @@ -25,6 +25,10 @@ public final class IncidentList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentList class. */ + public IncidentList() { + } + /** * Get the nextLink property: URL to fetch the next set of incidents. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java index dee86cc22860..32b1f5991cfe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java @@ -41,6 +41,10 @@ public final class IncidentOwnerInfo { @JsonProperty(value = "ownerType") private OwnerType ownerType; + /** Creates an instance of IncidentOwnerInfo class. */ + public IncidentOwnerInfo() { + } + /** * Get the email property: The email of the user the incident is assigned to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java deleted file mode 100644 index 924ddce626e4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java +++ /dev/null @@ -1,159 +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.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of IncidentProperties. */ -public interface IncidentProperties { - /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. - * - * @return the classification value. - */ - IncidentClassification classification(); - - /** - * Gets the classificationComment property: Describes the reason the incident was closed. - * - * @return the classificationComment value. - */ - String classificationComment(); - - /** - * Gets the classificationReason property: The classification reason the incident was closed with. - * - * @return the classificationReason value. - */ - IncidentClassificationReason classificationReason(); - - /** - * Gets the createdTimeUtc property: The time the incident was created. - * - * @return the createdTimeUtc value. - */ - OffsetDateTime createdTimeUtc(); - - /** - * Gets the description property: The description of the incident. - * - * @return the description value. - */ - String description(); - - /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. - * - * @return the firstActivityTimeUtc value. - */ - OffsetDateTime firstActivityTimeUtc(); - - /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. - * - * @return the incidentUrl value. - */ - String incidentUrl(); - - /** - * Gets the incidentNumber property: A sequential number. - * - * @return the incidentNumber value. - */ - Integer incidentNumber(); - - /** - * Gets the labels property: List of labels relevant to this incident. - * - * @return the labels value. - */ - List labels(); - - /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. - * - * @return the providerIncidentId value. - */ - String providerIncidentId(); - - /** - * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. - * - * @return the lastActivityTimeUtc value. - */ - OffsetDateTime lastActivityTimeUtc(); - - /** - * Gets the lastModifiedTimeUtc property: The last time the incident was updated. - * - * @return the lastModifiedTimeUtc value. - */ - OffsetDateTime lastModifiedTimeUtc(); - - /** - * Gets the owner property: Describes a user that the incident is assigned to. - * - * @return the owner value. - */ - IncidentOwnerInfo owner(); - - /** - * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. - * - * @return the relatedAnalyticRuleIds value. - */ - List relatedAnalyticRuleIds(); - - /** - * Gets the severity property: The severity of the incident. - * - * @return the severity value. - */ - IncidentSeverity severity(); - - /** - * Gets the status property: The status of the incident. - * - * @return the status value. - */ - IncidentStatus status(); - - /** - * Gets the teamInformation property: Describes a team for the incident. - * - * @return the teamInformation value. - */ - TeamInformation teamInformation(); - - /** - * Gets the title property: The title of the incident. - * - * @return the title value. - */ - String title(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner object. - * - * @return the inner object. - */ - IncidentPropertiesInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java index 0278075d0b46..360cedc2e11f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java @@ -36,7 +36,7 @@ public final class IncidentPropertiesAction { private IncidentClassificationReason classificationReason; /* - * Describes the reason the incident was closed. + * Describes the reason the incident was closed */ @JsonProperty(value = "classificationComment") private String classificationComment; @@ -48,11 +48,15 @@ public final class IncidentPropertiesAction { private IncidentOwnerInfo owner; /* - * List of labels to add to the incident. + * List of labels to add to the incident */ @JsonProperty(value = "labels") private List labels; + /** Creates an instance of IncidentPropertiesAction class. */ + public IncidentPropertiesAction() { + } + /** * Get the severity property: The severity of the incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java index 078c2fce6eb8..b55bbcbd00d3 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 @@ -7,12 +7,11 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Resource collection API of IncidentRelations. */ public interface IncidentRelations { /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -20,12 +19,12 @@ 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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident relations. + * Gets all relations for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -40,7 +39,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 as paginated response with {@link PagedIterable}. + * @return all relations for a given incident as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, @@ -53,99 +52,114 @@ PagedIterable list( Context context); /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. + * @return a relation for a given incident along with {@link Response}. */ - Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Gets an incident relation. + * Gets a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation along with {@link Response}. + * @return a relation for a given incident. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** - * Creates or updates the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return the {@link Response}. */ - Relation createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Deletes a relation for a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + + /** + * Gets a relation for a given incident. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a relation for a given incident along with {@link Response}. + */ + Relation getById(String id); + + /** + * Gets a relation for a given incident. + * + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. + * @return a relation for a given incident along with {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - String relationName, - RelationInner relation, - Context context); + Response getByIdWithResponse(String id, Context context); /** - * Delete the incident relation. + * Deletes a relation for a given incident. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + void deleteById(String id); /** - * Delete the incident relation. + * Deletes a relation for a given incident. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Relation resource. + * + * @param name resource name. + * @return the first stage of the new Relation definition. + */ + Relation.DefinitionStages.Blank define(String name); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java index 3a2710c7cad6..7bdd87b0684b 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,39 +10,6 @@ /** 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. * @@ -82,20 +49,7 @@ PagedIterable list( Context context); /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. - */ - Incident get(String resourceGroupName, String workspaceName, String incidentId); - - /** - * Gets an incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -104,13 +58,13 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return a given incident along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Delete the incident. + * Gets a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -118,11 +72,12 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a given incident. */ - void delete(String resourceGroupName, String workspaceName, String incidentId); + Incident get(String resourceGroupName, String workspaceName, String incidentId); /** - * Delete the incident. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -137,42 +92,34 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Deletes a given incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ - TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. + * @return all alerts for an incident along with {@link Response}. */ - Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context); + Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident alerts. + * Gets all alerts for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -180,12 +127,12 @@ Response createTeamWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all alerts for an incident. */ IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident alerts. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -194,13 +141,13 @@ Response createTeamWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all bookmarks for an incident along with {@link Response}. */ - Response listAlertsWithResponse( + Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all bookmarks for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -208,12 +155,12 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all bookmarks for an incident. */ IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident bookmarks. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -222,13 +169,13 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all entities for an incident along with {@link Response}. */ - Response listBookmarksWithResponse( + Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all entities for an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -236,50 +183,35 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all entities for an incident. */ IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); /** - * Gets all incident related entities. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. - */ - Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context); - - /** - * Gets an incident. + * Gets a given incident. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return a given incident along with {@link Response}. */ Incident getById(String id); /** - * Gets an incident. + * Gets a given incident. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return a given incident along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete the incident. + * Deletes a given incident. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -289,7 +221,7 @@ Response listEntitiesWithResponse( void deleteById(String id); /** - * Delete the incident. + * Deletes a given incident. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java deleted file mode 100644 index 7cb969486ee3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java +++ /dev/null @@ -1,41 +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; - -/** Describes how to ingest the records in the file. */ -public final class IngestionMode extends ExpandableStringEnum { - /** Static value IngestOnlyIfAllAreValid for IngestionMode. */ - public static final IngestionMode INGEST_ONLY_IF_ALL_ARE_VALID = fromString("IngestOnlyIfAllAreValid"); - - /** Static value IngestAnyValidRecords for IngestionMode. */ - public static final IngestionMode INGEST_ANY_VALID_RECORDS = fromString("IngestAnyValidRecords"); - - /** Static value Unspecified for IngestionMode. */ - public static final IngestionMode UNSPECIFIED = fromString("Unspecified"); - - /** - * Creates or finds a IngestionMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngestionMode. - */ - @JsonCreator - public static IngestionMode fromString(String name) { - return fromString(name, IngestionMode.class); - } - - /** - * Gets known IngestionMode values. - * - * @return known IngestionMode values. - */ - public static Collection values() { - return values(IngestionMode.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java deleted file mode 100644 index 0efb0bc5aff8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java +++ /dev/null @@ -1,69 +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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents Insight Query. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Insight") -@Fluent -public final class InsightQueryItem extends EntityQueryItem { - /* - * Properties bag for InsightQueryItem - */ - @JsonProperty(value = "properties") - private InsightQueryItemProperties properties; - - /** - * Get the properties property: Properties bag for InsightQueryItem. - * - * @return the properties value. - */ - public InsightQueryItemProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties bag for InsightQueryItem. - * - * @param properties the properties value to set. - * @return the InsightQueryItem object itself. - */ - public InsightQueryItem withProperties(InsightQueryItemProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItem withType(String type) { - super.withType(type); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java deleted file mode 100644 index e69737b5e3c8..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java +++ /dev/null @@ -1,273 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents Insight Query. */ -@Fluent -public final class InsightQueryItemProperties extends EntityQueryItemProperties { - /* - * The insight display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The insight description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The base query of the insight. - */ - @JsonProperty(value = "baseQuery") - private String baseQuery; - - /* - * The insight table query. - */ - @JsonProperty(value = "tableQuery") - private InsightQueryItemPropertiesTableQuery tableQuery; - - /* - * The insight chart query. - */ - @JsonProperty(value = "chartQuery") - private Object chartQuery; - - /* - * The activity query definitions. - */ - @JsonProperty(value = "additionalQuery") - private InsightQueryItemPropertiesAdditionalQuery additionalQuery; - - /* - * The insight chart query. - */ - @JsonProperty(value = "defaultTimeRange") - private InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange; - - /* - * The insight chart query. - */ - @JsonProperty(value = "referenceTimeRange") - private InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange; - - /** - * Get the displayName property: The insight display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The insight display name. - * - * @param displayName the displayName value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: The insight description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The insight description. - * - * @param description the description value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the baseQuery property: The base query of the insight. - * - * @return the baseQuery value. - */ - public String baseQuery() { - return this.baseQuery; - } - - /** - * Set the baseQuery property: The base query of the insight. - * - * @param baseQuery the baseQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withBaseQuery(String baseQuery) { - this.baseQuery = baseQuery; - return this; - } - - /** - * Get the tableQuery property: The insight table query. - * - * @return the tableQuery value. - */ - public InsightQueryItemPropertiesTableQuery tableQuery() { - return this.tableQuery; - } - - /** - * Set the tableQuery property: The insight table query. - * - * @param tableQuery the tableQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withTableQuery(InsightQueryItemPropertiesTableQuery tableQuery) { - this.tableQuery = tableQuery; - return this; - } - - /** - * Get the chartQuery property: The insight chart query. - * - * @return the chartQuery value. - */ - public Object chartQuery() { - return this.chartQuery; - } - - /** - * Set the chartQuery property: The insight chart query. - * - * @param chartQuery the chartQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withChartQuery(Object chartQuery) { - this.chartQuery = chartQuery; - return this; - } - - /** - * Get the additionalQuery property: The activity query definitions. - * - * @return the additionalQuery value. - */ - public InsightQueryItemPropertiesAdditionalQuery additionalQuery() { - return this.additionalQuery; - } - - /** - * Set the additionalQuery property: The activity query definitions. - * - * @param additionalQuery the additionalQuery value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withAdditionalQuery(InsightQueryItemPropertiesAdditionalQuery additionalQuery) { - this.additionalQuery = additionalQuery; - return this; - } - - /** - * Get the defaultTimeRange property: The insight chart query. - * - * @return the defaultTimeRange value. - */ - public InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange() { - return this.defaultTimeRange; - } - - /** - * Set the defaultTimeRange property: The insight chart query. - * - * @param defaultTimeRange the defaultTimeRange value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withDefaultTimeRange( - InsightQueryItemPropertiesDefaultTimeRange defaultTimeRange) { - this.defaultTimeRange = defaultTimeRange; - return this; - } - - /** - * Get the referenceTimeRange property: The insight chart query. - * - * @return the referenceTimeRange value. - */ - public InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange() { - return this.referenceTimeRange; - } - - /** - * Set the referenceTimeRange property: The insight chart query. - * - * @param referenceTimeRange the referenceTimeRange value to set. - * @return the InsightQueryItemProperties object itself. - */ - public InsightQueryItemProperties withReferenceTimeRange( - InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange) { - this.referenceTimeRange = referenceTimeRange; - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withDataTypes(List dataTypes) { - super.withDataTypes(dataTypes); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withInputEntityType(EntityType inputEntityType) { - super.withInputEntityType(inputEntityType); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withRequiredInputFieldsSets(List> requiredInputFieldsSets) { - super.withRequiredInputFieldsSets(requiredInputFieldsSets); - return this; - } - - /** {@inheritDoc} */ - @Override - public InsightQueryItemProperties withEntitiesFilter(Object entitiesFilter) { - super.withEntitiesFilter(entitiesFilter); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (tableQuery() != null) { - tableQuery().validate(); - } - if (additionalQuery() != null) { - additionalQuery().validate(); - } - if (defaultTimeRange() != null) { - defaultTimeRange().validate(); - } - if (referenceTimeRange() != null) { - referenceTimeRange().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java deleted file mode 100644 index c9877e7f9273..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The activity query definitions. */ -@Fluent -public final class InsightQueryItemPropertiesAdditionalQuery { - /* - * The insight query. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The insight text. - */ - @JsonProperty(value = "text") - private String text; - - /** - * Get the query property: The insight query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: The insight query. - * - * @param query the query value to set. - * @return the InsightQueryItemPropertiesAdditionalQuery object itself. - */ - public InsightQueryItemPropertiesAdditionalQuery withQuery(String query) { - this.query = query; - return this; - } - - /** - * Get the text property: The insight text. - * - * @return the text value. - */ - public String text() { - return this.text; - } - - /** - * Set the text property: The insight text. - * - * @param text the text value to set. - * @return the InsightQueryItemPropertiesAdditionalQuery object itself. - */ - public InsightQueryItemPropertiesAdditionalQuery withText(String text) { - this.text = text; - 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/InsightQueryItemPropertiesDefaultTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java deleted file mode 100644 index f870634fb199..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The insight chart query. */ -@Fluent -public final class InsightQueryItemPropertiesDefaultTimeRange { - /* - * The padding for the start time of the query. - */ - @JsonProperty(value = "beforeRange") - private String beforeRange; - - /* - * The padding for the end time of the query. - */ - @JsonProperty(value = "afterRange") - private String afterRange; - - /** - * Get the beforeRange property: The padding for the start time of the query. - * - * @return the beforeRange value. - */ - public String beforeRange() { - return this.beforeRange; - } - - /** - * Set the beforeRange property: The padding for the start time of the query. - * - * @param beforeRange the beforeRange value to set. - * @return the InsightQueryItemPropertiesDefaultTimeRange object itself. - */ - public InsightQueryItemPropertiesDefaultTimeRange withBeforeRange(String beforeRange) { - this.beforeRange = beforeRange; - return this; - } - - /** - * Get the afterRange property: The padding for the end time of the query. - * - * @return the afterRange value. - */ - public String afterRange() { - return this.afterRange; - } - - /** - * Set the afterRange property: The padding for the end time of the query. - * - * @param afterRange the afterRange value to set. - * @return the InsightQueryItemPropertiesDefaultTimeRange object itself. - */ - public InsightQueryItemPropertiesDefaultTimeRange withAfterRange(String afterRange) { - this.afterRange = afterRange; - 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/InsightQueryItemPropertiesReferenceTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java deleted file mode 100644 index 6dd0b8e28f15..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java +++ /dev/null @@ -1,46 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The insight chart query. */ -@Fluent -public final class InsightQueryItemPropertiesReferenceTimeRange { - /* - * Additional query time for looking back. - */ - @JsonProperty(value = "beforeRange") - private String beforeRange; - - /** - * Get the beforeRange property: Additional query time for looking back. - * - * @return the beforeRange value. - */ - public String beforeRange() { - return this.beforeRange; - } - - /** - * Set the beforeRange property: Additional query time for looking back. - * - * @param beforeRange the beforeRange value to set. - * @return the InsightQueryItemPropertiesReferenceTimeRange object itself. - */ - public InsightQueryItemPropertiesReferenceTimeRange withBeforeRange(String beforeRange) { - this.beforeRange = beforeRange; - 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/InsightQueryItemPropertiesTableQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java deleted file mode 100644 index 3c889abbed88..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java +++ /dev/null @@ -1,81 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The insight table query. */ -@Fluent -public final class InsightQueryItemPropertiesTableQuery { - /* - * List of insight column definitions. - */ - @JsonProperty(value = "columnsDefinitions") - private List columnsDefinitions; - - /* - * List of insight queries definitions. - */ - @JsonProperty(value = "queriesDefinitions") - private List queriesDefinitions; - - /** - * Get the columnsDefinitions property: List of insight column definitions. - * - * @return the columnsDefinitions value. - */ - public List columnsDefinitions() { - return this.columnsDefinitions; - } - - /** - * Set the columnsDefinitions property: List of insight column definitions. - * - * @param columnsDefinitions the columnsDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQuery object itself. - */ - public InsightQueryItemPropertiesTableQuery withColumnsDefinitions( - List columnsDefinitions) { - this.columnsDefinitions = columnsDefinitions; - return this; - } - - /** - * Get the queriesDefinitions property: List of insight queries definitions. - * - * @return the queriesDefinitions value. - */ - public List queriesDefinitions() { - return this.queriesDefinitions; - } - - /** - * Set the queriesDefinitions property: List of insight queries definitions. - * - * @param queriesDefinitions the queriesDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQuery object itself. - */ - public InsightQueryItemPropertiesTableQuery withQueriesDefinitions( - List queriesDefinitions) { - this.queriesDefinitions = queriesDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columnsDefinitions() != null) { - columnsDefinitions().forEach(e -> e.validate()); - } - if (queriesDefinitions() != null) { - queriesDefinitions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java deleted file mode 100644 index f9428faa609a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java +++ /dev/null @@ -1,98 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem { - /* - * Insight column header. - */ - @JsonProperty(value = "header") - private String headerProperty; - - /* - * Insights Column type. - */ - @JsonProperty(value = "outputType") - private OutputType outputType; - - /* - * Is query supports deep-link. - */ - @JsonProperty(value = "supportDeepLink") - private Boolean supportDeepLink; - - /** - * Get the headerProperty property: Insight column header. - * - * @return the headerProperty value. - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty property: Insight column header. - * - * @param headerProperty the headerProperty value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the outputType property: Insights Column type. - * - * @return the outputType value. - */ - public OutputType outputType() { - return this.outputType; - } - - /** - * Set the outputType property: Insights Column type. - * - * @param outputType the outputType value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withOutputType(OutputType outputType) { - this.outputType = outputType; - return this; - } - - /** - * Get the supportDeepLink property: Is query supports deep-link. - * - * @return the supportDeepLink value. - */ - public Boolean supportDeepLink() { - return this.supportDeepLink; - } - - /** - * Set the supportDeepLink property: Is query supports deep-link. - * - * @param supportDeepLink the supportDeepLink value to set. - * @return the InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem withSupportDeepLink(Boolean supportDeepLink) { - this.supportDeepLink = supportDeepLink; - 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/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java deleted file mode 100644 index ea811b7bdc9a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java +++ /dev/null @@ -1,129 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem { - /* - * Insight column header. - */ - @JsonProperty(value = "filter") - private String filter; - - /* - * Insight column header. - */ - @JsonProperty(value = "summarize") - private String summarize; - - /* - * Insight column header. - */ - @JsonProperty(value = "project") - private String project; - - /* - * Insight column header. - */ - @JsonProperty(value = "linkColumnsDefinitions") - private List linkColumnsDefinitions; - - /** - * Get the filter property: Insight column header. - * - * @return the filter value. - */ - public String filter() { - return this.filter; - } - - /** - * Set the filter property: Insight column header. - * - * @param filter the filter value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withFilter(String filter) { - this.filter = filter; - return this; - } - - /** - * Get the summarize property: Insight column header. - * - * @return the summarize value. - */ - public String summarize() { - return this.summarize; - } - - /** - * Set the summarize property: Insight column header. - * - * @param summarize the summarize value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withSummarize(String summarize) { - this.summarize = summarize; - return this; - } - - /** - * Get the project property: Insight column header. - * - * @return the project value. - */ - public String project() { - return this.project; - } - - /** - * Set the project property: Insight column header. - * - * @param project the project value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withProject(String project) { - this.project = project; - return this; - } - - /** - * Get the linkColumnsDefinitions property: Insight column header. - * - * @return the linkColumnsDefinitions value. - */ - public List linkColumnsDefinitions() { - return this.linkColumnsDefinitions; - } - - /** - * Set the linkColumnsDefinitions property: Insight column header. - * - * @param linkColumnsDefinitions the linkColumnsDefinitions value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem withLinkColumnsDefinitions( - List linkColumnsDefinitions) { - this.linkColumnsDefinitions = linkColumnsDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linkColumnsDefinitions() != null) { - linkColumnsDefinitions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java deleted file mode 100644 index 626304571d5c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java +++ /dev/null @@ -1,73 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem model. */ -@Fluent -public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem { - /* - * Insight Link Definition Projected Name. - */ - @JsonProperty(value = "projectedName") - private String projectedName; - - /* - * Insight Link Definition Query. - */ - @JsonProperty(value = "Query") - private String query; - - /** - * Get the projectedName property: Insight Link Definition Projected Name. - * - * @return the projectedName value. - */ - public String projectedName() { - return this.projectedName; - } - - /** - * Set the projectedName property: Insight Link Definition Projected Name. - * - * @param projectedName the projectedName value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem withProjectedName( - String projectedName) { - this.projectedName = projectedName; - return this; - } - - /** - * Get the query property: Insight Link Definition Query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: Insight Link Definition Query. - * - * @param query the query value to set. - * @return the InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem object itself. - */ - public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem withQuery(String query) { - this.query = query; - 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/InsightsTableResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java deleted file mode 100644 index 08c5f7cb09c2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java +++ /dev/null @@ -1,76 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Query results for table insights query. */ -@Fluent -public final class InsightsTableResult { - /* - * Columns Metadata of the table - */ - @JsonProperty(value = "columns") - private List columns; - - /* - * Rows data of the table - */ - @JsonProperty(value = "rows") - private List> rows; - - /** - * Get the columns property: Columns Metadata of the table. - * - * @return the columns value. - */ - public List columns() { - return this.columns; - } - - /** - * Set the columns property: Columns Metadata of the table. - * - * @param columns the columns value to set. - * @return the InsightsTableResult object itself. - */ - public InsightsTableResult withColumns(List columns) { - this.columns = columns; - return this; - } - - /** - * Get the rows property: Rows data of the table. - * - * @return the rows value. - */ - public List> rows() { - return this.rows; - } - - /** - * Set the rows property: Rows data of the table. - * - * @param rows the rows value to set. - * @return the InsightsTableResult object itself. - */ - public InsightsTableResult withRows(List> rows) { - this.rows = rows; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columns() != null) { - columns().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java deleted file mode 100644 index 486e7914039c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The InsightsTableResultColumnsItem model. */ -@Fluent -public final class InsightsTableResultColumnsItem { - /* - * the type of the colum - */ - @JsonProperty(value = "type") - private String type; - - /* - * the name of the colum - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the type property: the type of the colum. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: the type of the colum. - * - * @param type the type value to set. - * @return the InsightsTableResultColumnsItem object itself. - */ - public InsightsTableResultColumnsItem withType(String type) { - this.type = type; - return this; - } - - /** - * Get the name property: the name of the colum. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: the name of the colum. - * - * @param name the name value to set. - * @return the InsightsTableResultColumnsItem object itself. - */ - public InsightsTableResultColumnsItem withName(String name) { - this.name = name; - 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/InstructionSteps.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java deleted file mode 100644 index 227c38863a55..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java +++ /dev/null @@ -1,102 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Instruction steps to enable the connector. */ -@Fluent -public class InstructionSteps { - /* - * Instruction step title - */ - @JsonProperty(value = "title") - private String title; - - /* - * Instruction step description - */ - @JsonProperty(value = "description") - private String description; - - /* - * Instruction step details - */ - @JsonProperty(value = "instructions") - private List instructions; - - /** - * Get the title property: Instruction step title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Instruction step title. - * - * @param title the title value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Instruction step description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Instruction step description. - * - * @param description the description value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the instructions property: Instruction step details. - * - * @return the instructions value. - */ - public List instructions() { - return this.instructions; - } - - /** - * Set the instructions property: Instruction step details. - * - * @param instructions the instructions value to set. - * @return the InstructionSteps object itself. - */ - public InstructionSteps withInstructions(List instructions) { - this.instructions = instructions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instructions() != null) { - instructions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java deleted file mode 100644 index 45cf764a6a76..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java +++ /dev/null @@ -1,35 +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; - -/** The InstructionStepsInstructionsItem model. */ -@Fluent -public final class InstructionStepsInstructionsItem extends ConnectorInstructionModelBase { - /** {@inheritDoc} */ - @Override - public InstructionStepsInstructionsItem withParameters(Object parameters) { - super.withParameters(parameters); - return this; - } - - /** {@inheritDoc} */ - @Override - public InstructionStepsInstructionsItem withType(SettingType type) { - super.withType(type); - 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/IoTCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java deleted file mode 100644 index cf5ebc9db245..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java +++ /dev/null @@ -1,68 +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.resourcemanager.securityinsights.fluent.models.IoTCheckRequirementsProperties; -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 { - /* - * 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 deleted file mode 100644 index 787fff5098c3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.IoTDataConnectorProperties; -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 { - /* - * 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/IoTDeviceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java index 06ab4d1c051d..7c178bb8e59c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.IoTDeviceEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,14 +16,18 @@ /** Represents an IoT device entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("IoTDevice") -@Fluent -public final class IoTDeviceEntity extends EntityInner { +@Immutable +public final class IoTDeviceEntity extends Entity { /* * IoTDevice entity properties */ @JsonProperty(value = "properties") private IoTDeviceEntityProperties innerProperties; + /** Creates an instance of IoTDeviceEntity class. */ + public IoTDeviceEntity() { + } + /** * Get the innerProperties property: IoTDevice entity properties. * @@ -187,119 +190,6 @@ public List protocols() { return this.innerProperties() == null ? null : this.innerProperties().protocols(); } - /** - * Get the owners property: A list of owners of the IoTDevice entity. - * - * @return the owners value. - */ - public List owners() { - return this.innerProperties() == null ? null : this.innerProperties().owners(); - } - - /** - * Get the nicEntityIds property: A list of Nic entity ids of the IoTDevice entity. - * - * @return the nicEntityIds value. - */ - public List nicEntityIds() { - return this.innerProperties() == null ? null : this.innerProperties().nicEntityIds(); - } - - /** - * Get the site property: The site of the device. - * - * @return the site value. - */ - public String site() { - return this.innerProperties() == null ? null : this.innerProperties().site(); - } - - /** - * Get the zone property: The zone location of the device within a site. - * - * @return the zone value. - */ - public String zone() { - return this.innerProperties() == null ? null : this.innerProperties().zone(); - } - - /** - * Get the sensor property: The sensor the device is monitored by. - * - * @return the sensor value. - */ - public String sensor() { - return this.innerProperties() == null ? null : this.innerProperties().sensor(); - } - - /** - * Get the deviceSubType property: The subType of the device ('PLC', 'HMI', 'EWS', etc.). - * - * @return the deviceSubType value. - */ - public String deviceSubType() { - return this.innerProperties() == null ? null : this.innerProperties().deviceSubType(); - } - - /** - * Get the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @return the importance value. - */ - public DeviceImportance importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); - } - - /** - * Set the importance property: Device importance, determines if the device classified as 'crown jewel'. - * - * @param importance the importance value to set. - * @return the IoTDeviceEntity object itself. - */ - public IoTDeviceEntity withImportance(DeviceImportance importance) { - if (this.innerProperties() == null) { - this.innerProperties = new IoTDeviceEntityProperties(); - } - this.innerProperties().withImportance(importance); - return this; - } - - /** - * Get the purdueLayer property: The Purdue Layer of the device. - * - * @return the purdueLayer value. - */ - public String purdueLayer() { - return this.innerProperties() == null ? null : this.innerProperties().purdueLayer(); - } - - /** - * Get the isAuthorized property: Determines whether the device classified as authorized device. - * - * @return the isAuthorized value. - */ - public Boolean isAuthorized() { - return this.innerProperties() == null ? null : this.innerProperties().isAuthorized(); - } - - /** - * Get the isProgramming property: Determines whether the device classified as programming device. - * - * @return the isProgramming value. - */ - public Boolean isProgramming() { - return this.innerProperties() == null ? null : this.innerProperties().isProgramming(); - } - - /** - * Get the isScanner property: Is the device classified as a scanner device. - * - * @return the isScanner value. - */ - public Boolean isScanner() { - return this.innerProperties() == null ? null : this.innerProperties().isScanner(); - } - /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java index beeac5a11a60..3d515e80089c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.IpEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,14 +15,18 @@ /** Represents an ip entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Ip") -@Fluent -public final class IpEntity extends EntityInner { +@Immutable +public final class IpEntity extends Entity { /* * Ip entity properties */ @JsonProperty(value = "properties") private IpEntityProperties innerProperties; + /** Creates an instance of IpEntity class. */ + public IpEntity() { + } + /** * Get the innerProperties property: Ip entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java deleted file mode 100644 index c85e9c1ab375..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java +++ /dev/null @@ -1,36 +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.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of IpGeodatas. */ -public interface IpGeodatas { - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. - */ - EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); - - /** - * Get geodata for a single IP address. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); -} 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 deleted file mode 100644 index b8879fab665f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java +++ /dev/null @@ -1,83 +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; - -/** The kind of content the metadata is for. */ -public final class Kind extends ExpandableStringEnum { - /** Static value DataConnector for Kind. */ - public static final Kind DATA_CONNECTOR = fromString("DataConnector"); - - /** Static value DataType for Kind. */ - public static final Kind DATA_TYPE = fromString("DataType"); - - /** Static value Workbook for Kind. */ - public static final Kind WORKBOOK = fromString("Workbook"); - - /** Static value WorkbookTemplate for Kind. */ - public static final Kind WORKBOOK_TEMPLATE = fromString("WorkbookTemplate"); - - /** Static value Playbook for Kind. */ - public static final Kind PLAYBOOK = fromString("Playbook"); - - /** Static value PlaybookTemplate for Kind. */ - public static final Kind PLAYBOOK_TEMPLATE = fromString("PlaybookTemplate"); - - /** Static value AnalyticsRuleTemplate for Kind. */ - public static final Kind ANALYTICS_RULE_TEMPLATE = fromString("AnalyticsRuleTemplate"); - - /** Static value AnalyticsRule for Kind. */ - public static final Kind ANALYTICS_RULE = fromString("AnalyticsRule"); - - /** Static value HuntingQuery for Kind. */ - public static final Kind HUNTING_QUERY = fromString("HuntingQuery"); - - /** Static value InvestigationQuery for Kind. */ - public static final Kind INVESTIGATION_QUERY = fromString("InvestigationQuery"); - - /** Static value Parser for Kind. */ - public static final Kind PARSER = fromString("Parser"); - - /** Static value Watchlist for Kind. */ - public static final Kind WATCHLIST = fromString("Watchlist"); - - /** Static value WatchlistTemplate for Kind. */ - public static final Kind WATCHLIST_TEMPLATE = fromString("WatchlistTemplate"); - - /** 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. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * Gets known Kind values. - * - * @return known Kind values. - */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java deleted file mode 100644 index ee71cb19cfb9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java +++ /dev/null @@ -1,74 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Data type for last data received. */ -@Fluent -public class LastDataReceivedDataType { - /* - * Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} placeholder - */ - @JsonProperty(value = "name") - private String name; - - /* - * Query for indicate last data received - */ - @JsonProperty(value = "lastDataReceivedQuery") - private String lastDataReceivedQuery; - - /** - * Get the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} - * placeholder. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} - * placeholder. - * - * @param name the name value to set. - * @return the LastDataReceivedDataType object itself. - */ - public LastDataReceivedDataType withName(String name) { - this.name = name; - return this; - } - - /** - * Get the lastDataReceivedQuery property: Query for indicate last data received. - * - * @return the lastDataReceivedQuery value. - */ - public String lastDataReceivedQuery() { - return this.lastDataReceivedQuery; - } - - /** - * Set the lastDataReceivedQuery property: Query for indicate last data received. - * - * @param lastDataReceivedQuery the lastDataReceivedQuery value to set. - * @return the LastDataReceivedDataType object itself. - */ - public LastDataReceivedDataType withLastDataReceivedQuery(String lastDataReceivedQuery) { - this.lastDataReceivedQuery = lastDataReceivedQuery; - 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/MLBehaviorAnalyticsAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java deleted file mode 100644 index 9538371ea2c4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java +++ /dev/null @@ -1,155 +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.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MLBehaviorAnalytics alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MLBehaviorAnalytics") -@Fluent -public final class MLBehaviorAnalyticsAlertRule extends AlertRuleInner { - /* - * MLBehaviorAnalytics alert rule properties - */ - @JsonProperty(value = "properties") - private MLBehaviorAnalyticsAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: MLBehaviorAnalytics alert rule properties. - * - * @return the innerProperties value. - */ - private MLBehaviorAnalyticsAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MLBehaviorAnalyticsAlertRule withEtag(String etag) { - super.withEtag(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 MLBehaviorAnalyticsAlertRule object itself. - */ - public MLBehaviorAnalyticsAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - 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(); - } - - /** - * 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(); - } - - /** - * 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 MLBehaviorAnalyticsAlertRule object itself. - */ - public MLBehaviorAnalyticsAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleProperties(); - } - 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 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(); - } - - /** - * 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(); - } - - /** - * 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. - * - * @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/MLBehaviorAnalyticsAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java deleted file mode 100644 index 3dc6cb43070c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java +++ /dev/null @@ -1,252 +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.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.MLBehaviorAnalyticsAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents MLBehaviorAnalytics alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MLBehaviorAnalytics") -@Fluent -public final class MLBehaviorAnalyticsAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * MLBehaviorAnalytics alert rule template properties. - */ - @JsonProperty(value = "properties") - private MLBehaviorAnalyticsAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: MLBehaviorAnalytics alert rule template properties. - * - * @return the innerProperties value. - */ - private MLBehaviorAnalyticsAlertRuleTemplateProperties 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 MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(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 MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - 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 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. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().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 MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @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 template. - * - * @param description the description value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the MLBehaviorAnalyticsAlertRuleTemplate object itself. - */ - public MLBehaviorAnalyticsAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new MLBehaviorAnalyticsAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - 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/MailClusterEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java index 1f8aeca643cc..09e125a87025 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,14 +16,18 @@ /** Represents a mail cluster entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("MailCluster") -@Fluent -public final class MailClusterEntity extends EntityInner { +@Immutable +public final class MailClusterEntity extends Entity { /* * Mail cluster entity properties */ @JsonProperty(value = "properties") private MailClusterEntityProperties innerProperties; + /** Creates an instance of MailClusterEntity class. */ + public MailClusterEntity() { + } + /** * Get the innerProperties property: Mail cluster entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java index 8d4c01ef2b89..95e6ff04bb13 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailMessageEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -19,13 +18,17 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("MailMessage") @Fluent -public final class MailMessageEntity extends EntityInner { +public final class MailMessageEntity extends Entity { /* * Mail message entity properties */ @JsonProperty(value = "properties") private MailMessageEntityProperties innerProperties; + /** Creates an instance of MailMessageEntity class. */ + public MailMessageEntity() { + } + /** * Get the innerProperties property: Mail message entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java index 9441ac626ef0..b5a19baf3c61 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.MailboxEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,14 +15,18 @@ /** Represents a mailbox entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Mailbox") -@Fluent -public final class MailboxEntity extends EntityInner { +@Immutable +public final class MailboxEntity extends Entity { /* * Mailbox entity properties */ @JsonProperty(value = "properties") private MailboxEntityProperties innerProperties; + /** Creates an instance of MailboxEntity class. */ + public MailboxEntity() { + } + /** * Get the innerProperties property: Mailbox entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java index efcd2bbb952b..9b45db189595 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.MalwareEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,14 +15,18 @@ /** Represents a malware entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Malware") -@Fluent -public final class MalwareEntity extends EntityInner { +@Immutable +public final class MalwareEntity extends Entity { /* * File entity properties */ @JsonProperty(value = "properties") private MalwareEntityProperties innerProperties; + /** Creates an instance of MalwareEntity class. */ + public MalwareEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java deleted file mode 100644 index ab2433df85a5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** The ManualTriggerRequestBody model. */ -@Fluent -public final class ManualTriggerRequestBody { - /* - * The tenantId property. - */ - @JsonProperty(value = "tenantId") - private UUID tenantId; - - /* - * The logicAppsResourceId property. - */ - @JsonProperty(value = "logicAppsResourceId", required = true) - 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() { - if (logicAppsResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property logicAppsResourceId in model ManualTriggerRequestBody")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManualTriggerRequestBody.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java deleted file mode 100644 index bf543c75aaaf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.McasCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MCAS (Microsoft Cloud App Security) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftCloudAppSecurity") -@Fluent -public final class McasCheckRequirements extends DataConnectorsCheckRequirements { - /* - * MCAS (Microsoft Cloud App Security) requirements check properties. - */ - @JsonProperty(value = "properties") - private McasCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: MCAS (Microsoft Cloud App Security) requirements check properties. - * - * @return the innerProperties value. - */ - private McasCheckRequirementsProperties 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/McasDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java index 4849da973db9..56a01a8d5beb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java @@ -22,6 +22,10 @@ public final class McasDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private McasDataConnectorProperties innerProperties; + /** Creates an instance of McasDataConnector class. */ + public McasDataConnector() { + } + /** * Get the innerProperties property: MCAS (Microsoft Cloud App Security) data connector properties. * @@ -39,48 +43,48 @@ public McasDataConnector withEtag(String etag) { } /** - * Get the dataTypes property: The available data types for the connector. + * Get the tenantId property: The tenant id to connect to, and get the data from. * - * @return the dataTypes value. + * @return the tenantId value. */ - public McasDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** - * Set the dataTypes property: The available data types for the connector. + * Set the tenantId property: The tenant id to connect to, and get the data from. * - * @param dataTypes the dataTypes value to set. + * @param tenantId the tenantId value to set. * @return the McasDataConnector object itself. */ - public McasDataConnector withDataTypes(McasDataConnectorDataTypes dataTypes) { + public McasDataConnector withTenantId(String tenantId) { if (this.innerProperties() == null) { this.innerProperties = new McasDataConnectorProperties(); } - this.innerProperties().withDataTypes(dataTypes); + this.innerProperties().withTenantId(tenantId); return this; } /** - * Get the tenantId property: The tenant id to connect to, and get the data from. + * Get the dataTypes property: The available data types for the connector. * - * @return the tenantId value. + * @return the dataTypes value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public McasDataConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); } /** - * Set the tenantId property: The tenant id to connect to, and get the data from. + * Set the dataTypes property: The available data types for the connector. * - * @param tenantId the tenantId value to set. + * @param dataTypes the dataTypes value to set. * @return the McasDataConnector object itself. */ - public McasDataConnector withTenantId(String tenantId) { + public McasDataConnector withDataTypes(McasDataConnectorDataTypes dataTypes) { if (this.innerProperties() == null) { this.innerProperties = new McasDataConnectorProperties(); } - this.innerProperties().withTenantId(tenantId); + this.innerProperties().withDataTypes(dataTypes); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java index ced242cf519f..47e45201f9aa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java @@ -16,6 +16,10 @@ public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnec @JsonProperty(value = "discoveryLogs") private DataConnectorDataTypeCommon discoveryLogs; + /** Creates an instance of McasDataConnectorDataTypes class. */ + public McasDataConnectorDataTypes() { + } + /** * Get the discoveryLogs property: Discovery log data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java deleted file mode 100644 index 97b1be834a33..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java +++ /dev/null @@ -1,46 +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.resourcemanager.securityinsights.fluent.models.MdatpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents MDATP (Microsoft Defender Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("MicrosoftDefenderAdvancedThreatProtection") -@Fluent -public final class MdatpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private MdatpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) requirements check - * properties. - * - * @return the innerProperties value. - */ - private MdatpCheckRequirementsProperties 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/MdatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java index be4c5abc500b..f943c4e95695 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java @@ -22,6 +22,10 @@ public final class MdatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private MdatpDataConnectorProperties innerProperties; + /** Creates an instance of MdatpDataConnector class. */ + public MdatpDataConnector() { + } + /** * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) data connector * properties. @@ -40,48 +44,48 @@ public MdatpDataConnector withEtag(String etag) { } /** - * Get the dataTypes property: The available data types for the connector. + * Get the tenantId property: The tenant id to connect to, and get the data from. * - * @return the dataTypes value. + * @return the tenantId value. */ - public AlertsDataTypeOfDataConnector dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** - * Set the dataTypes property: The available data types for the connector. + * Set the tenantId property: The tenant id to connect to, and get the data from. * - * @param dataTypes the dataTypes value to set. + * @param tenantId the tenantId value to set. * @return the MdatpDataConnector object itself. */ - public MdatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { + public MdatpDataConnector withTenantId(String tenantId) { if (this.innerProperties() == null) { this.innerProperties = new MdatpDataConnectorProperties(); } - this.innerProperties().withDataTypes(dataTypes); + this.innerProperties().withTenantId(tenantId); return this; } /** - * Get the tenantId property: The tenant id to connect to, and get the data from. + * Get the dataTypes property: The available data types for the connector. * - * @return the tenantId value. + * @return the dataTypes value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public AlertsDataTypeOfDataConnector dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); } /** - * Set the tenantId property: The tenant id to connect to, and get the data from. + * Set the dataTypes property: The available data types for the connector. * - * @param tenantId the tenantId value to set. + * @param dataTypes the dataTypes value to set. * @return the MdatpDataConnector object itself. */ - public MdatpDataConnector withTenantId(String tenantId) { + public MdatpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { if (this.innerProperties() == null) { this.innerProperties = new MdatpDataConnectorProperties(); } - this.innerProperties().withTenantId(tenantId); + this.innerProperties().withDataTypes(dataTypes); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java deleted file mode 100644 index 568297b27c57..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java +++ /dev/null @@ -1,98 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Publisher or creator of the content item. */ -@Fluent -public final class MetadataAuthor { - /* - * Name of the author. Company or person. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Email of author contact - */ - @JsonProperty(value = "email") - private String email; - - /* - * Link for author/vendor page - */ - @JsonProperty(value = "link") - private String link; - - /** - * Get the name property: Name of the author. Company or person. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the author. Company or person. - * - * @param name the name value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withName(String name) { - this.name = name; - return this; - } - - /** - * Get the email property: Email of author contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: Email of author contact. - * - * @param email the email value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the link property: Link for author/vendor page. - * - * @return the link value. - */ - public String link() { - return this.link; - } - - /** - * Set the link property: Link for author/vendor page. - * - * @param link the link value to set. - * @return the MetadataAuthor object itself. - */ - public MetadataAuthor withLink(String link) { - this.link = link; - 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/MetadataCategories.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java deleted file mode 100644 index d2101c1cc1cf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java +++ /dev/null @@ -1,73 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** ies for the solution content item. */ -@Fluent -public final class MetadataCategories { - /* - * domain for the solution content item - */ - @JsonProperty(value = "domains") - private List domains; - - /* - * Industry verticals for the solution content item - */ - @JsonProperty(value = "verticals") - private List verticals; - - /** - * Get the domains property: domain for the solution content item. - * - * @return the domains value. - */ - public List domains() { - return this.domains; - } - - /** - * Set the domains property: domain for the solution content item. - * - * @param domains the domains value to set. - * @return the MetadataCategories object itself. - */ - public MetadataCategories withDomains(List domains) { - this.domains = domains; - return this; - } - - /** - * Get the verticals property: Industry verticals for the solution content item. - * - * @return the verticals value. - */ - public List verticals() { - return this.verticals; - } - - /** - * Set the verticals property: Industry verticals for the solution content item. - * - * @param verticals the verticals value to set. - * @return the MetadataCategories object itself. - */ - public MetadataCategories withVerticals(List verticals) { - this.verticals = verticals; - 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/MetadataDependencies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java deleted file mode 100644 index 0fcabe6da5cd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java +++ /dev/null @@ -1,189 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Dependencies for the content item, what other content items it requires to work. Can describe more complex - * dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or - * operator/criteria for complex dependencies. - */ -@Fluent -public final class MetadataDependencies { - /* - * Id of the content item we depend on - */ - @JsonProperty(value = "contentId") - private String contentId; - - /* - * Type of the content item we depend on - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Version of the the content item we depend on. Can be blank, * or missing to indicate any version fulfills the - * dependency. If version does not match our defined numeric format then an exact match is required. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Name of the content item - */ - @JsonProperty(value = "name") - private String name; - - /* - * Operator used for list of dependencies in criteria array. - */ - @JsonProperty(value = "operator") - private Operator operator; - - /* - * This is the list of dependencies we must fulfill, according to the AND/OR operator - */ - @JsonProperty(value = "criteria") - private List criteria; - - /** - * Get the contentId property: Id of the content item we depend on. - * - * @return the contentId value. - */ - public String contentId() { - return this.contentId; - } - - /** - * Set the contentId property: Id of the content item we depend on. - * - * @param contentId the contentId value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - /** - * Get the kind property: Type of the content item we depend on. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: Type of the content item we depend on. - * - * @param kind the kind value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate - * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is - * required. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the the content item we depend on. Can be blank, * or missing to indicate - * any version fulfills the dependency. If version does not match our defined numeric format then an exact match is - * required. - * - * @param version the version value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the name property: Name of the content item. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the content item. - * - * @param name the name value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withName(String name) { - this.name = name; - return this; - } - - /** - * Get the operator property: Operator used for list of dependencies in criteria array. - * - * @return the operator value. - */ - public Operator operator() { - return this.operator; - } - - /** - * Set the operator property: Operator used for list of dependencies in criteria array. - * - * @param operator the operator value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withOperator(Operator operator) { - this.operator = operator; - return this; - } - - /** - * Get the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. - * - * @return the criteria value. - */ - public List criteria() { - return this.criteria; - } - - /** - * Set the criteria property: This is the list of dependencies we must fulfill, according to the AND/OR operator. - * - * @param criteria the criteria value to set. - * @return the MetadataDependencies object itself. - */ - public MetadataDependencies withCriteria(List criteria) { - this.criteria = criteria; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (criteria() != null) { - criteria().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java deleted file mode 100644 index a5a93f7aa39f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the metadata. */ -@Fluent -public final class MetadataList { - /* - * Array of metadata. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * URL to fetch the next page of metadata. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: Array of metadata. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of metadata. - * - * @param value the value value to set. - * @return the MetadataList object itself. - */ - public MetadataList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to fetch the next page of metadata. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model MetadataList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataList.class); -} 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 deleted file mode 100644 index 392d45ae5499..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java +++ /dev/null @@ -1,773 +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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; -import java.time.LocalDate; -import java.util.List; - -/** An immutable client-side representation of MetadataModel. */ -public interface MetadataModel { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - String contentId(); - - /** - * Gets the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - String parentId(); - - /** - * Gets the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - String version(); - - /** - * Gets the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - MetadataSource source(); - - /** - * Gets the author property: The creator of the content item. - * - * @return the author value. - */ - MetadataAuthor author(); - - /** - * Gets the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - MetadataSupport support(); - - /** - * Gets the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - MetadataDependencies dependencies(); - - /** - * Gets the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - MetadataCategories categories(); - - /** - * Gets the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - List providers(); - - /** - * Gets the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - LocalDate firstPublishDate(); - - /** - * Gets the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - LocalDate lastPublishDate(); - - /** - * Gets the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - String customVersion(); - - /** - * Gets the contentSchemaVersion property: Schema version of the content. Can be used to distinguish between - * different flow based on the schema version. - * - * @return the contentSchemaVersion value. - */ - String contentSchemaVersion(); - - /** - * Gets the icon property: the icon identifier. this id can later be fetched from the 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 name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner object. - * - * @return the inner object. - */ - MetadataModelInner innerModel(); - - /** The entirety of the MetadataModel definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The MetadataModel definition stages. */ - interface DefinitionStages { - /** The first stage of the MetadataModel definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the MetadataModel definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the MetadataModel 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.WithContentId, - DefinitionStages.WithParentId, - DefinitionStages.WithVersion, - DefinitionStages.WithKind, - DefinitionStages.WithSource, - DefinitionStages.WithAuthor, - DefinitionStages.WithSupport, - DefinitionStages.WithDependencies, - DefinitionStages.WithCategories, - DefinitionStages.WithProviders, - DefinitionStages.WithFirstPublishDate, - DefinitionStages.WithLastPublishDate, - DefinitionStages.WithCustomVersion, - DefinitionStages.WithContentSchemaVersion, - DefinitionStages.WithIcon, - DefinitionStages.WithThreatAnalysisTactics, - DefinitionStages.WithThreatAnalysisTechniques, - DefinitionStages.WithPreviewImages, - DefinitionStages.WithPreviewImagesDark { - /** - * Executes the create request. - * - * @return the created resource. - */ - MetadataModel create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - MetadataModel create(Context context); - } - /** The stage of the MetadataModel definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the MetadataModel definition allowing to specify contentId. */ - interface WithContentId { - /** - * Specifies the contentId property: Static ID for the content. Used to identify dependencies and content - * from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for - * user-created. This is the resource name. - * - * @param contentId Static ID for the content. Used to identify dependencies and content from solutions or - * community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This - * is the resource name. - * @return the next definition stage. - */ - WithCreate withContentId(String contentId); - } - /** The stage of the MetadataModel definition allowing to specify parentId. */ - interface WithParentId { - /** - * Specifies the parentId property: Full parent resource ID of the content item the metadata is for. This is - * the full resource ID including the scope (subscription and resource group). - * - * @param parentId Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * @return the next definition stage. - */ - WithCreate withParentId(String parentId); - } - /** The stage of the MetadataModel definition allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Version of the content. Default and recommended format is numeric (e.g. - * 1, 1.0, 1.0.0, 1.0.0.0), following ARM template best practices. Can also be any string, but then we - * cannot guarantee any version checks. - * - * @param version Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee - * any version checks. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - /** The stage of the MetadataModel definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of content the metadata is for.. - * - * @param kind The kind of content the metadata is for. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** The stage of the MetadataModel definition allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: Source of the content. This is where/how it was created.. - * - * @param source Source of the content. This is where/how it was created. - * @return the next definition stage. - */ - WithCreate withSource(MetadataSource source); - } - /** The stage of the MetadataModel definition allowing to specify author. */ - interface WithAuthor { - /** - * Specifies the author property: The creator of the content item.. - * - * @param author The creator of the content item. - * @return the next definition stage. - */ - WithCreate withAuthor(MetadataAuthor author); - } - /** The stage of the MetadataModel definition allowing to specify support. */ - interface WithSupport { - /** - * Specifies the support property: Support information for the metadata - type, name, contact information. - * - * @param support Support information for the metadata - type, name, contact information. - * @return the next definition stage. - */ - WithCreate withSupport(MetadataSupport support); - } - /** The stage of the MetadataModel definition allowing to specify dependencies. */ - interface WithDependencies { - /** - * Specifies the dependencies property: Dependencies for the content item, what other content items it - * requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single - * dependency an id/kind/version can be supplied or operator/criteria for complex formats.. - * - * @param dependencies Dependencies for the content item, what other content items it requires to work. Can - * describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * @return the next definition stage. - */ - WithCreate withDependencies(MetadataDependencies dependencies); - } - /** The stage of the MetadataModel definition allowing to specify categories. */ - interface WithCategories { - /** - * Specifies the categories property: Categories for the solution content item. - * - * @param categories Categories for the solution content item. - * @return the next definition stage. - */ - WithCreate withCategories(MetadataCategories categories); - } - /** The stage of the MetadataModel definition allowing to specify providers. */ - interface WithProviders { - /** - * Specifies the providers property: Providers for the solution content item. - * - * @param providers Providers for the solution content item. - * @return the next definition stage. - */ - WithCreate withProviders(List providers); - } - /** The stage of the MetadataModel definition allowing to specify firstPublishDate. */ - interface WithFirstPublishDate { - /** - * Specifies the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate first publish date solution content item. - * @return the next definition stage. - */ - WithCreate withFirstPublishDate(LocalDate firstPublishDate); - } - /** The stage of the MetadataModel definition allowing to specify lastPublishDate. */ - interface WithLastPublishDate { - /** - * Specifies the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate last publish date for the solution content item. - * @return the next definition stage. - */ - 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. - * - * @return the stage of resource update. - */ - MetadataModel.Update update(); - - /** The template for MetadataModel update. */ - interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithContentId, - UpdateStages.WithParentId, - UpdateStages.WithVersion, - UpdateStages.WithKind, - UpdateStages.WithSource, - UpdateStages.WithAuthor, - UpdateStages.WithSupport, - UpdateStages.WithDependencies, - UpdateStages.WithCategories, - UpdateStages.WithProviders, - UpdateStages.WithFirstPublishDate, - UpdateStages.WithLastPublishDate, - UpdateStages.WithCustomVersion, - UpdateStages.WithContentSchemaVersion, - UpdateStages.WithIcon, - UpdateStages.WithThreatAnalysisTactics, - UpdateStages.WithThreatAnalysisTechniques, - UpdateStages.WithPreviewImages, - UpdateStages.WithPreviewImagesDark { - /** - * Executes the update request. - * - * @return the updated resource. - */ - MetadataModel apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - MetadataModel apply(Context context); - } - /** The MetadataModel update stages. */ - interface UpdateStages { - /** The stage of the MetadataModel update allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - Update withEtag(String etag); - } - /** The stage of the MetadataModel update allowing to specify contentId. */ - interface WithContentId { - /** - * Specifies the contentId property: Static ID for the content. Used to identify dependencies and content - * from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for - * user-created. This is the resource name. - * - * @param contentId Static ID for the content. Used to identify dependencies and content from solutions or - * community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This - * is the resource name. - * @return the next definition stage. - */ - Update withContentId(String contentId); - } - /** The stage of the MetadataModel update allowing to specify parentId. */ - interface WithParentId { - /** - * Specifies the parentId property: Full parent resource ID of the content item the metadata is for. This is - * the full resource ID including the scope (subscription and resource group). - * - * @param parentId Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * @return the next definition stage. - */ - Update withParentId(String parentId); - } - /** The stage of the MetadataModel update allowing to specify version. */ - interface WithVersion { - /** - * Specifies the version property: Version of the content. Default and recommended format is numeric (e.g. - * 1, 1.0, 1.0.0, 1.0.0.0), following ARM template best practices. Can also be any string, but then we - * cannot guarantee any version checks. - * - * @param version Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee - * any version checks. - * @return the next definition stage. - */ - Update withVersion(String version); - } - /** The stage of the MetadataModel update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of content the metadata is for.. - * - * @param kind The kind of content the metadata is for. - * @return the next definition stage. - */ - Update withKind(Kind kind); - } - /** The stage of the MetadataModel update allowing to specify source. */ - interface WithSource { - /** - * Specifies the source property: Source of the content. This is where/how it was created.. - * - * @param source Source of the content. This is where/how it was created. - * @return the next definition stage. - */ - Update withSource(MetadataSource source); - } - /** The stage of the MetadataModel update allowing to specify author. */ - interface WithAuthor { - /** - * Specifies the author property: The creator of the content item.. - * - * @param author The creator of the content item. - * @return the next definition stage. - */ - Update withAuthor(MetadataAuthor author); - } - /** The stage of the MetadataModel update allowing to specify support. */ - interface WithSupport { - /** - * Specifies the support property: Support information for the metadata - type, name, contact information. - * - * @param support Support information for the metadata - type, name, contact information. - * @return the next definition stage. - */ - Update withSupport(MetadataSupport support); - } - /** The stage of the MetadataModel update allowing to specify dependencies. */ - interface WithDependencies { - /** - * Specifies the dependencies property: Dependencies for the content item, what other content items it - * requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single - * dependency an id/kind/version can be supplied or operator/criteria for complex formats.. - * - * @param dependencies Dependencies for the content item, what other content items it requires to work. Can - * describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * @return the next definition stage. - */ - Update withDependencies(MetadataDependencies dependencies); - } - /** The stage of the MetadataModel update allowing to specify categories. */ - interface WithCategories { - /** - * Specifies the categories property: Categories for the solution content item. - * - * @param categories Categories for the solution content item. - * @return the next definition stage. - */ - Update withCategories(MetadataCategories categories); - } - /** The stage of the MetadataModel update allowing to specify providers. */ - interface WithProviders { - /** - * Specifies the providers property: Providers for the solution content item. - * - * @param providers Providers for the solution content item. - * @return the next definition stage. - */ - Update withProviders(List providers); - } - /** The stage of the MetadataModel update allowing to specify firstPublishDate. */ - interface WithFirstPublishDate { - /** - * Specifies the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate first publish date solution content item. - * @return the next definition stage. - */ - Update withFirstPublishDate(LocalDate firstPublishDate); - } - /** The stage of the MetadataModel update allowing to specify lastPublishDate. */ - interface WithLastPublishDate { - /** - * Specifies the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate last publish date for the solution content item. - * @return the next definition stage. - */ - 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. - * - * @return the refreshed resource. - */ - MetadataModel refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - MetadataModel refresh(Context context); -} 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 deleted file mode 100644 index 7556f02585fb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java +++ /dev/null @@ -1,507 +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.resourcemanager.securityinsights.fluent.models.MetadataPropertiesPatch; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.LocalDate; -import java.util.List; - -/** Metadata patch request body. */ -@Fluent -public final class MetadataPatch extends ResourceWithEtag { - /* - * Metadata patch request body - */ - @JsonProperty(value = "properties") - private MetadataPropertiesPatch innerProperties; - - /** - * Get the innerProperties property: Metadata patch request body. - * - * @return the innerProperties value. - */ - private MetadataPropertiesPatch innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public MetadataPatch withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @return the contentId value. - */ - public String contentId() { - return this.innerProperties() == null ? null : this.innerProperties().contentId(); - } - - /** - * Set the contentId property: Static ID for the content. Used to identify dependencies and content from solutions - * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the - * resource name. - * - * @param contentId the contentId value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withContentId(String contentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withContentId(contentId); - return this; - } - - /** - * Get the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @return the parentId value. - */ - public String parentId() { - return this.innerProperties() == null ? null : this.innerProperties().parentId(); - } - - /** - * Set the parentId property: Full parent resource ID of the content item the metadata is for. This is the full - * resource ID including the scope (subscription and resource group). - * - * @param parentId the parentId value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withParentId(String parentId) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withParentId(parentId); - return this; - } - - /** - * Get the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, - * 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version - * checks. - * - * @param version the version value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the kind property: The kind of content the metadata is for. - * - * @return the kind value. - */ - public Kind kind() { - return this.innerProperties() == null ? null : this.innerProperties().kind(); - } - - /** - * Set the kind property: The kind of content the metadata is for. - * - * @param kind the kind value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withKind(Kind kind) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withKind(kind); - return this; - } - - /** - * Get the source property: Source of the content. This is where/how it was created. - * - * @return the source value. - */ - public MetadataSource source() { - return this.innerProperties() == null ? null : this.innerProperties().source(); - } - - /** - * Set the source property: Source of the content. This is where/how it was created. - * - * @param source the source value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withSource(MetadataSource source) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Get the author property: The creator of the content item. - * - * @return the author value. - */ - public MetadataAuthor author() { - return this.innerProperties() == null ? null : this.innerProperties().author(); - } - - /** - * Set the author property: The creator of the content item. - * - * @param author the author value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withAuthor(MetadataAuthor author) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withAuthor(author); - return this; - } - - /** - * Get the support property: Support information for the metadata - type, name, contact information. - * - * @return the support value. - */ - public MetadataSupport support() { - return this.innerProperties() == null ? null : this.innerProperties().support(); - } - - /** - * Set the support property: Support information for the metadata - type, name, contact information. - * - * @param support the support value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withSupport(MetadataSupport support) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withSupport(support); - return this; - } - - /** - * Get the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @return the dependencies value. - */ - public MetadataDependencies dependencies() { - return this.innerProperties() == null ? null : this.innerProperties().dependencies(); - } - - /** - * Set the dependencies property: Dependencies for the content item, what other content items it requires to work. - * Can describe more complex dependencies using a recursive/nested structure. For a single dependency an - * id/kind/version can be supplied or operator/criteria for complex formats. - * - * @param dependencies the dependencies value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withDependencies(MetadataDependencies dependencies) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withDependencies(dependencies); - return this; - } - - /** - * Get the categories property: Categories for the solution content item. - * - * @return the categories value. - */ - public MetadataCategories categories() { - return this.innerProperties() == null ? null : this.innerProperties().categories(); - } - - /** - * Set the categories property: Categories for the solution content item. - * - * @param categories the categories value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withCategories(MetadataCategories categories) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withCategories(categories); - return this; - } - - /** - * Get the providers property: Providers for the solution content item. - * - * @return the providers value. - */ - public List providers() { - return this.innerProperties() == null ? null : this.innerProperties().providers(); - } - - /** - * Set the providers property: Providers for the solution content item. - * - * @param providers the providers value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withProviders(List providers) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withProviders(providers); - return this; - } - - /** - * Get the firstPublishDate property: first publish date solution content item. - * - * @return the firstPublishDate value. - */ - public LocalDate firstPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().firstPublishDate(); - } - - /** - * Set the firstPublishDate property: first publish date solution content item. - * - * @param firstPublishDate the firstPublishDate value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withFirstPublishDate(LocalDate firstPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withFirstPublishDate(firstPublishDate); - return this; - } - - /** - * Get the lastPublishDate property: last publish date for the solution content item. - * - * @return the lastPublishDate value. - */ - public LocalDate lastPublishDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastPublishDate(); - } - - /** - * Set the lastPublishDate property: last publish date for the solution content item. - * - * @param lastPublishDate the lastPublishDate value to set. - * @return the MetadataPatch object itself. - */ - public MetadataPatch withLastPublishDate(LocalDate lastPublishDate) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataPropertiesPatch(); - } - this.innerProperties().withLastPublishDate(lastPublishDate); - return this; - } - - /** - * Get the customVersion property: The custom version of the content. A optional free text. - * - * @return the customVersion value. - */ - public String customVersion() { - return this.innerProperties() == null ? null : this.innerProperties().customVersion(); - } - - /** - * Set the customVersion property: The custom version of the content. A optional free text. - * - * @param customVersion the customVersion value to set. - * @return the 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. - * - * @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/MetadataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java deleted file mode 100644 index 41a206a6dccf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.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.JsonProperty; - -/** The original source of the content item, where it comes from. */ -@Fluent -public final class MetadataSource { - /* - * Source type of the content - */ - @JsonProperty(value = "kind", required = true) - private SourceKind kind; - - /* - * Name of the content source. The repo name, solution name, LA workspace name etc. - */ - @JsonProperty(value = "name") - private String name; - - /* - * ID of the content source. The solution ID, workspace ID, etc - */ - @JsonProperty(value = "sourceId") - private String sourceId; - - /** - * Get the kind property: Source type of the content. - * - * @return the kind value. - */ - public SourceKind kind() { - return this.kind; - } - - /** - * Set the kind property: Source type of the content. - * - * @param kind the kind value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withKind(SourceKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the name property: Name of the content source. The repo name, solution name, LA workspace name etc. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the content source. The repo name, solution name, LA workspace name etc. - * - * @param name the name value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the sourceId property: ID of the content source. The solution ID, workspace ID, etc. - * - * @return the sourceId value. - */ - public String sourceId() { - return this.sourceId; - } - - /** - * Set the sourceId property: ID of the content source. The solution ID, workspace ID, etc. - * - * @param sourceId the sourceId value to set. - * @return the MetadataSource object itself. - */ - public MetadataSource withSourceId(String sourceId) { - this.sourceId = sourceId; - 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 MetadataSource")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataSource.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java deleted file mode 100644 index a25d51b568be..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Support information for the content item. */ -@Fluent -public final class MetadataSupport { - /* - * Type of support for content item - */ - @JsonProperty(value = "tier", required = true) - private SupportTier tier; - - /* - * Name of the support contact. Company or person. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Email of support contact - */ - @JsonProperty(value = "email") - private String email; - - /* - * Link for support help, like to support page to open a ticket etc. - */ - @JsonProperty(value = "link") - private String link; - - /** - * Get the tier property: Type of support for content item. - * - * @return the tier value. - */ - public SupportTier tier() { - return this.tier; - } - - /** - * Set the tier property: Type of support for content item. - * - * @param tier the tier value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withTier(SupportTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the name property: Name of the support contact. Company or person. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the support contact. Company or person. - * - * @param name the name value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withName(String name) { - this.name = name; - return this; - } - - /** - * Get the email property: Email of support contact. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: Email of support contact. - * - * @param email the email value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withEmail(String email) { - this.email = email; - return this; - } - - /** - * Get the link property: Link for support help, like to support page to open a ticket etc. - * - * @return the link value. - */ - public String link() { - return this.link; - } - - /** - * Set the link property: Link for support help, like to support page to open a ticket etc. - * - * @param link the link value to set. - * @return the MetadataSupport object itself. - */ - public MetadataSupport withLink(String link) { - this.link = link; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tier in model MetadataSupport")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MetadataSupport.class); -} 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 deleted file mode 100644 index b8be150a2a19..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ /dev/null @@ -1,157 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Metadatas. */ -public interface Metadatas { - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the metadata as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List of all metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. - * @param top Returns only the first n results. Optional. - * @param skip Used to skip n elements in the OData query (offset). Returns a nextLink to the next page of results - * if there are any left. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String filter, - String orderby, - Integer top, - Integer skip, - Context context); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. - */ - MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String metadataName); - - /** - * Delete a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); - - /** - * Get a Metadata. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. - */ - MetadataModel getById(String id); - - /** - * Get a Metadata. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Metadata. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a Metadata. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new MetadataModel resource. - * - * @param name resource name. - * @return the first stage of the new MetadataModel definition. - */ - MetadataModel.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java index 201a74e0f4e1..d72927a47966 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleI @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRule class. */ + public MicrosoftSecurityIncidentCreationAlertRule() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java index 5a6e176fc2a3..d76b0b58863b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java @@ -36,6 +36,10 @@ public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleCommonProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java index d908982016d7..acae8ee1cc5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplate extends Al @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplate class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplate() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule template properties. * @@ -34,232 +38,232 @@ private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProper } /** - * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. + * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @return the displayNamesFilter value. + * @return the alertRulesCreatedByTemplateCount value. */ - public List displayNamesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesFilter(); + public Integer alertRulesCreatedByTemplateCount() { + return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); } /** - * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. + * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * - * @param displayNamesFilter the displayNamesFilter value to set. + * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesFilter(List displayNamesFilter) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withAlertRulesCreatedByTemplateCount( + Integer alertRulesCreatedByTemplateCount) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withDisplayNamesFilter(displayNamesFilter); + this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); return this; } /** - * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. + * Get the createdDateUtc property: The time that this alert rule template has been added. * - * @return the displayNamesExcludeFilter value. + * @return the createdDateUtc value. */ - public List displayNamesExcludeFilter() { - return this.innerProperties() == null ? null : this.innerProperties().displayNamesExcludeFilter(); + public OffsetDateTime createdDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); } /** - * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. + * Get the lastUpdatedDateUtc property: The time that this alert rule template was last updated. * - * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. - * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. + * @return the lastUpdatedDateUtc value. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesExcludeFilter( - List displayNamesExcludeFilter) { - if (this.innerProperties() == null) { - this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayNamesExcludeFilter(displayNamesExcludeFilter); - return this; + public OffsetDateTime lastUpdatedDateUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); } /** - * Get the productFilter property: The alerts' productName on which the cases will be generated. + * Get the description property: The description of the alert rule template. * - * @return the productFilter value. + * @return the description value. */ - public MicrosoftSecurityProductName productFilter() { - return this.innerProperties() == null ? null : this.innerProperties().productFilter(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the productFilter property: The alerts' productName on which the cases will be generated. + * Set the description property: The description of the alert rule template. * - * @param productFilter the productFilter value to set. + * @param description the description value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withProductFilter( - MicrosoftSecurityProductName productFilter) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withProductFilter(productFilter); + this.innerProperties().withDescription(description); return this; } /** - * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. + * Get the displayName property: The display name for alert rule template. * - * @return the severitiesFilter value. + * @return the displayName value. */ - public List severitiesFilter() { - return this.innerProperties() == null ? null : this.innerProperties().severitiesFilter(); + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** - * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. + * Set the displayName property: The display name for alert rule template. * - * @param severitiesFilter the severitiesFilter value to set. + * @param displayName the displayName value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withSeveritiesFilter( - List severitiesFilter) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayName(String displayName) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withSeveritiesFilter(severitiesFilter); + this.innerProperties().withDisplayName(displayName); return this; } /** - * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Get the requiredDataConnectors property: The required data connectors for this template. * - * @return the alertRulesCreatedByTemplateCount value. + * @return the requiredDataConnectors value. */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().alertRulesCreatedByTemplateCount(); + public List requiredDataConnectors() { + return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); } /** - * Set the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. + * Set the requiredDataConnectors property: The required data connectors for this template. * - * @param alertRulesCreatedByTemplateCount the alertRulesCreatedByTemplateCount value to set. + * @param requiredDataConnectors the requiredDataConnectors value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withRequiredDataConnectors( + List requiredDataConnectors) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); + this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); return this; } /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. + * Get the status property: The alert rule template status. * - * @return the lastUpdatedDateUtc value. + * @return the status value. */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); + public TemplateStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Get the createdDateUtc property: The time that this alert rule template has been added. + * Set the status property: The alert rule template status. * - * @return the createdDateUtc value. + * @param status the status value to set. + * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withStatus(TemplateStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); + } + this.innerProperties().withStatus(status); + return this; } /** - * Get the description property: The description of the alert rule template. + * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * - * @return the description value. + * @return the displayNamesFilter value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public List displayNamesFilter() { + return this.innerProperties() == null ? null : this.innerProperties().displayNamesFilter(); } /** - * Set the description property: The description of the alert rule template. + * Set the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * - * @param description the description value to set. + * @param displayNamesFilter the displayNamesFilter value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDescription(String description) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesFilter(List displayNamesFilter) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withDescription(description); + this.innerProperties().withDisplayNamesFilter(displayNamesFilter); return this; } /** - * Get the displayName property: The display name for alert rule template. + * Get the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. * - * @return the displayName value. + * @return the displayNamesExcludeFilter value. */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + public List displayNamesExcludeFilter() { + return this.innerProperties() == null ? null : this.innerProperties().displayNamesExcludeFilter(); } /** - * Set the displayName property: The display name for alert rule template. + * Set the displayNamesExcludeFilter property: the alerts' displayNames on which the cases will not be generated. * - * @param displayName the displayName value to set. + * @param displayNamesExcludeFilter the displayNamesExcludeFilter value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayName(String displayName) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withDisplayNamesExcludeFilter( + List displayNamesExcludeFilter) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withDisplayName(displayName); + this.innerProperties().withDisplayNamesExcludeFilter(displayNamesExcludeFilter); return this; } /** - * Get the requiredDataConnectors property: The required data sources for this template. + * Get the productFilter property: The alerts' productName on which the cases will be generated. * - * @return the requiredDataConnectors value. + * @return the productFilter value. */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); + public MicrosoftSecurityProductName productFilter() { + return this.innerProperties() == null ? null : this.innerProperties().productFilter(); } /** - * Set the requiredDataConnectors property: The required data sources for this template. + * Set the productFilter property: The alerts' productName on which the cases will be generated. * - * @param requiredDataConnectors the requiredDataConnectors value to set. + * @param productFilter the productFilter value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withProductFilter( + MicrosoftSecurityProductName productFilter) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); + this.innerProperties().withProductFilter(productFilter); return this; } /** - * Get the status property: The alert rule template status. + * Get the severitiesFilter property: the alerts' severities on which the cases will be generated. * - * @return the status value. + * @return the severitiesFilter value. */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + public List severitiesFilter() { + return this.innerProperties() == null ? null : this.innerProperties().severitiesFilter(); } /** - * Set the status property: The alert rule template status. + * Set the severitiesFilter property: the alerts' severities on which the cases will be generated. * - * @param status the status value to set. + * @param severitiesFilter the severitiesFilter value to set. * @return the MicrosoftSecurityIncidentCreationAlertRuleTemplate object itself. */ - public MicrosoftSecurityIncidentCreationAlertRuleTemplate withStatus(TemplateStatus status) { + public MicrosoftSecurityIncidentCreationAlertRuleTemplate withSeveritiesFilter( + List severitiesFilter) { if (this.innerProperties() == null) { this.innerProperties = new MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties(); } - this.innerProperties().withStatus(status); + this.innerProperties().withSeveritiesFilter(severitiesFilter); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java index d6958d5cf48a..adef64846e16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java @@ -29,14 +29,6 @@ public final class MicrosoftSecurityProductName extends ExpandableStringEnum vlans() { - return this.innerProperties() == null ? null : this.innerProperties().vlans(); - } - - /** - * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented - * to the user. - * - * @return the additionalData value. - */ - public Map additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the friendlyName property: The graph item display name which is a short humanly readable description of the - * graph item instance. This property is optional and might be system generated. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * 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/NrtAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java deleted file mode 100644 index 7a23f7a2b182..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java +++ /dev/null @@ -1,442 +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.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleProperties; -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") -@JsonTypeName("NRT") -@Fluent -public final class NrtAlertRule extends AlertRuleInner { - /* - * NRT alert rule properties - */ - @JsonProperty(value = "properties") - private NrtAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: NRT alert rule properties. - * - * @return the innerProperties value. - */ - private NrtAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public NrtAlertRule withEtag(String etag) { - super.withEtag(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; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRule object itself. - */ - public NrtAlertRule withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - 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/NrtAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java deleted file mode 100644 index 551cb9589235..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java +++ /dev/null @@ -1,391 +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.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.NrtAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Represents NRT alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("NRT") -@Fluent -public final class NrtAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * NRT alert rule template properties - */ - @JsonProperty(value = "properties") - private NrtAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: NRT alert rule template properties. - * - * @return the innerProperties value. - */ - private NrtAlertRuleTemplateProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withQuery(String query) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withQuery(query); - 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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(severity); - 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.innerProperties() == null ? null : this.innerProperties().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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withVersion(version); - 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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withCustomDetails(Map customDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - 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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withEntityMappings(List entityMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - 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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertDetailsOverride(alertDetailsOverride); - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.innerProperties() == null ? null : this.innerProperties().eventGroupingSettings(); - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings eventGroupingSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withEventGroupingSettings(eventGroupingSettings); - 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. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().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 NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withAlertRulesCreatedByTemplateCount(Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @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 template. - * - * @param description the description value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withRequiredDataConnectors(List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the NrtAlertRuleTemplate object itself. - */ - public NrtAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new NrtAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - 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/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java deleted file mode 100644 index 8ed7cfef085e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.Office365ProjectCheckRequirementsProperties; -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 { - /* - * 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 deleted file mode 100644 index bafc9102b1dd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Office Microsoft Project data connector. */ -@Fluent -public final class Office365ProjectConnectorDataTypes { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Office365ProjectConnectorDataTypes.class); -} 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 deleted file mode 100644 index 80908337be80..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +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; - -/** Logs data type. */ -@Fluent -public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@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 deleted file mode 100644 index 7665b6940195..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.Office365ProjectDataConnectorProperties; -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 { - /* - * 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/OfficeAtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java deleted file mode 100644 index 25d2ff4c15b4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java +++ /dev/null @@ -1,46 +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.resourcemanager.securityinsights.fluent.models.OfficeAtpCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeATP (Office 365 Advanced Threat Protection) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeATP") -@Fluent -public final class OfficeAtpCheckRequirements extends DataConnectorsCheckRequirements { - /* - * OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. - */ - @JsonProperty(value = "properties") - private OfficeAtpCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) requirements check - * properties. - * - * @return the innerProperties value. - */ - private OfficeAtpCheckRequirementsProperties 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/OfficeAtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java deleted file mode 100644 index 2a339d8590fd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeAtpDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeATP (Office 365 Advanced Threat Protection) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeATP") -@Fluent -public final class OfficeAtpDataConnector extends DataConnectorInner { - /* - * OfficeATP (Office 365 Advanced Threat Protection) data connector properties. - */ - @JsonProperty(value = "properties") - private OfficeAtpDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) data connector properties. - * - * @return the innerProperties value. - */ - private OfficeAtpDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficeAtpDataConnector withEtag(String etag) { - super.withEtag(etag); - 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 OfficeAtpDataConnector object itself. - */ - public OfficeAtpDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeAtpDataConnectorProperties(); - } - 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 OfficeAtpDataConnector object itself. - */ - public OfficeAtpDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeAtpDataConnectorProperties(); - } - 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/OfficeConsent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsent.java deleted file mode 100644 index 537732e3a122..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsent.java +++ /dev/null @@ -1,60 +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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; - -/** An immutable client-side representation of OfficeConsent. */ -public interface OfficeConsent { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the tenantId property: The tenantId of the Office365 with the consent. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the consentId property: Help to easily cascade among the data layers. - * - * @return the consentId value. - */ - String consentId(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner object. - * - * @return the inner object. - */ - OfficeConsentInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java deleted file mode 100644 index c82170f9180d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.OfficeConsentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of all the office365 consents. */ -@Fluent -public final class OfficeConsentList { - /* - * URL to fetch the next set of office consents. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of the consents. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of office consents. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of the consents. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of the consents. - * - * @param value the value value to set. - * @return the OfficeConsentList object itself. - */ - public OfficeConsentList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model OfficeConsentList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeConsentList.class); -} 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 deleted file mode 100644 index ed83191305b5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java +++ /dev/null @@ -1,92 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OfficeConsents. */ -public interface OfficeConsents { - /** - * Gets all office365 consents. - * - * @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 office365 consents as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all office365 consents. - * - * @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 office365 consents as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. - */ - OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); - - /** - * Gets an office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String consentId); - - /** - * Delete the office365 consent. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param consentId consent ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java index 2fb508346db8..0ed289a3b083 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeDataConnectorProperties innerProperties; + /** Creates an instance of OfficeDataConnector class. */ + public OfficeDataConnector() { + } + /** * Get the innerProperties property: Office data connector properties. * @@ -39,48 +43,48 @@ public OfficeDataConnector withEtag(String etag) { } /** - * Get the dataTypes property: The available data types for the connector. + * Get the tenantId property: The tenant id to connect to, and get the data from. * - * @return the dataTypes value. + * @return the tenantId value. */ - public OfficeDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** - * Set the dataTypes property: The available data types for the connector. + * Set the tenantId property: The tenant id to connect to, and get the data from. * - * @param dataTypes the dataTypes value to set. + * @param tenantId the tenantId value to set. * @return the OfficeDataConnector object itself. */ - public OfficeDataConnector withDataTypes(OfficeDataConnectorDataTypes dataTypes) { + public OfficeDataConnector withTenantId(String tenantId) { if (this.innerProperties() == null) { this.innerProperties = new OfficeDataConnectorProperties(); } - this.innerProperties().withDataTypes(dataTypes); + this.innerProperties().withTenantId(tenantId); return this; } /** - * Get the tenantId property: The tenant id to connect to, and get the data from. + * Get the dataTypes property: The available data types for the connector. * - * @return the tenantId value. + * @return the dataTypes value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public OfficeDataConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); } /** - * Set the tenantId property: The tenant id to connect to, and get the data from. + * Set the dataTypes property: The available data types for the connector. * - * @param tenantId the tenantId value to set. + * @param dataTypes the dataTypes value to set. * @return the OfficeDataConnector object itself. */ - public OfficeDataConnector withTenantId(String tenantId) { + public OfficeDataConnector withDataTypes(OfficeDataConnectorDataTypes dataTypes) { if (this.innerProperties() == null) { this.innerProperties = new OfficeDataConnectorProperties(); } - this.innerProperties().withTenantId(tenantId); + this.innerProperties().withDataTypes(dataTypes); return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java index f96e94afc749..6363966ccdc9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for office data connector. */ @@ -14,21 +13,25 @@ public final class OfficeDataConnectorDataTypes { /* * Exchange data type connection. */ - @JsonProperty(value = "exchange", required = true) + @JsonProperty(value = "exchange") private OfficeDataConnectorDataTypesExchange exchange; /* * SharePoint data type connection. */ - @JsonProperty(value = "sharePoint", required = true) + @JsonProperty(value = "sharePoint") private OfficeDataConnectorDataTypesSharePoint sharePoint; /* * Teams data type connection. */ - @JsonProperty(value = "teams", required = true) + @JsonProperty(value = "teams") private OfficeDataConnectorDataTypesTeams teams; + /** Creates an instance of OfficeDataConnectorDataTypes class. */ + public OfficeDataConnectorDataTypes() { + } + /** * Get the exchange property: Exchange data type connection. * @@ -95,31 +98,14 @@ public OfficeDataConnectorDataTypes withTeams(OfficeDataConnectorDataTypesTeams * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (exchange() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property exchange in model OfficeDataConnectorDataTypes")); - } else { + if (exchange() != null) { exchange().validate(); } - if (sharePoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sharePoint in model OfficeDataConnectorDataTypes")); - } else { + if (sharePoint() != null) { sharePoint().validate(); } - if (teams() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property teams in model OfficeDataConnectorDataTypes")); - } else { + if (teams() != null) { teams().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(OfficeDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java index f4bb9c178fe0..d5115e8c9b48 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java @@ -9,6 +9,10 @@ /** Exchange data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesExchange class. */ + public OfficeDataConnectorDataTypesExchange() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesExchange withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java index 85b62eaef4d0..08ab9688e59a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java @@ -9,6 +9,10 @@ /** SharePoint data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesSharePoint class. */ + public OfficeDataConnectorDataTypesSharePoint() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesSharePoint withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java index a16d1b5ddc04..1ff0e69de273 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java @@ -9,6 +9,10 @@ /** Teams data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesTeams class. */ + public OfficeDataConnectorDataTypesTeams() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesTeams withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java deleted file mode 100644 index 0572876278d1..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.OfficeIrmCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeIRM (Microsoft Insider Risk Management) requirements check request. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeIRM") -@Fluent -public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequirements { - /* - * OfficeIRM (Microsoft Insider Risk Management) requirements check properties. - */ - @JsonProperty(value = "properties") - private OfficeIrmCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) requirements check properties. - * - * @return the innerProperties value. - */ - private OfficeIrmCheckRequirementsProperties 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/OfficeIrmDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java deleted file mode 100644 index 0a26b9e45492..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficeIrmDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents OfficeIRM (Microsoft Insider Risk Management) data connector. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("OfficeIRM") -@Fluent -public final class OfficeIrmDataConnector extends DataConnectorInner { - /* - * OfficeIRM (Microsoft Insider Risk Management) data connector properties. - */ - @JsonProperty(value = "properties") - private OfficeIrmDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) data connector properties. - * - * @return the innerProperties value. - */ - private OfficeIrmDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public OfficeIrmDataConnector withEtag(String etag) { - super.withEtag(etag); - 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 OfficeIrmDataConnector object itself. - */ - public OfficeIrmDataConnector withDataTypes(AlertsDataTypeOfDataConnector dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeIrmDataConnectorProperties(); - } - 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 OfficeIrmDataConnector object itself. - */ - public OfficeIrmDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new OfficeIrmDataConnectorProperties(); - } - 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/OfficePowerBICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java deleted file mode 100644 index 8e52f4d91bb2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.OfficePowerBICheckRequirementsProperties; -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 { - /* - * 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 deleted file mode 100644 index 42b1400cfcf4..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Office Microsoft PowerBI data connector. */ -@Fluent -public final class OfficePowerBIConnectorDataTypes { - /* - * 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(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OfficePowerBIConnectorDataTypes.class); -} 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 deleted file mode 100644 index 0e71c0fd1cad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java +++ /dev/null @@ -1,28 +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; - -/** Logs data type. */ -@Fluent -public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { - /** {@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 deleted file mode 100644 index 2c7496612394..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java +++ /dev/null @@ -1,99 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.OfficePowerBIDataConnectorProperties; -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 { - /* - * 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/OperationDisplay.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java index 54967890e46e..bad441db6f3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "resource") private String resource; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the description property: Description of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java index 47df47f99519..c88eb98bd944 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java @@ -25,6 +25,10 @@ public final class OperationsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OperationsList class. */ + public OperationsList() { + } + /** * Get the nextLink property: URL to fetch the next set of operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java deleted file mode 100644 index 77aafbf0cf2b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java +++ /dev/null @@ -1,38 +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; - -/** Operator used for list of dependencies in criteria array. */ -public final class Operator extends ExpandableStringEnum { - /** Static value AND for Operator. */ - public static final Operator AND = fromString("AND"); - - /** Static value OR for Operator. */ - public static final Operator OR = fromString("OR"); - - /** - * Creates or finds a Operator from its string representation. - * - * @param name a name to look for. - * @return the corresponding Operator. - */ - @JsonCreator - public static Operator fromString(String name) { - return fromString(name, Operator.class); - } - - /** - * Gets known Operator values. - * - * @return known Operator values. - */ - public static Collection values() { - return values(Operator.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java deleted file mode 100644 index 6fff09628529..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java +++ /dev/null @@ -1,44 +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; - -/** Insights Column type. */ -public final class OutputType extends ExpandableStringEnum { - /** Static value Number for OutputType. */ - public static final OutputType NUMBER = fromString("Number"); - - /** Static value String for OutputType. */ - public static final OutputType STRING = fromString("String"); - - /** Static value Date for OutputType. */ - public static final OutputType DATE = fromString("Date"); - - /** Static value Entity for OutputType. */ - public static final OutputType ENTITY = fromString("Entity"); - - /** - * Creates or finds a OutputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputType. - */ - @JsonCreator - public static OutputType fromString(String name) { - return fromString(name, OutputType.class); - } - - /** - * Gets known OutputType values. - * - * @return known OutputType values. - */ - public static Collection values() { - return values(OutputType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java deleted file mode 100644 index ba4232af432e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java +++ /dev/null @@ -1,41 +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; - -/** Permission provider scope. */ -public final class PermissionProviderScope extends ExpandableStringEnum { - /** Static value ResourceGroup for PermissionProviderScope. */ - public static final PermissionProviderScope RESOURCE_GROUP = fromString("ResourceGroup"); - - /** Static value Subscription for PermissionProviderScope. */ - public static final PermissionProviderScope SUBSCRIPTION = fromString("Subscription"); - - /** Static value Workspace for PermissionProviderScope. */ - public static final PermissionProviderScope WORKSPACE = fromString("Workspace"); - - /** - * Creates or finds a PermissionProviderScope from its string representation. - * - * @param name a name to look for. - * @return the corresponding PermissionProviderScope. - */ - @JsonCreator - public static PermissionProviderScope fromString(String name) { - return fromString(name, PermissionProviderScope.class); - } - - /** - * Gets known PermissionProviderScope values. - * - * @return known PermissionProviderScope values. - */ - public static Collection values() { - return values(PermissionProviderScope.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java deleted file mode 100644 index cfeebee1b045..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Permissions.java +++ /dev/null @@ -1,79 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Permissions required for the connector. */ -@Fluent -public final class Permissions { - /* - * Resource provider permissions required for the connector - */ - @JsonProperty(value = "resourceProvider") - private List resourceProvider; - - /* - * Customs permissions required for the connector - */ - @JsonProperty(value = "customs") - private List customs; - - /** - * Get the resourceProvider property: Resource provider permissions required for the connector. - * - * @return the resourceProvider value. - */ - public List resourceProvider() { - return this.resourceProvider; - } - - /** - * Set the resourceProvider property: Resource provider permissions required for the connector. - * - * @param resourceProvider the resourceProvider value to set. - * @return the Permissions object itself. - */ - public Permissions withResourceProvider(List resourceProvider) { - this.resourceProvider = resourceProvider; - return this; - } - - /** - * Get the customs property: Customs permissions required for the connector. - * - * @return the customs value. - */ - public List customs() { - return this.customs; - } - - /** - * Set the customs property: Customs permissions required for the connector. - * - * @param customs the customs value to set. - * @return the Permissions object itself. - */ - public Permissions withCustoms(List customs) { - this.customs = customs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceProvider() != null) { - resourceProvider().forEach(e -> e.validate()); - } - if (customs() != null) { - customs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java deleted file mode 100644 index 943909826a2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java +++ /dev/null @@ -1,35 +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; - -/** The PermissionsCustomsItem model. */ -@Fluent -public final class PermissionsCustomsItem extends Customs { - /** {@inheritDoc} */ - @Override - public PermissionsCustomsItem withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsCustomsItem withDescription(String description) { - super.withDescription(description); - 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/PermissionsResourceProviderItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java deleted file mode 100644 index d2db9072abc2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java +++ /dev/null @@ -1,56 +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; - -/** The PermissionsResourceProviderItem model. */ -@Fluent -public final class PermissionsResourceProviderItem extends ResourceProvider { - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withProvider(ProviderName provider) { - super.withProvider(provider); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withPermissionsDisplayText(String permissionsDisplayText) { - super.withPermissionsDisplayText(permissionsDisplayText); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withProviderDisplayName(String providerDisplayName) { - super.withProviderDisplayName(providerDisplayName); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withScope(PermissionProviderScope scope) { - super.withScope(scope); - return this; - } - - /** {@inheritDoc} */ - @Override - public PermissionsResourceProviderItem withRequiredPermissions(RequiredPermissions requiredPermissions) { - super.withRequiredPermissions(requiredPermissions); - 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/PlaybookActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java index 9d85ffb7802b..e2cf7b0d6cf0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; @@ -12,17 +13,21 @@ @Fluent public final class PlaybookActionProperties { /* - * The resource id of the playbook resource. + * The resource id of the playbook resource */ - @JsonProperty(value = "logicAppResourceId") + @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; /* - * The tenant id of the playbook resource. + * The tenant id of the playbook resource */ @JsonProperty(value = "tenantId") private UUID tenantId; + /** Creates an instance of PlaybookActionProperties class. */ + public PlaybookActionProperties() { + } + /** * Get the logicAppResourceId property: The resource id of the playbook resource. * @@ -69,5 +74,13 @@ public PlaybookActionProperties withTenantId(UUID tenantId) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (logicAppResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logicAppResourceId in model PlaybookActionProperties")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(PlaybookActionProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java deleted file mode 100644 index e62fa3c41717..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java +++ /dev/null @@ -1,41 +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; - -/** The polling frequency for the TAXII server. */ -public final class PollingFrequency extends ExpandableStringEnum { - /** Static value OnceAMinute for PollingFrequency. */ - public static final PollingFrequency ONCE_AMINUTE = fromString("OnceAMinute"); - - /** Static value OnceAnHour for PollingFrequency. */ - public static final PollingFrequency ONCE_AN_HOUR = fromString("OnceAnHour"); - - /** Static value OnceADay for PollingFrequency. */ - public static final PollingFrequency ONCE_ADAY = fromString("OnceADay"); - - /** - * Creates or finds a PollingFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding PollingFrequency. - */ - @JsonCreator - public static PollingFrequency fromString(String name) { - return fromString(name, PollingFrequency.class); - } - - /** - * Gets known PollingFrequency values. - * - * @return known PollingFrequency values. - */ - public static Collection values() { - return values(PollingFrequency.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java index 1d192d71c851..17f62476d878 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.ProcessEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,13 +16,17 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Process") @Fluent -public final class ProcessEntity extends EntityInner { +public final class ProcessEntity extends Entity { /* * Process entity properties */ @JsonProperty(value = "properties") private ProcessEntityProperties innerProperties; + /** Creates an instance of ProcessEntity class. */ + public ProcessEntity() { + } + /** * Get the innerProperties property: Process entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java deleted file mode 100644 index ead1ce681b97..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java +++ /dev/null @@ -1,122 +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.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** Resource collection API of ProductSettings. */ -public interface ProductSettings { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - SettingList list(String resourceGroupName, String workspaceName); - - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. - */ - Settings get(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Gets a setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String settingsName); - - /** - * Delete setting of the product. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. - */ - Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); - - /** - * Updates setting. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. - */ - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java deleted file mode 100644 index dc048782a94f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java +++ /dev/null @@ -1,56 +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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates an array property's value change. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyArrayChanged") -@Fluent -public final class PropertyArrayChangedConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyArrayChangedValuesCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyArrayChangedValuesCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyArrayChangedConditionProperties object itself. - */ - public PropertyArrayChangedConditionProperties withConditionProperties( - AutomationRulePropertyArrayChangedValuesCondition 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/PropertyArrayConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java deleted file mode 100644 index a508d41ec873..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java +++ /dev/null @@ -1,56 +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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes an automation rule condition that evaluates an array property's value. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyArray") -@Fluent -public final class PropertyArrayConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyArrayValuesCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyArrayValuesCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyArrayConditionProperties object itself. - */ - public PropertyArrayConditionProperties withConditionProperties( - AutomationRulePropertyArrayValuesCondition 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/PropertyChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java deleted file mode 100644 index 22470af86a46..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java +++ /dev/null @@ -1,56 +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.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 change. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "conditionType") -@JsonTypeName("PropertyChanged") -@Fluent -public final class PropertyChangedConditionProperties extends AutomationRuleCondition { - /* - * The conditionProperties property. - */ - @JsonProperty(value = "conditionProperties") - private AutomationRulePropertyValuesChangedCondition conditionProperties; - - /** - * Get the conditionProperties property: The conditionProperties property. - * - * @return the conditionProperties value. - */ - public AutomationRulePropertyValuesChangedCondition conditionProperties() { - return this.conditionProperties; - } - - /** - * Set the conditionProperties property: The conditionProperties property. - * - * @param conditionProperties the conditionProperties value to set. - * @return the PropertyChangedConditionProperties object itself. - */ - public PropertyChangedConditionProperties withConditionProperties( - AutomationRulePropertyValuesChangedCondition 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/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java index 7c641a0bca1e..58c0036f081d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesCondition conditionProperties; + /** Creates an instance of PropertyConditionProperties class. */ + public PropertyConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java deleted file mode 100644 index a365b42e5c16..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java +++ /dev/null @@ -1,56 +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; - -/** Provider name. */ -public final class ProviderName extends ExpandableStringEnum { - /** Static value Microsoft.OperationalInsights/solutions for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_SOLUTIONS = - fromString("Microsoft.OperationalInsights/solutions"); - - /** Static value Microsoft.OperationalInsights/workspaces for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES = - fromString("Microsoft.OperationalInsights/workspaces"); - - /** Static value Microsoft.OperationalInsights/workspaces/datasources for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_DATASOURCES = - fromString("Microsoft.OperationalInsights/workspaces/datasources"); - - /** Static value microsoft.aadiam/diagnosticSettings for ProviderName. */ - public static final ProviderName MICROSOFT_AADIAM_DIAGNOSTIC_SETTINGS = - fromString("microsoft.aadiam/diagnosticSettings"); - - /** Static value Microsoft.OperationalInsights/workspaces/sharedKeys for ProviderName. */ - public static final ProviderName MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS = - fromString("Microsoft.OperationalInsights/workspaces/sharedKeys"); - - /** Static value Microsoft.Authorization/policyAssignments for ProviderName. */ - public static final ProviderName MICROSOFT_AUTHORIZATION_POLICY_ASSIGNMENTS = - fromString("Microsoft.Authorization/policyAssignments"); - - /** - * Creates or finds a ProviderName from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProviderName. - */ - @JsonCreator - public static ProviderName fromString(String name) { - return fromString(name, ProviderName.class); - } - - /** - * Gets known ProviderName values. - * - * @return known ProviderName values. - */ - public static Collection values() { - return values(ProviderName.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java deleted file mode 100644 index e20070c785ad..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java +++ /dev/null @@ -1,218 +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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Query based alert rule template base property bag. */ -@Fluent -public class QueryBasedAlertRuleTemplateProperties { - /* - * The query that creates alerts for this rule. - */ - @JsonProperty(value = "query") - private String query; - - /* - * The severity for alerts created by this alert rule. - */ - @JsonProperty(value = "severity") - private AlertSeverity severity; - - /* - * The version of this template - in format , where all are numbers. For example <1.0.2>. - */ - @JsonProperty(value = "version") - private String version; - - /* - * 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; - - /* - * The event grouping settings. - */ - @JsonProperty(value = "eventGroupingSettings") - private EventGroupingSettings eventGroupingSettings; - - /** - * 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withQuery(String query) { - this.query = query; - 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withSeverity(AlertSeverity severity) { - this.severity = severity; - 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withVersion(String version) { - this.version = version; - 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties 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 QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetailsOverride alertDetailsOverride) { - this.alertDetailsOverride = alertDetailsOverride; - return this; - } - - /** - * Get the eventGroupingSettings property: The event grouping settings. - * - * @return the eventGroupingSettings value. - */ - public EventGroupingSettings eventGroupingSettings() { - return this.eventGroupingSettings; - } - - /** - * Set the eventGroupingSettings property: The event grouping settings. - * - * @param eventGroupingSettings the eventGroupingSettings value to set. - * @return the QueryBasedAlertRuleTemplateProperties object itself. - */ - public QueryBasedAlertRuleTemplateProperties withEventGroupingSettings( - EventGroupingSettings eventGroupingSettings) { - this.eventGroupingSettings = eventGroupingSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void 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/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java index 116afd6feb60..e5a22b2b8cb9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryKeyEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,14 +14,18 @@ /** Represents a registry key entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryKey") -@Fluent -public final class RegistryKeyEntity extends EntityInner { +@Immutable +public final class RegistryKeyEntity extends Entity { /* * RegistryKey entity properties */ @JsonProperty(value = "properties") private RegistryKeyEntityProperties innerProperties; + /** Creates an instance of RegistryKeyEntity class. */ + public RegistryKeyEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java index 8121d653cb19..326ada27161e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryValueEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,14 +14,18 @@ /** Represents a registry value entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryValue") -@Fluent -public final class RegistryValueEntity extends EntityInner { +@Immutable +public final class RegistryValueEntity extends Entity { /* * RegistryKey entity properties */ @JsonProperty(value = "properties") private RegistryValueEntityProperties innerProperties; + /** Creates an instance of RegistryValueEntity class. */ + public RegistryValueEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java index 7e14109d67f6..7840f04597da 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Relation.java @@ -99,14 +99,14 @@ interface Blank extends WithParentResource { /** The stage of the Relation definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, workspaceName, bookmarkId. + * Specifies resourceGroupName, workspaceName, incidentId. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. + * @param incidentId Incident ID. * @return the next definition stage. */ - WithCreate withExistingBookmark(String resourceGroupName, String workspaceName, String bookmarkId); + WithCreate withExistingIncident(String resourceGroupName, String workspaceName, String incidentId); } /** * The stage of the Relation definition which contains all the minimum required properties for the resource to diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java index 7c2e13d40225..fe4afdfb9a10 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RelationList.java @@ -25,6 +25,10 @@ public final class RelationList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of RelationList class. */ + public RelationList() { + } + /** * Get the nextLink property: URL to fetch the next set of relations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java deleted file mode 100644 index 8510709ca5b3..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java +++ /dev/null @@ -1,39 +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.resourcemanager.securityinsights.fluent.models.RepoInner; -import java.util.List; - -/** An immutable client-side representation of Repo. */ -public interface Repo { - /** - * Gets the url property: The url to access the repository. - * - * @return the url value. - */ - String url(); - - /** - * Gets the fullName property: The name of the repository. - * - * @return the fullName value. - */ - String fullName(); - - /** - * Gets the branches property: Array of branches. - * - * @return the branches value. - */ - List branches(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RepoInner object. - * - * @return the inner object. - */ - RepoInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java deleted file mode 100644 index 02aaa874b88d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java +++ /dev/null @@ -1,72 +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.azure.resourcemanager.securityinsights.fluent.models.RepoInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the source controls. */ -@Fluent -public final class RepoList { - /* - * URL to fetch the next set of repositories. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of repositories. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of repositories. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of repositories. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of repositories. - * - * @param value the value value to set. - * @return the RepoList object itself. - */ - public RepoList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property value in model RepoList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RepoList.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java deleted file mode 100644 index dcb33e87b257..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java +++ /dev/null @@ -1,38 +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; - -/** The type of repository. */ -public final class RepoType extends ExpandableStringEnum { - /** Static value Github for RepoType. */ - public static final RepoType GITHUB = fromString("Github"); - - /** Static value DevOps for RepoType. */ - public static final RepoType DEV_OPS = fromString("DevOps"); - - /** - * Creates or finds a RepoType from its string representation. - * - * @param name a name to look for. - * @return the corresponding RepoType. - */ - @JsonCreator - public static RepoType fromString(String name) { - return fromString(name, RepoType.class); - } - - /** - * Gets known RepoType values. - * - * @return known RepoType values. - */ - public static Collection values() { - return values(RepoType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java deleted file mode 100644 index 3e26879725a5..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java +++ /dev/null @@ -1,154 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** metadata of a repository. */ -@Fluent -public final class Repository { - /* - * Url of repository. - */ - @JsonProperty(value = "url") - private String url; - - /* - * Branch name of repository. - */ - @JsonProperty(value = "branch") - private String branch; - - /* - * Display url of repository. - */ - @JsonProperty(value = "displayUrl") - private String displayUrl; - - /* - * Url to access repository action logs. - */ - @JsonProperty(value = "deploymentLogsUrl") - private String deploymentLogsUrl; - - /* - * Dictionary of source control content type and path mapping. - */ - @JsonProperty(value = "pathMapping") - private List pathMapping; - - /** - * Get the url property: Url of repository. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: Url of repository. - * - * @param url the url value to set. - * @return the Repository object itself. - */ - public Repository withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the branch property: Branch name of repository. - * - * @return the branch value. - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch property: Branch name of repository. - * - * @param branch the branch value to set. - * @return the Repository object itself. - */ - public Repository withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the displayUrl property: Display url of repository. - * - * @return the displayUrl value. - */ - public String displayUrl() { - return this.displayUrl; - } - - /** - * Set the displayUrl property: Display url of repository. - * - * @param displayUrl the displayUrl value to set. - * @return the Repository object itself. - */ - public Repository withDisplayUrl(String displayUrl) { - this.displayUrl = displayUrl; - 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 Repository object itself. - */ - public Repository withDeploymentLogsUrl(String deploymentLogsUrl) { - this.deploymentLogsUrl = deploymentLogsUrl; - return this; - } - - /** - * Get the pathMapping property: Dictionary of source control content type and path mapping. - * - * @return the pathMapping value. - */ - public List pathMapping() { - return this.pathMapping; - } - - /** - * Set the pathMapping property: Dictionary of source control content type and path mapping. - * - * @param pathMapping the pathMapping value to set. - * @return the Repository object itself. - */ - public Repository withPathMapping(List pathMapping) { - this.pathMapping = pathMapping; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pathMapping() != null) { - pathMapping().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 5e10c94993ff..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java +++ /dev/null @@ -1,107 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Resources created in user's repository for the source-control. */ -@Fluent -public final class RepositoryResourceInfo { - /* - * 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/RequiredPermissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java deleted file mode 100644 index 146d39665d20..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java +++ /dev/null @@ -1,124 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Required permissions for the connector. */ -@Fluent -public final class RequiredPermissions { - /* - * action permission - */ - @JsonProperty(value = "action") - private Boolean action; - - /* - * write permission - */ - @JsonProperty(value = "write") - private Boolean write; - - /* - * read permission - */ - @JsonProperty(value = "read") - private Boolean read; - - /* - * delete permission - */ - @JsonProperty(value = "delete") - private Boolean delete; - - /** - * Get the action property: action permission. - * - * @return the action value. - */ - public Boolean action() { - return this.action; - } - - /** - * Set the action property: action permission. - * - * @param action the action value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withAction(Boolean action) { - this.action = action; - return this; - } - - /** - * Get the write property: write permission. - * - * @return the write value. - */ - public Boolean write() { - return this.write; - } - - /** - * Set the write property: write permission. - * - * @param write the write value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withWrite(Boolean write) { - this.write = write; - return this; - } - - /** - * Get the read property: read permission. - * - * @return the read value. - */ - public Boolean read() { - return this.read; - } - - /** - * Set the read property: read permission. - * - * @param read the read value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withRead(Boolean read) { - this.read = read; - return this; - } - - /** - * Get the delete property: delete permission. - * - * @return the delete value. - */ - public Boolean delete() { - return this.delete; - } - - /** - * Set the delete property: delete permission. - * - * @param delete the delete value to set. - * @return the RequiredPermissions object itself. - */ - public RequiredPermissions withDelete(Boolean delete) { - this.delete = delete; - 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/ResourceProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java deleted file mode 100644 index 7024f46e5562..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java +++ /dev/null @@ -1,153 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Resource provider permissions required for the connector. */ -@Fluent -public class ResourceProvider { - /* - * Provider name - */ - @JsonProperty(value = "provider") - private ProviderName provider; - - /* - * Permission description text - */ - @JsonProperty(value = "permissionsDisplayText") - private String permissionsDisplayText; - - /* - * Permission provider display name - */ - @JsonProperty(value = "providerDisplayName") - private String providerDisplayName; - - /* - * Permission provider scope - */ - @JsonProperty(value = "scope") - private PermissionProviderScope scope; - - /* - * Required permissions for the connector - */ - @JsonProperty(value = "requiredPermissions") - private RequiredPermissions requiredPermissions; - - /** - * Get the provider property: Provider name. - * - * @return the provider value. - */ - public ProviderName provider() { - return this.provider; - } - - /** - * Set the provider property: Provider name. - * - * @param provider the provider value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withProvider(ProviderName provider) { - this.provider = provider; - return this; - } - - /** - * Get the permissionsDisplayText property: Permission description text. - * - * @return the permissionsDisplayText value. - */ - public String permissionsDisplayText() { - return this.permissionsDisplayText; - } - - /** - * Set the permissionsDisplayText property: Permission description text. - * - * @param permissionsDisplayText the permissionsDisplayText value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withPermissionsDisplayText(String permissionsDisplayText) { - this.permissionsDisplayText = permissionsDisplayText; - return this; - } - - /** - * Get the providerDisplayName property: Permission provider display name. - * - * @return the providerDisplayName value. - */ - public String providerDisplayName() { - return this.providerDisplayName; - } - - /** - * Set the providerDisplayName property: Permission provider display name. - * - * @param providerDisplayName the providerDisplayName value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withProviderDisplayName(String providerDisplayName) { - this.providerDisplayName = providerDisplayName; - return this; - } - - /** - * Get the scope property: Permission provider scope. - * - * @return the scope value. - */ - public PermissionProviderScope scope() { - return this.scope; - } - - /** - * Set the scope property: Permission provider scope. - * - * @param scope the scope value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withScope(PermissionProviderScope scope) { - this.scope = scope; - return this; - } - - /** - * Get the requiredPermissions property: Required permissions for the connector. - * - * @return the requiredPermissions value. - */ - public RequiredPermissions requiredPermissions() { - return this.requiredPermissions; - } - - /** - * Set the requiredPermissions property: Required permissions for the connector. - * - * @param requiredPermissions the requiredPermissions value to set. - * @return the ResourceProvider object itself. - */ - public ResourceProvider withRequiredPermissions(RequiredPermissions requiredPermissions) { - this.requiredPermissions = requiredPermissions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (requiredPermissions() != null) { - requiredPermissions().validate(); - } - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java index 6ed4515163c8..8d8a4234f62d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java @@ -24,6 +24,10 @@ public class ResourceWithEtag extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ResourceWithEtag class. */ + public ResourceWithEtag() { + } + /** * Get the etag property: Etag of the azure resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java deleted file mode 100644 index 21b538e67f10..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java +++ /dev/null @@ -1,72 +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.fasterxml.jackson.annotation.JsonProperty; - -/** The sample queries for the connector. */ -@Fluent -public class SampleQueries { - /* - * The sample query description - */ - @JsonProperty(value = "description") - private String description; - - /* - * the sample query - */ - @JsonProperty(value = "query") - private String query; - - /** - * Get the description property: The sample query description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The sample query description. - * - * @param description the description value to set. - * @return the SampleQueries object itself. - */ - public SampleQueries withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the query property: the sample query. - * - * @return the query value. - */ - public String query() { - return this.query; - } - - /** - * Set the query property: the sample query. - * - * @param query the query value to set. - * @return the SampleQueries object itself. - */ - public SampleQueries withQuery(String query) { - this.query = query; - 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/ScheduledAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java index 5d5575688e63..a74f858df2b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private ScheduledAlertRuleProperties innerProperties; + /** Creates an instance of ScheduledAlertRule class. */ + public ScheduledAlertRule() { + } + /** * Get the innerProperties property: Scheduled alert rule properties. * 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 181410c28e15..85e1994a1f2e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java @@ -75,6 +75,10 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /** Creates an instance of ScheduledAlertRuleCommonProperties class. */ + public ScheduledAlertRuleCommonProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * 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 143d98192d0d..10849882137a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private ScheduledAlertRuleTemplateProperties innerProperties; + /** Creates an instance of ScheduledAlertRuleTemplate class. */ + public ScheduledAlertRuleTemplate() { + } + /** * Get the innerProperties property: Scheduled alert rule template properties. * @@ -331,7 +335,7 @@ public ScheduledAlertRuleTemplate withTactics(List tactics) { } /** - * Get the techniques property: The techniques of the alert rule. + * Get the techniques property: The techniques of the alert rule template. * * @return the techniques value. */ @@ -340,7 +344,7 @@ public List techniques() { } /** - * Set the techniques property: The techniques of the alert rule. + * Set the techniques property: The techniques of the alert rule template. * * @param techniques the techniques value to set. * @return the ScheduledAlertRuleTemplate object itself. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java index 3052a35d0c5c..ef4fce81c88c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityAlertProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -18,13 +17,17 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SecurityAlert") @Fluent -public final class SecurityAlert extends EntityInner { +public final class SecurityAlert extends Entity { /* * SecurityAlert entity properties */ @JsonProperty(value = "properties") private SecurityAlertProperties innerProperties; + /** Creates an instance of SecurityAlert class. */ + public SecurityAlert() { + } + /** * Get the innerProperties property: SecurityAlert entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java index 3613253e952a..9ab3a972e6e6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java @@ -22,6 +22,10 @@ public final class SecurityAlertPropertiesConfidenceReasonsItem { @JsonProperty(value = "reasonType", access = JsonProperty.Access.WRITE_ONLY) private String reasonType; + /** Creates an instance of SecurityAlertPropertiesConfidenceReasonsItem class. */ + public SecurityAlertPropertiesConfidenceReasonsItem() { + } + /** * Get the reason property: The reason's description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java deleted file mode 100644 index a34da5bbcc1a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Represents security alert timeline item. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("SecurityAlert") -@Fluent -public final class SecurityAlertTimelineItem extends EntityTimelineItem { - /* - * The alert azure resource id. - */ - @JsonProperty(value = "azureResourceId", required = true) - private String azureResourceId; - - /* - * The alert product name. - */ - @JsonProperty(value = "productName") - private String productName; - - /* - * The alert description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The alert name. - */ - @JsonProperty(value = "displayName", required = true) - private String displayName; - - /* - * The alert severity. - */ - @JsonProperty(value = "severity", required = true) - private AlertSeverity severity; - - /* - * The alert end time. - */ - @JsonProperty(value = "endTimeUtc", required = true) - private OffsetDateTime endTimeUtc; - - /* - * The alert start time. - */ - @JsonProperty(value = "startTimeUtc", required = true) - private OffsetDateTime startTimeUtc; - - /* - * The alert generated time. - */ - @JsonProperty(value = "timeGenerated", required = true) - private OffsetDateTime timeGenerated; - - /* - * The name of the alert type. - */ - @JsonProperty(value = "alertType", required = true) - private String alertType; - - /** - * Get the azureResourceId property: The alert azure resource id. - * - * @return the azureResourceId value. - */ - public String azureResourceId() { - return this.azureResourceId; - } - - /** - * Set the azureResourceId property: The alert azure resource id. - * - * @param azureResourceId the azureResourceId value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withAzureResourceId(String azureResourceId) { - this.azureResourceId = azureResourceId; - return this; - } - - /** - * Get the productName property: The alert product name. - * - * @return the productName value. - */ - public String productName() { - return this.productName; - } - - /** - * Set the productName property: The alert product name. - * - * @param productName the productName value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withProductName(String productName) { - this.productName = productName; - return this; - } - - /** - * Get the description property: The alert description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The alert description. - * - * @param description the description value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the displayName property: The alert name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The alert name. - * - * @param displayName the displayName value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the severity property: The alert severity. - * - * @return the severity value. - */ - public AlertSeverity severity() { - return this.severity; - } - - /** - * Set the severity property: The alert severity. - * - * @param severity the severity value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withSeverity(AlertSeverity severity) { - this.severity = severity; - return this; - } - - /** - * Get the endTimeUtc property: The alert end time. - * - * @return the endTimeUtc value. - */ - public OffsetDateTime endTimeUtc() { - return this.endTimeUtc; - } - - /** - * Set the endTimeUtc property: The alert end time. - * - * @param endTimeUtc the endTimeUtc value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withEndTimeUtc(OffsetDateTime endTimeUtc) { - this.endTimeUtc = endTimeUtc; - return this; - } - - /** - * Get the startTimeUtc property: The alert start time. - * - * @return the startTimeUtc value. - */ - public OffsetDateTime startTimeUtc() { - return this.startTimeUtc; - } - - /** - * Set the startTimeUtc property: The alert start time. - * - * @param startTimeUtc the startTimeUtc value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withStartTimeUtc(OffsetDateTime startTimeUtc) { - this.startTimeUtc = startTimeUtc; - return this; - } - - /** - * Get the timeGenerated property: The alert generated time. - * - * @return the timeGenerated value. - */ - public OffsetDateTime timeGenerated() { - return this.timeGenerated; - } - - /** - * Set the timeGenerated property: The alert generated time. - * - * @param timeGenerated the timeGenerated value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withTimeGenerated(OffsetDateTime timeGenerated) { - this.timeGenerated = timeGenerated; - return this; - } - - /** - * Get the alertType property: The name of the alert type. - * - * @return the alertType value. - */ - public String alertType() { - return this.alertType; - } - - /** - * Set the alertType property: The name of the alert type. - * - * @param alertType the alertType value to set. - * @return the SecurityAlertTimelineItem object itself. - */ - public SecurityAlertTimelineItem withAlertType(String alertType) { - this.alertType = alertType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (azureResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property azureResourceId in model SecurityAlertTimelineItem")); - } - if (displayName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property displayName in model SecurityAlertTimelineItem")); - } - if (severity() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property severity in model SecurityAlertTimelineItem")); - } - if (endTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endTimeUtc in model SecurityAlertTimelineItem")); - } - if (startTimeUtc() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property startTimeUtc in model SecurityAlertTimelineItem")); - } - if (timeGenerated() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeGenerated in model SecurityAlertTimelineItem")); - } - if (alertType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property alertType in model SecurityAlertTimelineItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertTimelineItem.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java index 119f867b58eb..75769871bd46 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityGroupEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -16,14 +15,18 @@ /** Represents a security group entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SecurityGroup") -@Fluent -public final class SecurityGroupEntity extends EntityInner { +@Immutable +public final class SecurityGroupEntity extends Entity { /* * SecurityGroup entity properties */ @JsonProperty(value = "properties") private SecurityGroupEntityProperties innerProperties; + /** Creates an instance of SecurityGroupEntity class. */ + public SecurityGroupEntity() { + } + /** * Get the innerProperties property: SecurityGroup entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java index eb9b7a727ef6..16f1f3a2a2ef 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java @@ -42,12 +42,14 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ - SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -55,14 +57,12 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -71,16 +71,18 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ - SecurityMLAnalyticsSetting createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -89,18 +91,16 @@ SecurityMLAnalyticsSetting createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSetting createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -108,11 +108,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -120,12 +123,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java index 25eeab69e8b9..1f6989b76202 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java @@ -23,6 +23,10 @@ public final class SecurityMLAnalyticsSettingsDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of SecurityMLAnalyticsSettingsDataSource class. */ + public SecurityMLAnalyticsSettingsDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java index 8b72b6ba1ce9..da720ca5591b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java @@ -25,6 +25,10 @@ public final class SecurityMLAnalyticsSettingsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SecurityMLAnalyticsSettingsList class. */ + public SecurityMLAnalyticsSettingsList() { + } + /** * Get the nextLink property: URL to fetch the next set of SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java index abcc5d92aa34..97d1d3a659b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java @@ -15,12 +15,14 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ - SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Get Sentinel onboarding state. @@ -28,14 +30,12 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -43,11 +43,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Delete Sentinel onboarding state. @@ -55,40 +58,37 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ - SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); /** * Get Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java deleted file mode 100644 index 6ec2ac268c71..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java +++ /dev/null @@ -1,44 +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; - -/** The kind of the setting. */ -public final class SettingKind extends ExpandableStringEnum { - /** Static value Anomalies for SettingKind. */ - public static final SettingKind ANOMALIES = fromString("Anomalies"); - - /** Static value EyesOn for SettingKind. */ - public static final SettingKind EYES_ON = fromString("EyesOn"); - - /** Static value EntityAnalytics for SettingKind. */ - public static final SettingKind ENTITY_ANALYTICS = fromString("EntityAnalytics"); - - /** Static value Ueba for SettingKind. */ - public static final SettingKind UEBA = fromString("Ueba"); - - /** - * Creates or finds a SettingKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingKind. - */ - @JsonCreator - public static SettingKind fromString(String name) { - return fromString(name, SettingKind.class); - } - - /** - * Gets known SettingKind values. - * - * @return known SettingKind values. - */ - public static Collection values() { - return values(SettingKind.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java deleted file mode 100644 index 84b5c972e9eb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingList.java +++ /dev/null @@ -1,25 +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.resourcemanager.securityinsights.fluent.models.SettingListInner; -import java.util.List; - -/** An immutable client-side representation of SettingList. */ -public interface SettingList { - /** - * Gets the value property: Array of settings. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SettingListInner object. - * - * @return the inner object. - */ - SettingListInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java deleted file mode 100644 index 94296a654ffb..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java +++ /dev/null @@ -1,41 +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; - -/** The kind of the setting. */ -public final class SettingType extends ExpandableStringEnum { - /** Static value CopyableLabel for SettingType. */ - public static final SettingType COPYABLE_LABEL = fromString("CopyableLabel"); - - /** Static value InstructionStepsGroup for SettingType. */ - public static final SettingType INSTRUCTION_STEPS_GROUP = fromString("InstructionStepsGroup"); - - /** Static value InfoMessage for SettingType. */ - public static final SettingType INFO_MESSAGE = fromString("InfoMessage"); - - /** - * Creates or finds a SettingType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SettingType. - */ - @JsonCreator - public static SettingType fromString(String name) { - return fromString(name, SettingType.class); - } - - /** - * Gets known SettingType values. - * - * @return known SettingType values. - */ - public static Collection values() { - return values(SettingType.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java deleted file mode 100644 index 9533bec7514d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Settings.java +++ /dev/null @@ -1,53 +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.management.SystemData; -import com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner; - -/** An immutable client-side representation of Settings. */ -public interface Settings { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.SettingsInner object. - * - * @return the inner object. - */ - SettingsInner innerModel(); -} 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 new file mode 100644 index 000000000000..aaf8232e8a40 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The source of the watchlist. */ +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); + } + + /** + * Gets known Source values. + * + * @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 deleted file mode 100644 index 6c5a64405d59..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControl.java +++ /dev/null @@ -1,286 +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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import java.util.List; - -/** An immutable client-side representation of SourceControl. */ -public interface SourceControl { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the etag property: Etag of the azure resource. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the idPropertiesId property: The id (a Guid) of the source control. - * - * @return the idPropertiesId value. - */ - 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. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: A description of the source control. - * - * @return the description value. - */ - String description(); - - /** - * Gets the repoType property: The repository type of the source control. - * - * @return the repoType value. - */ - RepoType repoType(); - - /** - * Gets the contentTypes property: Array of source control content types. - * - * @return the contentTypes value. - */ - List contentTypes(); - - /** - * Gets the repository property: Repository metadata. - * - * @return the repository value. - */ - 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. - * - * @return the inner object. - */ - SourceControlInner innerModel(); - - /** The entirety of the SourceControl definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The SourceControl definition stages. */ - interface DefinitionStages { - /** The first stage of the SourceControl definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the SourceControl definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the SourceControl 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.WithIdPropertiesId, - DefinitionStages.WithVersion, - DefinitionStages.WithDisplayName, - DefinitionStages.WithDescription, - DefinitionStages.WithRepoType, - DefinitionStages.WithContentTypes, - DefinitionStages.WithRepository, - DefinitionStages.WithRepositoryResourceInfo, - DefinitionStages.WithLastDeploymentInfo { - /** - * Executes the create request. - * - * @return the created resource. - */ - SourceControl create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SourceControl create(Context context); - } - /** The stage of the SourceControl definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: Etag of the azure resource. - * - * @param etag Etag of the azure resource. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the SourceControl definition allowing to specify idPropertiesId. */ - interface WithIdPropertiesId { - /** - * Specifies the idPropertiesId property: The id (a Guid) of the source control. - * - * @param idPropertiesId The id (a Guid) of the source control. - * @return the next definition stage. - */ - 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 { - /** - * Specifies the displayName property: The display name of the source control. - * - * @param displayName The display name of the source control. - * @return the next definition stage. - */ - WithCreate withDisplayName(String displayName); - } - /** The stage of the SourceControl definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: A description of the source control. - * - * @param description A description of the source control. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the SourceControl definition allowing to specify repoType. */ - interface WithRepoType { - /** - * Specifies the repoType property: The repository type of the source control. - * - * @param repoType The repository type of the source control. - * @return the next definition stage. - */ - WithCreate withRepoType(RepoType repoType); - } - /** The stage of the SourceControl definition allowing to specify contentTypes. */ - interface WithContentTypes { - /** - * Specifies the contentTypes property: Array of source control content types.. - * - * @param contentTypes Array of source control content types. - * @return the next definition stage. - */ - WithCreate withContentTypes(List contentTypes); - } - /** The stage of the SourceControl definition allowing to specify repository. */ - interface WithRepository { - /** - * Specifies the repository property: Repository metadata.. - * - * @param repository Repository metadata. - * @return the next definition stage. - */ - 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. - * - * @return the refreshed resource. - */ - SourceControl refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SourceControl refresh(Context context); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java deleted file mode 100644 index 8fa041261e9a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java +++ /dev/null @@ -1,73 +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.azure.resourcemanager.securityinsights.fluent.models.SourceControlInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List all the source controls. */ -@Fluent -public final class SourceControlList { - /* - * URL to fetch the next set of source controls. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /* - * Array of source controls. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** - * Get the nextLink property: URL to fetch the next set of source controls. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: Array of source controls. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of source controls. - * - * @param value the value value to set. - * @return the SourceControlList object itself. - */ - public SourceControlList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SourceControlList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlList.class); -} 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 deleted file mode 100644 index 291568ce3448..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControls.java +++ /dev/null @@ -1,39 +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.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of SourceControls. */ -public interface SourceControls { - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. - */ - PagedIterable listRepositories(String resourceGroupName, String workspaceName, RepoType repoType); - - /** - * Gets a list of repositories metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param repoType The repo type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 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 deleted file mode 100644 index d7301e3d70cc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java +++ /dev/null @@ -1,145 +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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of SourceControlsOperations. */ -public interface SourceControlsOperations { - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets all source controls, without source control items. - * - * @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 source controls, without source control items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. - */ - SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String sourceControlId); - - /** - * Delete a source control. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); - - /** - * Gets a source control byt its identifier. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. - */ - SourceControl getById(String id); - - /** - * Gets a source control byt its identifier. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a source control. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a source control. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new SourceControl resource. - * - * @param name resource name. - * @return the first stage of the new SourceControl definition. - */ - SourceControl.DefinitionStages.Blank define(String name); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java deleted file mode 100644 index 81b1a237ddf0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java +++ /dev/null @@ -1,44 +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; - -/** Source type of the content. */ -public final class SourceKind extends ExpandableStringEnum { - /** Static value LocalWorkspace for SourceKind. */ - public static final SourceKind LOCAL_WORKSPACE = fromString("LocalWorkspace"); - - /** Static value Community for SourceKind. */ - public static final SourceKind COMMUNITY = fromString("Community"); - - /** Static value Solution for SourceKind. */ - public static final SourceKind SOLUTION = fromString("Solution"); - - /** Static value SourceRepository for SourceKind. */ - public static final SourceKind SOURCE_REPOSITORY = fromString("SourceRepository"); - - /** - * Creates or finds a SourceKind from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceKind. - */ - @JsonCreator - public static SourceKind fromString(String name) { - return fromString(name, SourceKind.class); - } - - /** - * Gets known SourceKind values. - * - * @return known SourceKind values. - */ - public static Collection values() { - return values(SourceKind.class); - } -} 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 deleted file mode 100644 index b1e052ce2251..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java +++ /dev/null @@ -1,38 +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; - -/** The sourceType of the watchlist. */ -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); - } - - /** - * Gets known SourceType values. - * - * @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/SubmissionMailEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java index e1aa218951ef..0024c03c7586 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.SubmissionMailEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,14 +16,18 @@ /** Represents a submission mail entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SubmissionMail") -@Fluent -public final class SubmissionMailEntity extends EntityInner { +@Immutable +public final class SubmissionMailEntity extends Entity { /* * Submission mail entity properties */ @JsonProperty(value = "properties") private SubmissionMailEntityProperties innerProperties; + /** Creates an instance of SubmissionMailEntity class. */ + public SubmissionMailEntity() { + } + /** * Get the innerProperties property: Submission mail entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java deleted file mode 100644 index e911816eb754..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java +++ /dev/null @@ -1,41 +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; - -/** Type of support for content item. */ -public final class SupportTier extends ExpandableStringEnum { - /** Static value Microsoft for SupportTier. */ - public static final SupportTier MICROSOFT = fromString("Microsoft"); - - /** Static value Partner for SupportTier. */ - public static final SupportTier PARTNER = fromString("Partner"); - - /** Static value Community for SupportTier. */ - public static final SupportTier COMMUNITY = fromString("Community"); - - /** - * Creates or finds a SupportTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding SupportTier. - */ - @JsonCreator - public static SupportTier fromString(String name) { - return fromString(name, SupportTier.class); - } - - /** - * Gets known SupportTier values. - * - * @return known SupportTier values. - */ - public static Collection values() { - return values(SupportTier.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java deleted file mode 100644 index 897fc3f44ce7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.TICheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Threat Intelligence Platforms data connector check requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class TICheckRequirements extends DataConnectorsCheckRequirements { - /* - * Threat Intelligence Platforms data connector check required properties - */ - @JsonProperty(value = "properties") - private TICheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence Platforms data connector check required properties. - * - * @return the innerProperties value. - */ - private TICheckRequirementsProperties 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/TIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java index 4d49f30e45e9..993b1a849354 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java @@ -23,6 +23,10 @@ public final class TIDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private TIDataConnectorProperties innerProperties; + /** Creates an instance of TIDataConnector class. */ + public TIDataConnector() { + } + /** * Get the innerProperties property: TI (Threat Intelligence) data connector properties. * @@ -39,6 +43,29 @@ public TIDataConnector withEtag(String etag) { 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 TIDataConnector object itself. + */ + public TIDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new TIDataConnectorProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. * @@ -85,29 +112,6 @@ public TIDataConnector withDataTypes(TIDataConnectorDataTypes 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 TIDataConnector object itself. - */ - public TIDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new TIDataConnectorProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java index 6615ba9b2f74..cd851c57de98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** The available data types for TI (Threat Intelligence) data connector. */ @@ -14,9 +13,13 @@ public final class TIDataConnectorDataTypes { /* * Data type for indicators connection. */ - @JsonProperty(value = "indicators", required = true) + @JsonProperty(value = "indicators") private TIDataConnectorDataTypesIndicators indicators; + /** Creates an instance of TIDataConnectorDataTypes class. */ + public TIDataConnectorDataTypes() { + } + /** * Get the indicators property: Data type for indicators connection. * @@ -43,15 +46,8 @@ public TIDataConnectorDataTypes withIndicators(TIDataConnectorDataTypesIndicator * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (indicators() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property indicators in model TIDataConnectorDataTypes")); - } else { + if (indicators() != null) { indicators().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(TIDataConnectorDataTypes.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java index a51ae50a528a..84b7c9e247af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java @@ -9,6 +9,10 @@ /** Data type for indicators connection. */ @Fluent public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { + /** Creates an instance of TIDataConnectorDataTypesIndicators class. */ + public TIDataConnectorDataTypesIndicators() { + } + /** {@inheritDoc} */ @Override public TIDataConnectorDataTypesIndicators withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java deleted file mode 100644 index ea1eb3549b75..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java +++ /dev/null @@ -1,53 +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.resourcemanager.securityinsights.fluent.models.TeamInformationInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of TeamInformation. */ -public interface TeamInformation { - /** - * Gets the teamId property: Team ID. - * - * @return the teamId value. - */ - String teamId(); - - /** - * Gets the primaryChannelUrl property: The primary channel URL of the team. - * - * @return the primaryChannelUrl value. - */ - String primaryChannelUrl(); - - /** - * Gets the teamCreationTimeUtc property: The time the team was created. - * - * @return the teamCreationTimeUtc value. - */ - OffsetDateTime teamCreationTimeUtc(); - - /** - * Gets the name property: The name of the team. - * - * @return the name value. - */ - String name(); - - /** - * Gets the description property: The description of the team. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner object. - * - * @return the inner object. - */ - TeamInformationInner innerModel(); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java deleted file mode 100644 index 40d641ab8453..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Describes team properties. */ -@Fluent -public final class TeamProperties { - /* - * The name of the team - */ - @JsonProperty(value = "teamName", required = true) - private String teamName; - - /* - * The description of the team - */ - @JsonProperty(value = "teamDescription") - private String teamDescription; - - /* - * List of member IDs to add to the team - */ - @JsonProperty(value = "memberIds") - private List memberIds; - - /* - * List of group IDs to add their members to the team - */ - @JsonProperty(value = "groupIds") - private List groupIds; - - /** - * Get the teamName property: The name of the team. - * - * @return the teamName value. - */ - public String teamName() { - return this.teamName; - } - - /** - * Set the teamName property: The name of the team. - * - * @param teamName the teamName value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - /** - * Get the teamDescription property: The description of the team. - * - * @return the teamDescription value. - */ - public String teamDescription() { - return this.teamDescription; - } - - /** - * Set the teamDescription property: The description of the team. - * - * @param teamDescription the teamDescription value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamDescription(String teamDescription) { - this.teamDescription = teamDescription; - return this; - } - - /** - * Get the memberIds property: List of member IDs to add to the team. - * - * @return the memberIds value. - */ - public List memberIds() { - return this.memberIds; - } - - /** - * Set the memberIds property: List of member IDs to add to the team. - * - * @param memberIds the memberIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withMemberIds(List memberIds) { - this.memberIds = memberIds; - return this; - } - - /** - * Get the groupIds property: List of group IDs to add their members to the team. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: List of group IDs to add their members to the team. - * - * @param groupIds the groupIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (teamName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property teamName in model TeamProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java index 9acbec19c77f..fb95037b9ee0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java @@ -46,6 +46,10 @@ public final class ThreatIntelligence { @JsonProperty(value = "threatType", access = JsonProperty.Access.WRITE_ONLY) private String threatType; + /** Creates an instance of ThreatIntelligence class. */ + public ThreatIntelligence() { + } + /** * Get the confidence property: Confidence (must be between 0 and 1). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java deleted file mode 100644 index 924536281280..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java +++ /dev/null @@ -1,155 +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.resourcemanager.securityinsights.fluent.models.AlertRuleInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Threat Intelligence alert rule. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class ThreatIntelligenceAlertRule extends AlertRuleInner { - /* - * Threat Intelligence alert rule properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceAlertRuleProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence alert rule properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceAlertRuleProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public ThreatIntelligenceAlertRule withEtag(String etag) { - super.withEtag(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 ThreatIntelligenceAlertRule object itself. - */ - public ThreatIntelligenceAlertRule withAlertRuleTemplateName(String alertRuleTemplateName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleProperties(); - } - this.innerProperties().withAlertRuleTemplateName(alertRuleTemplateName); - 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(); - } - - /** - * 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(); - } - - /** - * 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 ThreatIntelligenceAlertRule object itself. - */ - public ThreatIntelligenceAlertRule withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleProperties(); - } - this.innerProperties().withEnabled(enabled); - return this; - } - - /** - * Get the lastModifiedUtc property: The last time that this alert has been modified. - * - * @return the lastModifiedUtc value. - */ - public OffsetDateTime lastModifiedUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedUtc(); - } - - /** - * 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(); - } - - /** - * 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(); - } - - /** - * 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. - * - * @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/ThreatIntelligenceAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java deleted file mode 100644 index 734f6a42748a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java +++ /dev/null @@ -1,252 +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.resourcemanager.securityinsights.fluent.models.AlertRuleTemplateInner; -import com.azure.resourcemanager.securityinsights.fluent.models.ThreatIntelligenceAlertRuleTemplateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Represents Threat Intelligence alert rule template. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligence") -@Fluent -public final class ThreatIntelligenceAlertRuleTemplate extends AlertRuleTemplateInner { - /* - * Threat Intelligence alert rule template properties - */ - @JsonProperty(value = "properties") - private ThreatIntelligenceAlertRuleTemplateProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence alert rule template properties. - * - * @return the innerProperties value. - */ - private ThreatIntelligenceAlertRuleTemplateProperties 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 ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withSeverity(AlertSeverity severity) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withSeverity(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 ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withTactics(List tactics) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - 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 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. - * - * @return the alertRulesCreatedByTemplateCount value. - */ - public Integer alertRulesCreatedByTemplateCount() { - return this.innerProperties() == null ? null : this.innerProperties().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 ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withAlertRulesCreatedByTemplateCount( - Integer alertRulesCreatedByTemplateCount) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withAlertRulesCreatedByTemplateCount(alertRulesCreatedByTemplateCount); - return this; - } - - /** - * Get the lastUpdatedDateUtc property: The last time that this alert rule template has been updated. - * - * @return the lastUpdatedDateUtc value. - */ - public OffsetDateTime lastUpdatedDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedDateUtc(); - } - - /** - * Get the createdDateUtc property: The time that this alert rule template has been added. - * - * @return the createdDateUtc value. - */ - public OffsetDateTime createdDateUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdDateUtc(); - } - - /** - * Get the description property: The description of the alert rule template. - * - * @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 template. - * - * @param description the description value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the displayName property: The display name for alert rule template. - * - * @return the displayName value. - */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); - } - - /** - * Set the displayName property: The display name for alert rule template. - * - * @param displayName the displayName value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; - } - - /** - * Get the requiredDataConnectors property: The required data sources for this template. - * - * @return the requiredDataConnectors value. - */ - public List requiredDataConnectors() { - return this.innerProperties() == null ? null : this.innerProperties().requiredDataConnectors(); - } - - /** - * Set the requiredDataConnectors property: The required data sources for this template. - * - * @param requiredDataConnectors the requiredDataConnectors value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withRequiredDataConnectors( - List requiredDataConnectors) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withRequiredDataConnectors(requiredDataConnectors); - return this; - } - - /** - * Get the status property: The alert rule template status. - * - * @return the status value. - */ - public TemplateStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: The alert rule template status. - * - * @param status the status value to set. - * @return the ThreatIntelligenceAlertRuleTemplate object itself. - */ - public ThreatIntelligenceAlertRuleTemplate withStatus(TemplateStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new ThreatIntelligenceAlertRuleTemplateProperties(); - } - this.innerProperties().withStatus(status); - 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/ThreatIntelligenceAppendTags.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java index 847257381b59..38a0f63db31c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java @@ -17,6 +17,10 @@ public final class ThreatIntelligenceAppendTags { @JsonProperty(value = "threatIntelligenceTags") private List threatIntelligenceTags; + /** Creates an instance of ThreatIntelligenceAppendTags class. */ + public ThreatIntelligenceAppendTags() { + } + /** * Get the threatIntelligenceTags property: List of tags to be appended. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java index 689e8a88e564..7a86d8fe30a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java @@ -43,6 +43,10 @@ public final class ThreatIntelligenceExternalReference { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map hashes; + /** Creates an instance of ThreatIntelligenceExternalReference class. */ + public ThreatIntelligenceExternalReference() { + } + /** * Get the description property: External reference description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java index 86be0cc60915..cecf231a67e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java @@ -89,6 +89,10 @@ public final class ThreatIntelligenceFilteringCriteria { @JsonProperty(value = "skipToken") private String skipToken; + /** Creates an instance of ThreatIntelligenceFilteringCriteria class. */ + public ThreatIntelligenceFilteringCriteria() { + } + /** * Get the pageSize property: Page size. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java index bb55e6966794..b052bbc4a4bb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java @@ -29,6 +29,10 @@ public final class ThreatIntelligenceGranularMarkingModel { @JsonProperty(value = "selectors") private List selectors; + /** Creates an instance of ThreatIntelligenceGranularMarkingModel class. */ + public ThreatIntelligenceGranularMarkingModel() { + } + /** * Get the language property: Language granular marking model. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java index a9e60f800660..540eca0eb46c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java @@ -14,25 +14,25 @@ public interface ThreatIntelligenceIndicatorMetrics { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ - ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java index 5ce9f114369e..cb0c015043d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceIn @JsonProperty(value = "properties") private ThreatIntelligenceIndicatorProperties innerProperties; + /** Creates an instance of ThreatIntelligenceIndicatorModel class. */ + public ThreatIntelligenceIndicatorModel() { + } + /** * Get the innerProperties property: Threat Intelligence Entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java index 464cb4b65fbe..bf1b6241afe0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java @@ -10,20 +10,6 @@ /** Resource collection API of ThreatIntelligenceIndicators. */ public interface ThreatIntelligenceIndicators { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -43,17 +29,18 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -71,22 +58,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -109,16 +91,22 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -134,6 +122,18 @@ Response createWithResponse( */ Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -175,15 +175,18 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -192,18 +195,15 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -212,16 +212,18 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ - ThreatIntelligenceInformation replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -230,16 +232,14 @@ ThreatIntelligenceInformation replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ - Response replaceTagsWithResponse( + ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java index 444a66aa1384..371326e0b90a 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 @@ -27,11 +27,11 @@ public interface ThreatIntelligenceIndicatorsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param filter Filters the results, based on a Boolean condition. Optional. - * @param orderby Sorts the results. Optional. * @param top Returns only the first n results. Optional. * @param skipToken Skiptoken is only used if a previous operation returned a partial result. If a previous response * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that * specifies a starting point to use for subsequent calls. Optional. + * @param orderby Sorts the results. 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. @@ -42,8 +42,8 @@ PagedIterable list( String resourceGroupName, String workspaceName, String filter, - String orderby, Integer top, String skipToken, + String orderby, Context context); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java index 63195abe89bb..fc8d2b29c70c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java @@ -25,6 +25,10 @@ public final class ThreatIntelligenceInformationList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceInformationList class. */ + public ThreatIntelligenceInformationList() { + } + /** * Get the nextLink property: URL to fetch the next set of information objects. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java index 8a1ba6f2bd1d..b9da00cd0cc6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceKillChainPhase { @JsonProperty(value = "phaseName") private String phaseName; + /** Creates an instance of ThreatIntelligenceKillChainPhase class. */ + public ThreatIntelligenceKillChainPhase() { + } + /** * Get the killChainName property: Kill chainName name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java index 2cb0c00e17c5..b1a55af9a16e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java @@ -35,6 +35,10 @@ public final class ThreatIntelligenceMetric { @JsonProperty(value = "sourceMetrics") private List sourceMetrics; + /** Creates an instance of ThreatIntelligenceMetric class. */ + public ThreatIntelligenceMetric() { + } + /** * Get the lastUpdatedTimeUtc property: Last updated indicator metric. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java index 62bd0e31c2fc..9c4b6e14c4a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceMetricEntity { @JsonProperty(value = "metricValue") private Integer metricValue; + /** Creates an instance of ThreatIntelligenceMetricEntity class. */ + public ThreatIntelligenceMetricEntity() { + } + /** * Get the metricName property: Metric name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java index 2d20ceae39ac..512a2b5cb907 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java @@ -16,6 +16,10 @@ public final class ThreatIntelligenceMetrics { @JsonProperty(value = "properties") private ThreatIntelligenceMetric properties; + /** Creates an instance of ThreatIntelligenceMetrics class. */ + public ThreatIntelligenceMetrics() { + } + /** * Get the properties property: Threat intelligence metrics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java index 1a80738051c9..f4b8451c20be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceParsedPattern { @JsonProperty(value = "patternTypeValues") private List patternTypeValues; + /** Creates an instance of ThreatIntelligenceParsedPattern class. */ + public ThreatIntelligenceParsedPattern() { + } + /** * Get the patternTypeKey property: Pattern type key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java index ead9ca6b8833..9753eba99ef8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceParsedPatternTypeValue { @JsonProperty(value = "value") private String value; + /** Creates an instance of ThreatIntelligenceParsedPatternTypeValue class. */ + public ThreatIntelligenceParsedPatternTypeValue() { + } + /** * Get the valueType property: Type of the value. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java new file mode 100644 index 000000000000..6524987195a1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The kind of the threat intelligence entity. */ +public final class ThreatIntelligenceResourceInnerKind + extends ExpandableStringEnum { + /** Static value indicator for ThreatIntelligenceResourceInnerKind. */ + public static final ThreatIntelligenceResourceInnerKind INDICATOR = fromString("indicator"); + + /** + * Creates or finds a ThreatIntelligenceResourceInnerKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ThreatIntelligenceResourceInnerKind. + */ + @JsonCreator + public static ThreatIntelligenceResourceInnerKind fromString(String name) { + return fromString(name, ThreatIntelligenceResourceInnerKind.class); + } + + /** + * Gets known ThreatIntelligenceResourceInnerKind values. + * + * @return known ThreatIntelligenceResourceInnerKind values. + */ + public static Collection values() { + return values(ThreatIntelligenceResourceInnerKind.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java deleted file mode 100644 index 6595128b74d9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java +++ /dev/null @@ -1,35 +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; - -/** The kind of the threat intelligence entity. */ -public final class ThreatIntelligenceResourceKindEnum extends ExpandableStringEnum { - /** Static value indicator for ThreatIntelligenceResourceKindEnum. */ - public static final ThreatIntelligenceResourceKindEnum INDICATOR = fromString("indicator"); - - /** - * Creates or finds a ThreatIntelligenceResourceKindEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ThreatIntelligenceResourceKindEnum. - */ - @JsonCreator - public static ThreatIntelligenceResourceKindEnum fromString(String name) { - return fromString(name, ThreatIntelligenceResourceKindEnum.class); - } - - /** - * Gets known ThreatIntelligenceResourceKindEnum values. - * - * @return known ThreatIntelligenceResourceKindEnum values. - */ - public static Collection values() { - return values(ThreatIntelligenceResourceKindEnum.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java index 7c51d95d08ad..00b56b46258a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java @@ -20,7 +20,11 @@ public final class ThreatIntelligenceSortingCriteria { * Sorting order (ascending/descending/unsorted). */ @JsonProperty(value = "sortOrder") - private ThreatIntelligenceSortingCriteriaEnum sortOrder; + private ThreatIntelligenceSortingOrder sortOrder; + + /** Creates an instance of ThreatIntelligenceSortingCriteria class. */ + public ThreatIntelligenceSortingCriteria() { + } /** * Get the itemKey property: Column name. @@ -47,7 +51,7 @@ public ThreatIntelligenceSortingCriteria withItemKey(String itemKey) { * * @return the sortOrder value. */ - public ThreatIntelligenceSortingCriteriaEnum sortOrder() { + public ThreatIntelligenceSortingOrder sortOrder() { return this.sortOrder; } @@ -57,7 +61,7 @@ public ThreatIntelligenceSortingCriteriaEnum sortOrder() { * @param sortOrder the sortOrder value to set. * @return the ThreatIntelligenceSortingCriteria object itself. */ - public ThreatIntelligenceSortingCriteria withSortOrder(ThreatIntelligenceSortingCriteriaEnum sortOrder) { + public ThreatIntelligenceSortingCriteria withSortOrder(ThreatIntelligenceSortingOrder sortOrder) { this.sortOrder = sortOrder; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java deleted file mode 100644 index c5933ebe8342..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java +++ /dev/null @@ -1,42 +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; - -/** Sorting order (ascending/descending/unsorted). */ -public final class ThreatIntelligenceSortingCriteriaEnum - extends ExpandableStringEnum { - /** Static value unsorted for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum UNSORTED = fromString("unsorted"); - - /** Static value ascending for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum ASCENDING = fromString("ascending"); - - /** Static value descending for ThreatIntelligenceSortingCriteriaEnum. */ - public static final ThreatIntelligenceSortingCriteriaEnum DESCENDING = fromString("descending"); - - /** - * Creates or finds a ThreatIntelligenceSortingCriteriaEnum from its string representation. - * - * @param name a name to look for. - * @return the corresponding ThreatIntelligenceSortingCriteriaEnum. - */ - @JsonCreator - public static ThreatIntelligenceSortingCriteriaEnum fromString(String name) { - return fromString(name, ThreatIntelligenceSortingCriteriaEnum.class); - } - - /** - * Gets known ThreatIntelligenceSortingCriteriaEnum values. - * - * @return known ThreatIntelligenceSortingCriteriaEnum values. - */ - public static Collection values() { - return values(ThreatIntelligenceSortingCriteriaEnum.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingOrder.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingOrder.java new file mode 100644 index 000000000000..1977c37a74ba --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingOrder.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Sorting order (ascending/descending/unsorted). */ +public final class ThreatIntelligenceSortingOrder extends ExpandableStringEnum { + /** Static value unsorted for ThreatIntelligenceSortingOrder. */ + public static final ThreatIntelligenceSortingOrder UNSORTED = fromString("unsorted"); + + /** Static value ascending for ThreatIntelligenceSortingOrder. */ + public static final ThreatIntelligenceSortingOrder ASCENDING = fromString("ascending"); + + /** Static value descending for ThreatIntelligenceSortingOrder. */ + public static final ThreatIntelligenceSortingOrder DESCENDING = fromString("descending"); + + /** + * Creates or finds a ThreatIntelligenceSortingOrder from its string representation. + * + * @param name a name to look for. + * @return the corresponding ThreatIntelligenceSortingOrder. + */ + @JsonCreator + public static ThreatIntelligenceSortingOrder fromString(String name) { + return fromString(name, ThreatIntelligenceSortingOrder.class); + } + + /** + * Gets known ThreatIntelligenceSortingOrder values. + * + * @return known ThreatIntelligenceSortingOrder values. + */ + public static Collection values() { + return values(ThreatIntelligenceSortingOrder.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java deleted file mode 100644 index a6e561d9e99e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java +++ /dev/null @@ -1,45 +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.resourcemanager.securityinsights.fluent.models.TiTaxiiCheckRequirementsProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Threat Intelligence TAXII data connector check requirements. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligenceTaxii") -@Fluent -public final class TiTaxiiCheckRequirements extends DataConnectorsCheckRequirements { - /* - * Threat Intelligence TAXII check required properties. - */ - @JsonProperty(value = "properties") - private TiTaxiiCheckRequirementsProperties innerProperties; - - /** - * Get the innerProperties property: Threat Intelligence TAXII check required properties. - * - * @return the innerProperties value. - */ - private TiTaxiiCheckRequirementsProperties 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/TiTaxiiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java deleted file mode 100644 index 125e1dd55a28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java +++ /dev/null @@ -1,284 +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.resourcemanager.securityinsights.fluent.models.DataConnectorInner; -import com.azure.resourcemanager.securityinsights.fluent.models.TiTaxiiDataConnectorProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Data connector to pull Threat intelligence data from TAXII 2.0/2.1 server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("ThreatIntelligenceTaxii") -@Fluent -public final class TiTaxiiDataConnector extends DataConnectorInner { - /* - * Threat intelligence TAXII data connector properties. - */ - @JsonProperty(value = "properties") - private TiTaxiiDataConnectorProperties innerProperties; - - /** - * Get the innerProperties property: Threat intelligence TAXII data connector properties. - * - * @return the innerProperties value. - */ - private TiTaxiiDataConnectorProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnector withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the workspaceId property: The workspace id. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); - } - - /** - * Set the workspaceId property: The workspace id. - * - * @param workspaceId the workspaceId value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withWorkspaceId(String workspaceId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withWorkspaceId(workspaceId); - return this; - } - - /** - * Get the friendlyName property: The friendly name for the TAXII server. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } - - /** - * Set the friendlyName property: The friendly name for the TAXII server. - * - * @param friendlyName the friendlyName value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } - - /** - * Get the taxiiServer property: The API root for the TAXII server. - * - * @return the taxiiServer value. - */ - public String taxiiServer() { - return this.innerProperties() == null ? null : this.innerProperties().taxiiServer(); - } - - /** - * Set the taxiiServer property: The API root for the TAXII server. - * - * @param taxiiServer the taxiiServer value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTaxiiServer(String taxiiServer) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withTaxiiServer(taxiiServer); - return this; - } - - /** - * Get the collectionId property: The collection id of the TAXII server. - * - * @return the collectionId value. - */ - public String collectionId() { - return this.innerProperties() == null ? null : this.innerProperties().collectionId(); - } - - /** - * Set the collectionId property: The collection id of the TAXII server. - * - * @param collectionId the collectionId value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withCollectionId(String collectionId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withCollectionId(collectionId); - return this; - } - - /** - * Get the username property: The userName for the TAXII server. - * - * @return the username value. - */ - public String username() { - return this.innerProperties() == null ? null : this.innerProperties().username(); - } - - /** - * Set the username property: The userName for the TAXII server. - * - * @param username the username value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withUsername(String username) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withUsername(username); - return this; - } - - /** - * Get the password property: The password for the TAXII server. - * - * @return the password value. - */ - public String password() { - return this.innerProperties() == null ? null : this.innerProperties().password(); - } - - /** - * Set the password property: The password for the TAXII server. - * - * @param password the password value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withPassword(String password) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withPassword(password); - return this; - } - - /** - * Get the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @return the taxiiLookbackPeriod value. - */ - public OffsetDateTime taxiiLookbackPeriod() { - return this.innerProperties() == null ? null : this.innerProperties().taxiiLookbackPeriod(); - } - - /** - * Set the taxiiLookbackPeriod property: The lookback period for the TAXII server. - * - * @param taxiiLookbackPeriod the taxiiLookbackPeriod value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTaxiiLookbackPeriod(OffsetDateTime taxiiLookbackPeriod) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withTaxiiLookbackPeriod(taxiiLookbackPeriod); - return this; - } - - /** - * Get the pollingFrequency property: The polling frequency for the TAXII server. - * - * @return the pollingFrequency value. - */ - public PollingFrequency pollingFrequency() { - return this.innerProperties() == null ? null : this.innerProperties().pollingFrequency(); - } - - /** - * Set the pollingFrequency property: The polling frequency for the TAXII server. - * - * @param pollingFrequency the pollingFrequency value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withPollingFrequency(PollingFrequency pollingFrequency) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - this.innerProperties().withPollingFrequency(pollingFrequency); - return this; - } - - /** - * Get the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @return the dataTypes value. - */ - public TiTaxiiDataConnectorDataTypes dataTypes() { - return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); - } - - /** - * Set the dataTypes property: The available data types for Threat Intelligence TAXII data connector. - * - * @param dataTypes the dataTypes value to set. - * @return the TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withDataTypes(TiTaxiiDataConnectorDataTypes dataTypes) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - 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 TiTaxiiDataConnector object itself. - */ - public TiTaxiiDataConnector withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new TiTaxiiDataConnectorProperties(); - } - 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/TiTaxiiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java deleted file mode 100644 index 22f12b8a6ab9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The available data types for Threat Intelligence TAXII data connector. */ -@Fluent -public final class TiTaxiiDataConnectorDataTypes { - /* - * Data type for TAXII connector. - */ - @JsonProperty(value = "taxiiClient", required = true) - private TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient; - - /** - * Get the taxiiClient property: Data type for TAXII connector. - * - * @return the taxiiClient value. - */ - public TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient() { - return this.taxiiClient; - } - - /** - * Set the taxiiClient property: Data type for TAXII connector. - * - * @param taxiiClient the taxiiClient value to set. - * @return the TiTaxiiDataConnectorDataTypes object itself. - */ - public TiTaxiiDataConnectorDataTypes withTaxiiClient(TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient) { - this.taxiiClient = taxiiClient; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (taxiiClient() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property taxiiClient in model TiTaxiiDataConnectorDataTypes")); - } else { - taxiiClient().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TiTaxiiDataConnectorDataTypes.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java deleted file mode 100644 index 7b2b40b0a648..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java +++ /dev/null @@ -1,28 +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; - -/** Data type for TAXII connector. */ -@Fluent -public final class TiTaxiiDataConnectorDataTypesTaxiiClient extends DataConnectorDataTypeCommon { - /** {@inheritDoc} */ - @Override - public TiTaxiiDataConnectorDataTypesTaxiiClient 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/TimelineAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java deleted file mode 100644 index d34ece2d531a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** timeline aggregation information per kind. */ -@Fluent -public final class TimelineAggregation { - /* - * the total items found for a kind - */ - @JsonProperty(value = "count", required = true) - private int count; - - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private EntityTimelineKind kind; - - /** - * Get the count property: the total items found for a kind. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: the total items found for a kind. - * - * @param count the count value to set. - * @return the TimelineAggregation object itself. - */ - public TimelineAggregation withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public EntityTimelineKind kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the TimelineAggregation object itself. - */ - public TimelineAggregation withKind(EntityTimelineKind 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 TimelineAggregation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineAggregation.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java deleted file mode 100644 index e6c563cb369f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Timeline Query Errors. */ -@Fluent -public final class TimelineError { - /* - * the query kind - */ - @JsonProperty(value = "kind", required = true) - private EntityTimelineKind kind; - - /* - * the query id - */ - @JsonProperty(value = "queryId") - private String queryId; - - /* - * the error message - */ - @JsonProperty(value = "errorMessage", required = true) - private String errorMessage; - - /** - * Get the kind property: the query kind. - * - * @return the kind value. - */ - public EntityTimelineKind kind() { - return this.kind; - } - - /** - * Set the kind property: the query kind. - * - * @param kind the kind value to set. - * @return the TimelineError object itself. - */ - public TimelineError withKind(EntityTimelineKind kind) { - this.kind = kind; - return this; - } - - /** - * Get the queryId property: the query id. - * - * @return the queryId value. - */ - public String queryId() { - return this.queryId; - } - - /** - * Set the queryId property: the query id. - * - * @param queryId the queryId value to set. - * @return the TimelineError object itself. - */ - public TimelineError withQueryId(String queryId) { - this.queryId = queryId; - return this; - } - - /** - * Get the errorMessage property: the error message. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: the error message. - * - * @param errorMessage the errorMessage value to set. - * @return the TimelineError object itself. - */ - public TimelineError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - 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 TimelineError")); - } - if (errorMessage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property errorMessage in model TimelineError")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineError.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java deleted file mode 100644 index 7d42bccca470..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Expansion result metadata. */ -@Fluent -public final class TimelineResultsMetadata { - /* - * the total items found for the timeline request - */ - @JsonProperty(value = "totalCount", required = true) - private int totalCount; - - /* - * timeline aggregation per kind - */ - @JsonProperty(value = "aggregations", required = true) - private List aggregations; - - /* - * information about the failure queries - */ - @JsonProperty(value = "errors") - private List errors; - - /** - * Get the totalCount property: the total items found for the timeline request. - * - * @return the totalCount value. - */ - public int totalCount() { - return this.totalCount; - } - - /** - * Set the totalCount property: the total items found for the timeline request. - * - * @param totalCount the totalCount value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withTotalCount(int totalCount) { - this.totalCount = totalCount; - return this; - } - - /** - * Get the aggregations property: timeline aggregation per kind. - * - * @return the aggregations value. - */ - public List aggregations() { - return this.aggregations; - } - - /** - * Set the aggregations property: timeline aggregation per kind. - * - * @param aggregations the aggregations value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withAggregations(List aggregations) { - this.aggregations = aggregations; - return this; - } - - /** - * Get the errors property: information about the failure queries. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: information about the failure queries. - * - * @param errors the errors value to set. - * @return the TimelineResultsMetadata object itself. - */ - public TimelineResultsMetadata withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aggregations() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property aggregations in model TimelineResultsMetadata")); - } else { - aggregations().forEach(e -> e.validate()); - } - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TimelineResultsMetadata.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java index 9bb932300877..70909310b321 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java @@ -13,9 +13,6 @@ public final class TriggersOn extends ExpandableStringEnum { /** Static value Incidents for TriggersOn. */ public static final TriggersOn INCIDENTS = fromString("Incidents"); - /** Static value Alerts for TriggersOn. */ - public static final TriggersOn ALERTS = fromString("Alerts"); - /** * Creates or finds a TriggersOn from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java index 84c11fc4fc6b..ca1564c0554a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java @@ -13,9 +13,6 @@ public final class TriggersWhen extends ExpandableStringEnum { /** Static value Created for TriggersWhen. */ public static final TriggersWhen CREATED = fromString("Created"); - /** Static value Updated for TriggersWhen. */ - public static final TriggersWhen UPDATED = fromString("Updated"); - /** * Creates or finds a TriggersWhen from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java deleted file mode 100644 index 5a79fd502544..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java +++ /dev/null @@ -1,77 +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.resourcemanager.securityinsights.fluent.models.SettingsInner; -import com.azure.resourcemanager.securityinsights.fluent.models.UebaProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Settings with single toggle. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") -@JsonTypeName("Ueba") -@Fluent -public final class Ueba extends SettingsInner { - /* - * Ueba properties - */ - @JsonProperty(value = "properties") - private UebaProperties innerProperties; - - /** - * Get the innerProperties property: Ueba properties. - * - * @return the innerProperties value. - */ - private UebaProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public Ueba withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** - * Get the dataSources property: The relevant data sources that enriched by ueba. - * - * @return the dataSources value. - */ - public List dataSources() { - return this.innerProperties() == null ? null : this.innerProperties().dataSources(); - } - - /** - * Set the dataSources property: The relevant data sources that enriched by ueba. - * - * @param dataSources the dataSources value to set. - * @return the Ueba object itself. - */ - public Ueba withDataSources(List dataSources) { - if (this.innerProperties() == null) { - this.innerProperties = new UebaProperties(); - } - this.innerProperties().withDataSources(dataSources); - 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/UebaDataSources.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java deleted file mode 100644 index 8548886d5a2d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java +++ /dev/null @@ -1,44 +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; - -/** The data source that enriched by ueba. */ -public final class UebaDataSources extends ExpandableStringEnum { - /** Static value AuditLogs for UebaDataSources. */ - public static final UebaDataSources AUDIT_LOGS = fromString("AuditLogs"); - - /** Static value AzureActivity for UebaDataSources. */ - public static final UebaDataSources AZURE_ACTIVITY = fromString("AzureActivity"); - - /** Static value SecurityEvent for UebaDataSources. */ - public static final UebaDataSources SECURITY_EVENT = fromString("SecurityEvent"); - - /** Static value SigninLogs for UebaDataSources. */ - public static final UebaDataSources SIGNIN_LOGS = fromString("SigninLogs"); - - /** - * Creates or finds a UebaDataSources from its string representation. - * - * @param name a name to look for. - * @return the corresponding UebaDataSources. - */ - @JsonCreator - public static UebaDataSources fromString(String name) { - return fromString(name, UebaDataSources.class); - } - - /** - * Gets known UebaDataSources values. - * - * @return known UebaDataSources values. - */ - public static Collection values() { - return values(UebaDataSources.class); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java index 0af80094b7e0..e5a552c56bdd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java @@ -4,8 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.UrlEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,14 +14,18 @@ /** Represents a url entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Url") -@Fluent -public final class UrlEntity extends EntityInner { +@Immutable +public final class UrlEntity extends Entity { /* * Url entity properties */ @JsonProperty(value = "properties") private UrlEntityProperties innerProperties; + /** Creates an instance of UrlEntity class. */ + public UrlEntity() { + } + /** * Get the innerProperties property: Url entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java index 8d8dc55f0309..000883c8a5f3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java @@ -29,6 +29,10 @@ public final class UserInfo { @JsonProperty(value = "objectId") private UUID objectId; + /** Creates an instance of UserInfo class. */ + public UserInfo() { + } + /** * Get the email property: The email of the user. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java deleted file mode 100644 index 7b74ced2e068..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java +++ /dev/null @@ -1,62 +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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes an error encountered in the file during validation. */ -@Fluent -public final class ValidationError { - /* - * The number of the record that has the error. - */ - @JsonProperty(value = "recordIndex") - private Integer recordIndex; - - /* - * A list of descriptions of the error. - */ - @JsonProperty(value = "errorMessages", access = JsonProperty.Access.WRITE_ONLY) - private List errorMessages; - - /** - * Get the recordIndex property: The number of the record that has the error. - * - * @return the recordIndex value. - */ - public Integer recordIndex() { - return this.recordIndex; - } - - /** - * Set the recordIndex property: The number of the record that has the error. - * - * @param recordIndex the recordIndex value to set. - * @return the ValidationError object itself. - */ - public ValidationError withRecordIndex(Integer recordIndex) { - this.recordIndex = recordIndex; - return this; - } - - /** - * Get the errorMessages property: A list of descriptions of the error. - * - * @return the errorMessages value. - */ - public List errorMessages() { - return this.errorMessages; - } - - /** - * 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/Version.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java deleted file mode 100644 index 285474b81325..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java +++ /dev/null @@ -1,38 +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; - -/** The version of the source control. */ -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); - } - - /** - * Gets known Version values. - * - * @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 f00eabf5856b..5265a9ceea86 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,18 +70,11 @@ public interface Watchlist { String provider(); /** - * Gets the source property: The filename of the watchlist, called 'source'. + * Gets the source property: The source of the watchlist. * * @return the source value. */ - String source(); - - /** - * Gets the sourceType property: The sourceType of the watchlist. - * - * @return the sourceType value. - */ - SourceType sourceType(); + Source source(); /** * Gets the created property: The time the watchlist was created. @@ -161,15 +154,15 @@ public interface Watchlist { String tenantId(); /** - * Gets the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the header. + * Gets the numberOfLinesToSkip property: The number of lines in a csv content to skip before the header. * * @return the numberOfLinesToSkip value. */ Integer numberOfLinesToSkip(); /** - * Gets the rawContent property: The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * Gets the rawContent property: The raw content that represents to watchlist items to create. Example : This line + * will be skipped header1,header2 value1,value2. * * @return the rawContent value. */ @@ -185,15 +178,15 @@ public interface Watchlist { String itemsSearchKey(); /** - * Gets the contentType property: The content type of the raw content. Example : text/csv or text/tsv. + * Gets the contentType property: The content type of the raw content. For now, only text/csv is valid. * * @return the contentType value. */ String contentType(); /** - * Gets the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. Pls note : When - * a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * Gets the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. **Note** : When + * a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * * @return the uploadStatus value. */ @@ -243,7 +236,6 @@ interface WithCreate DefinitionStages.WithDisplayName, DefinitionStages.WithProvider, DefinitionStages.WithSource, - DefinitionStages.WithSourceType, DefinitionStages.WithCreated, DefinitionStages.WithUpdated, DefinitionStages.WithCreatedBy, @@ -318,22 +310,12 @@ interface WithProvider { /** The stage of the Watchlist definition allowing to specify source. */ interface WithSource { /** - * 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. - */ - 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. + * Specifies the source property: The source of the watchlist. * - * @param sourceType The sourceType of the watchlist. + * @param source The source of the watchlist. * @return the next definition stage. */ - WithCreate withSourceType(SourceType sourceType); + WithCreate withSource(Source source); } /** The stage of the Watchlist definition allowing to specify created. */ interface WithCreated { @@ -449,10 +431,10 @@ interface WithTenantId { /** The stage of the Watchlist definition allowing to specify numberOfLinesToSkip. */ interface WithNumberOfLinesToSkip { /** - * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the + * Specifies the numberOfLinesToSkip property: The number of lines in a csv content to skip before the * header. * - * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header. + * @param numberOfLinesToSkip The number of lines in a csv content to skip before the header. * @return the next definition stage. */ WithCreate withNumberOfLinesToSkip(Integer numberOfLinesToSkip); @@ -460,11 +442,11 @@ interface WithNumberOfLinesToSkip { /** The stage of the Watchlist definition allowing to specify rawContent. */ interface WithRawContent { /** - * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case - * of csv/tsv content type, it's the content of the file that will parsed by the endpoint. + * Specifies the rawContent property: The raw content that represents to watchlist items to create. Example + * : This line will be skipped header1,header2 value1,value2. * - * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * @param rawContent The raw content that represents to watchlist items to create. Example : This line will + * be skipped header1,header2 value1,value2. * @return the next definition stage. */ WithCreate withRawContent(String rawContent); @@ -486,9 +468,9 @@ interface WithItemsSearchKey { /** The stage of the Watchlist definition allowing to specify contentType. */ interface WithContentType { /** - * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv . + * Specifies the contentType property: The content type of the raw content. For now, only text/csv is valid. * - * @param contentType The content type of the raw content. Example : text/csv or text/tsv. + * @param contentType The content type of the raw content. For now, only text/csv is valid. * @return the next definition stage. */ WithCreate withContentType(String contentType); @@ -497,10 +479,10 @@ interface WithContentType { interface WithUploadStatus { /** * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. - * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * **Note** : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * - * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a - * Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a + * Watchlist upload status is InProgress, the Watchlist cannot be deleted. * @return the next definition stage. */ WithCreate withUploadStatus(String uploadStatus); @@ -520,7 +502,6 @@ interface Update UpdateStages.WithDisplayName, UpdateStages.WithProvider, UpdateStages.WithSource, - UpdateStages.WithSourceType, UpdateStages.WithCreated, UpdateStages.WithUpdated, UpdateStages.WithCreatedBy, @@ -597,22 +578,12 @@ interface WithProvider { /** The stage of the Watchlist update allowing to specify source. */ interface WithSource { /** - * 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. + * Specifies the source property: The source of the watchlist. * - * @param sourceType The sourceType of the watchlist. + * @param source The source of the watchlist. * @return the next definition stage. */ - Update withSourceType(SourceType sourceType); + Update withSource(Source source); } /** The stage of the Watchlist update allowing to specify created. */ interface WithCreated { @@ -728,10 +699,10 @@ interface WithTenantId { /** The stage of the Watchlist update allowing to specify numberOfLinesToSkip. */ interface WithNumberOfLinesToSkip { /** - * Specifies the numberOfLinesToSkip property: The number of lines in a csv/tsv content to skip before the + * Specifies the numberOfLinesToSkip property: The number of lines in a csv content to skip before the * header. * - * @param numberOfLinesToSkip The number of lines in a csv/tsv content to skip before the header. + * @param numberOfLinesToSkip The number of lines in a csv content to skip before the header. * @return the next definition stage. */ Update withNumberOfLinesToSkip(Integer numberOfLinesToSkip); @@ -739,11 +710,11 @@ interface WithNumberOfLinesToSkip { /** The stage of the Watchlist update allowing to specify rawContent. */ interface WithRawContent { /** - * Specifies the rawContent property: The raw content that represents to watchlist items to create. In case - * of csv/tsv content type, it's the content of the file that will parsed by the endpoint. + * Specifies the rawContent property: The raw content that represents to watchlist items to create. Example + * : This line will be skipped header1,header2 value1,value2. * - * @param rawContent The raw content that represents to watchlist items to create. In case of csv/tsv - * content type, it's the content of the file that will parsed by the endpoint. + * @param rawContent The raw content that represents to watchlist items to create. Example : This line will + * be skipped header1,header2 value1,value2. * @return the next definition stage. */ Update withRawContent(String rawContent); @@ -765,9 +736,9 @@ interface WithItemsSearchKey { /** The stage of the Watchlist update allowing to specify contentType. */ interface WithContentType { /** - * Specifies the contentType property: The content type of the raw content. Example : text/csv or text/tsv . + * Specifies the contentType property: The content type of the raw content. For now, only text/csv is valid. * - * @param contentType The content type of the raw content. Example : text/csv or text/tsv. + * @param contentType The content type of the raw content. For now, only text/csv is valid. * @return the next definition stage. */ Update withContentType(String contentType); @@ -776,10 +747,10 @@ interface WithContentType { interface WithUploadStatus { /** * Specifies the uploadStatus property: The status of the Watchlist upload : New, InProgress or Complete. - * Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * **Note** : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted. * - * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a - * Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted. + * @param uploadStatus The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a + * Watchlist upload status is InProgress, the Watchlist cannot be deleted. * @return the next definition stage. */ Update withUploadStatus(String uploadStatus); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java index b077295fb50b..97bdafb63b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItem.java @@ -8,7 +8,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.WatchlistItemInner; import java.time.OffsetDateTime; -import java.util.Map; /** An immutable client-side representation of WatchlistItem. */ public interface WatchlistItem { @@ -108,14 +107,14 @@ public interface WatchlistItem { * * @return the itemsKeyValue value. */ - Map itemsKeyValue(); + Object itemsKeyValue(); /** * Gets the entityMapping property: key-value pairs for a watchlist item entity mapping. * * @return the entityMapping value. */ - Map entityMapping(); + Object entityMapping(); /** * Gets the name of the resource group. @@ -147,7 +146,7 @@ interface WithParentResource { * * @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 watchlistAlias The watchlist alias. * @return the next definition stage. */ WithCreate withExistingWatchlist(String resourceGroupName, String workspaceName, String watchlistAlias); @@ -281,7 +280,7 @@ interface WithItemsKeyValue { * @param itemsKeyValue key-value pairs for a watchlist item. * @return the next definition stage. */ - WithCreate withItemsKeyValue(Map itemsKeyValue); + WithCreate withItemsKeyValue(Object itemsKeyValue); } /** The stage of the WatchlistItem definition allowing to specify entityMapping. */ interface WithEntityMapping { @@ -291,7 +290,7 @@ interface WithEntityMapping { * @param entityMapping key-value pairs for a watchlist item entity mapping. * @return the next definition stage. */ - WithCreate withEntityMapping(Map entityMapping); + WithCreate withEntityMapping(Object entityMapping); } } /** @@ -429,7 +428,7 @@ interface WithItemsKeyValue { * @param itemsKeyValue key-value pairs for a watchlist item. * @return the next definition stage. */ - Update withItemsKeyValue(Map itemsKeyValue); + Update withItemsKeyValue(Object itemsKeyValue); } /** The stage of the WatchlistItem update allowing to specify entityMapping. */ interface WithEntityMapping { @@ -439,7 +438,7 @@ interface WithEntityMapping { * @param entityMapping key-value pairs for a watchlist item entity mapping. * @return the next definition stage. */ - Update withEntityMapping(Map entityMapping); + Update withEntityMapping(Object entityMapping); } } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java index 97bc46f5f4bd..2a2b51e4346e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java @@ -14,7 +14,7 @@ @Fluent public final class WatchlistItemList { /* - * URL to fetch the next set of watchlist item. + * URL to fetch the next set of watchlist items. */ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; @@ -25,8 +25,12 @@ public final class WatchlistItemList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistItemList class. */ + public WatchlistItemList() { + } + /** - * Get the nextLink property: URL to fetch the next set of watchlist item. + * Get the nextLink property: URL to fetch the next set of watchlist items. * * @return the nextLink value. */ 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 9b56cdba2403..4877c8a87c71 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 @@ -11,11 +11,11 @@ /** Resource collection API of WatchlistItems. */ public interface WatchlistItems { /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -24,11 +24,11 @@ public interface WatchlistItems { PagedIterable list(String resourceGroupName, String workspaceName, String watchlistAlias); /** - * Gets all watchlist Items. + * Get 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 watchlistAlias The 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. @@ -42,84 +42,84 @@ PagedIterable list( String resourceGroupName, String workspaceName, String watchlistAlias, String skipToken, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist item along with {@link Response}. */ - WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist item. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. * * @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 watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. + * @param watchlistItemId The watchlist item id (GUID). * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist item along with {@link Response}. */ WatchlistItem getById(String id); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist item. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist item along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java index 4e03f77f637e..4c0e933d47db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java @@ -25,6 +25,10 @@ public final class WatchlistList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistList class. */ + public WatchlistList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlists. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java index 4e53d746f064..7ba59e628b63 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 @@ -11,7 +11,7 @@ /** Resource collection API of Watchlists. */ public interface Watchlists { /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -23,7 +23,7 @@ public interface Watchlists { PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets all watchlists, without watchlist items. + * Get 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. @@ -39,62 +39,62 @@ public interface Watchlists { PagedIterable list(String resourceGroupName, String workspaceName, String skipToken, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ - Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its 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 context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. * * @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 watchlistAlias The watchlist alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. + * @param watchlistAlias The watchlist alias. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its watchlist items. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -105,7 +105,7 @@ WatchlistsDeleteResponse deleteWithResponse( Watchlist getById(String id); /** - * Gets a watchlist, without its watchlist items. + * Get a watchlist, without its watchlist items. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -134,9 +134,9 @@ WatchlistsDeleteResponse 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 response. + * @return the {@link Response}. */ - WatchlistsDeleteResponse deleteByIdWithResponse(String id, Context context); + Response 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 deleted file mode 100644 index 5356e46d32f6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,57 +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.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The WatchlistsCreateOrUpdateHeaders model. */ -@Fluent -public final class WatchlistsCreateOrUpdateHeaders { - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of WatchlistsCreateOrUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public WatchlistsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); - } - - /** - * 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 deleted file mode 100644 index afdeedcf85a7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateResponse.java +++ /dev/null @@ -1,42 +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.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); - } - - /** - * Gets the deserialized response body. - * - * @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 deleted file mode 100644 index 8105fba3b9de..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java +++ /dev/null @@ -1,57 +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.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The WatchlistsDeleteHeaders model. */ -@Fluent -public final class WatchlistsDeleteHeaders { - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of WatchlistsDeleteHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public WatchlistsDeleteHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); - } - - /** - * 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 deleted file mode 100644 index 5315f66e3e28..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteResponse.java +++ /dev/null @@ -1,26 +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.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 deleted file mode 100644 index 8495bcf9e510..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java +++ /dev/null @@ -1,124 +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.fasterxml.jackson.annotation.JsonProperty; - -/** Detail about the webhook object. */ -@Fluent -public final class Webhook { - /* - * 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 68e39f44ac62..fd0c3e00a7b1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 4eade4f80487..dcff23c6b7b4 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/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 3d2f9a3fcd1a..f33be311a250 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/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 61efbd321ea9..4d0d3ffc5cd4 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/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 5e2ef04f866c..85394a164fc1 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/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 30931adbd1bb..a892e3401cb2 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/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 df3209f52c0c..37281c9e5c77 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,16 +15,11 @@ 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; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncidentCreationAlertRule; import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; -import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; @@ -35,7 +30,7 @@ /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -53,212 +48,12 @@ public static void createsOrUpdatesAFusionAlertRule( 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()))))), + .withEnabled(true), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -282,7 +77,7 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -305,7 +100,6 @@ public static void createsOrUpdatesAScheduledAlertRule( .withSuppressionDuration(Duration.parse("PT1H")) .withSuppressionEnabled(false) .withTactics(Arrays.asList(AttackTactic.PERSISTENCE, AttackTactic.LATERAL_MOVEMENT)) - .withTechniques(Arrays.asList("T1037", "T1021")) .withIncidentConfiguration( new IncidentConfiguration() .withCreateIncident(true) @@ -354,274 +148,6 @@ public static void createsOrUpdatesAScheduledAlertRule( Context.NONE); } - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json - */ - /** - * Sample code: Creates or updates a Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesANrtAlertRule( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - 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)))) - .withEventGroupingSettings( - new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); - } - @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 ae8c5d352789..1d83de39f7bc 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/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 5f59cda357eb..34635cbdd5c5 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/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -24,21 +24,7 @@ public static void getAScheduledAlertRule( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json - */ - /** - * Sample code: Get an Nrt alert rule. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -50,7 +36,7 @@ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsight } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 a76a803ecb34..b91c3f02edb0 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/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 0ddbba866ce2..3614c0eea7a4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java index 9931b428f993..5e5cc59140bb 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,7 +9,7 @@ /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. 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 79bd1f2bf1dd..dae8c35843e0 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,7 +9,7 @@ /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. 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 cb067a4161d2..700b8c9deb00 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,7 +9,7 @@ /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. 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 deleted file mode 100644 index 02135e4b1f24..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for BookmarkOperation Expand. */ -public final class BookmarkOperationExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json - */ - /** - * Sample code: Expand an bookmark. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkOperations() - .expandWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new BookmarkExpandParameters() - .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) - .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) - .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); - } -} 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 deleted file mode 100644 index 4ee602ef802a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +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.generated; - -/** Samples for BookmarkRelations CreateOrUpdate. */ -public final class BookmarkRelationsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json - */ - /** - * Sample code: Creates or updates a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") - .withExistingBookmark("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096") - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/incidents/afbd324f-6c48-459c-8710-8d1e1cd03812") - .create(); - } -} 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 deleted file mode 100644 index 90fe86d803f0..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Delete. */ -public final class BookmarkRelationsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json - */ - /** - * Sample code: Delete the bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteTheBookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .deleteWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java deleted file mode 100644 index 6ae73ac9318f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations Get. */ -public final class BookmarkRelationsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json - */ - /** - * Sample code: Get a bookmark relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getABookmarkRelation( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .getWithResponse( - "myRg", - "myWorkspace", - "2216d0e1-91e3-4902-89fd-d2df8c535096", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java deleted file mode 100644 index c04cb45847c2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for BookmarkRelations List. */ -public final class BookmarkRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json - */ - /** - * Sample code: Get all bookmark relations. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllBookmarkRelations( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); - } -} 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 f54f13ae59da..51981cab63dc 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,9 +4,6 @@ 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; @@ -15,7 +12,7 @@ /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -29,28 +26,15 @@ public static void createsOrUpdatesABookmark( .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withCreated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) + .withCreated(OffsetDateTime.parse("2019-01-01T13:15:30Z")) .withCreatedBy(new UserInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withDisplayName("My bookmark") .withLabels(Arrays.asList("Tag1", "Tag2")) .withNotes("Found a suspicious activity") .withQuery("SecurityEvent | where TimeGenerated > ago(1d) and TimeGenerated < ago(2d)") .withQueryResult("Security Event query result") - .withUpdated(OffsetDateTime.parse("2021-09-01T13:15:30Z")) + .withUpdated(OffsetDateTime.parse("2019-01-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 adaf45b1a342..0636cc3942be 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/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 cca078fc516b..a50f1c4f9504 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/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 7ff9e9471b73..208b49f5f7df 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/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 deleted file mode 100644 index 236b908d0955..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java +++ /dev/null @@ -1,271 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; -import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; -import com.azure.resourcemanager.securityinsights.models.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/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json - */ - /** - * Sample code: Check requirements for OfficeATP. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeATP( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json - */ - /** - * Sample code: Check requirements for AAD. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAAD( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json - */ - /** - * Sample code: Check requirements for Mcas. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMcas( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json - */ - /** - * Sample code: Check requirements for Mdatp. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMdatp( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json - */ - /** - * Sample code: Check requirements for AAD - no authorization. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoAuthorization( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json - */ - /** - * Sample code: Check requirements for ASC. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForASC( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse( - "myRg", - "myWorkspace", - new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatProtection. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatProtection( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json - */ - /** - * Sample code: Check requirements for TI Taxii. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTITaxii( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json - */ - /** - * Sample code: Check requirements for OfficeIRM. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForOfficeIRM( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json - */ - /** - * Sample code: Check requirements for MicrosoftThreatIntelligence. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForMicrosoftThreatIntelligence( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json - */ - /** - * Sample code: Check requirements for Dynamics365. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForDynamics365( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json - */ - /** - * Sample code: Check requirements for AAD - no license. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForAADNoLicense( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json - */ - /** - * Sample code: Check requirements for TI. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void checkRequirementsForTI( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java deleted file mode 100644 index 3754a2ecfb7a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java +++ /dev/null @@ -1,83 +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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; -import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; -import java.io.IOException; -import java.util.Arrays; - -/** Samples for DataConnectors Connect. */ -public final class DataConnectorsConnectSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json - */ - /** - * Sample code: Connect an APIPolling V2 logs data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void connectAnAPIPollingV2LogsDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .connectWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("123456789") - .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") - .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") - .withOutputStream("Custom-MyTableRawData") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json - */ - /** - * Sample code: Connect an APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void connectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .connectWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("123456789") - .withRequestConfigUserInputValues( - Arrays - .asList( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", - Object.class, - SerializerEncoding.JSON))), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java index 8a4b352fb274..7e0917f963ed 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 @@ -4,63 +4,22 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.securityinsights.models.Availability; -import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; -import com.azure.resourcemanager.securityinsights.models.CodelessApiPollingDataConnector; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingAuthProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingPagingProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingRequestProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessConnectorPollingResponseProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigProperties; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesDataTypesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesGraphQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesInstructionStepsItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiConnectorConfigPropertiesSampleQueriesItem; -import com.azure.resourcemanager.securityinsights.models.CodelessUiDataConnector; -import com.azure.resourcemanager.securityinsights.models.ConnectivityType; import com.azure.resourcemanager.securityinsights.models.DataTypeState; -import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnector; -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; -import com.azure.resourcemanager.securityinsights.models.PermissionsResourceProviderItem; -import com.azure.resourcemanager.securityinsights.models.PollingFrequency; -import com.azure.resourcemanager.securityinsights.models.ProviderName; -import com.azure.resourcemanager.securityinsights.models.RequiredPermissions; -import com.azure.resourcemanager.securityinsights.models.SettingType; import com.azure.resourcemanager.securityinsights.models.TIDataConnector; import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.TIDataConnectorDataTypesIndicators; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnector; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypes; -import com.azure.resourcemanager.securityinsights.models.TiTaxiiDataConnectorDataTypesTaxiiClient; -import java.io.IOException; import java.time.OffsetDateTime; -import java.util.Arrays; /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -77,77 +36,18 @@ public static void createsOrUpdatesAnOffice365DataConnector( "73e01a99-5cd7-4139-a149-9f2736ff2ab5", new OfficeDataConnector() .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8") .withDataTypes( new OfficeDataConnectorDataTypes() .withExchange(new OfficeDataConnectorDataTypesExchange().withState(DataTypeState.ENABLED)) .withSharePoint( new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) - .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))), Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json - */ - /** - * Sample code: Creates or updates a Threat Intelligence Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new TiTaxiiDataConnector() - .withEtag("d12423f6-a60b-4ca5-88c0-feb1a182d0f0") - .withWorkspaceId("dd124572-4962-4495-9bd2-9dade12314b4") - .withFriendlyName("testTaxii") - .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") - .withCollectionId("135") - .withUsername("--") - .withPassword("--") - .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) - .withPollingFrequency(PollingFrequency.ONCE_ADAY) - .withDataTypes( - new TiTaxiiDataConnectorDataTypes() - .withTaxiiClient( - new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -163,527 +63,11 @@ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", new TIDataConnector() + .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b") .withTipLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withDataTypes( new TIDataConnectorDataTypes() - .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) - .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json - */ - /** - * Sample code: Creates or updates a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "c2541efb-c9a6-47fe-9501-87d1017d1512", - new Dynamics365DataConnector() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDataTypes( - new Dynamics365DataConnectorDataTypes() - .withDynamics365CdsActivities( - new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() - .withState(DataTypeState.ENABLED))) - .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json - */ - /** - * Sample code: Creates or updates a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessUiDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("Qualys Vulnerability Management (CCP DEMO)") - .withPublisher("Qualys") - .withDescriptionMarkdown( - "The [Qualys Vulnerability Management" - + " (VM)](https://www.qualys.com/apps/vulnerability-management/) data connector" - + " provides the capability to ingest vulnerability host detection data into Azure" - + " Sentinel through the Qualys API. The connector provides visibility into host" - + " detection data from vulerability scans. This connector provides Azure Sentinel" - + " the capability to view dashboards, create custom alerts, and improve" - + " investigation ") - .withGraphQueriesTableName("QualysHostDetection_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total data received") - .withLegend("{{graphQueriesTableName}}") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("Top 10 Vulerabilities detected") - .withQuery( - "{{graphQueriesTableName}}\n" - + " | mv-expand todynamic(Detections_s)\n" - + " | extend Vulnerability = tostring(Detections_s.Results)\n" - + " | summarize count() by Vulnerability\n" - + " | top 10 by count_"))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.IS_CONNECTED_QUERY) - .withValue( - Arrays - .asList( - "{{graphQueriesTableName}}\n" - + " | summarize LastLogReceived =" - + " max(TimeGenerated)\n" - + " | project IsConnected = LastLogReceived >" - + " ago(30d)")))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions on the workspace are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)), - new PermissionsResourceProviderItem() - .withProvider( - ProviderName - .MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES_SHARED_KEYS) - .withPermissionsDisplayText( - "read permissions to shared keys for the workspace are" - + " required. [See the documentation to learn more about" - + " workspace" - + " keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).") - .withProviderDisplayName("Keys") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions().withAction(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("Microsoft.Web/sites permissions") - .withDescription( - "Read and write permissions to Azure Functions to create a" - + " Function App is required. [See the documentation to" - + " learn more about Azure" - + " Functions](https://docs.microsoft.com/azure/azure-functions/)."), - new PermissionsCustomsItem() - .withName("Qualys API Key") - .withDescription( - "A Qualys VM API username and password is required. [See the" - + " documentation to learn more about Qualys VM" - + " API](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf).")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**NOTE:** This connector uses Azure Functions to connect to Qualys VM" - + " to pull its logs into Azure Sentinel. This might result in" - + " additional data ingestion costs. Check the [Azure Functions" - + " pricing" - + " page](https://azure.microsoft.com/pricing/details/functions/)" - + " for details."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - ">**(Optional Step)** Securely store workspace and API authorization" - + " key(s) or token(s) in Azure Key Vault. Azure Key Vault provides" - + " a secure mechanism to store and retrieve key values. [Follow" - + " these" - + " instructions](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " to use Azure Key Vault with an Azure Function App."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 1 - Configuration steps for the Qualys VM API**\n\n" - + "1. Log into the Qualys Vulnerability Management console with an" - + " administrator account, select the **Users** tab and the" - + " **Users** subtab. \n" - + "2. Click on the **New** drop-down menu and select **Users..**\n" - + "3. Create a username and password for the API account. \n" - + "4. In the **User Roles** tab, ensure the account role is set to" - + " **Manager** and access is allowed to **GUI** and **API**\n" - + "4. Log out of the administrator account and log into the console" - + " with the new API credentials for validation, then log out of" - + " the API account. \n" - + "5. Log back into the console using an administrator account and" - + " modify the API accounts User Roles, removing access to **GUI**." - + " \n" - + "6. Save all changes."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**STEP 2 - Choose ONE from the following two deployment options to" - + " deploy the connector and the associated Azure Function**\n\n" - + ">**IMPORTANT:** Before deploying the Qualys VM connector, have" - + " the Workspace ID and Workspace Primary Key (can be copied from" - + " the following), as well as the Qualys VM API Authorization" - + " Key(s), readily available.") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"WorkspaceId\"],\"label\":\"Workspace" - + " ID\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL), - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"fillWith\":[\"PrimaryKey\"],\"label\":\"Primary" - + " Key\"}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.COPYABLE_LABEL))), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 1 - Azure Resource Manager (ARM) Template") - .withDescription( - "Use this method for automated deployment of the Qualys VM connector" - + " using an ARM Tempate.\n\n" - + "1. Click the **Deploy to Azure** button below. \n\n" - + "\t[![Deploy To" - + " Azure](https://aka.ms/deploytoazurebutton)](https://aka.ms/sentinelqualysvmazuredeploy)\n" - + "2. Select the preferred **Subscription**, **Resource Group** and" - + " **Location**. \n" - + "3. Enter the **Workspace ID**, **Workspace Key**, **API" - + " Username**, **API Password** , update the **URI**, and any" - + " additional URI **Filter Parameters** (each filter should be" - + " separated by an \"&\" symbol, no spaces.) \n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format. \n" - + " - The default **Time Interval** is set to pull the last five" - + " (5) minutes of data. If the time interval needs to be modified," - + " it is recommended to change the Function App Timer Trigger" - + " accordingly (in the function.json file, post deployment) to" - + " prevent overlapping data ingestion. \n" - + "> - Note: If using Azure Key Vault secrets for any of the values" - + " above, use the`@Microsoft.KeyVault(SecretUri={Security" - + " Identifier})`schema in place of the string values. Refer to" - + " [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details. \n" - + "4. Mark the checkbox labeled **I agree to the terms and" - + " conditions stated above**. \n" - + "5. Click **Purchase** to deploy."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Option 2 - Manual Deployment of Azure Functions") - .withDescription( - "Use the following step-by-step instructions to deploy the Quayls VM" - + " connector manually with Azure Functions."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**1. Create a Function App**\n\n" - + "1. From the Azure Portal, navigate to [Function" - + " App](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp)," - + " and select **+ Add**.\n" - + "2. In the **Basics** tab, ensure Runtime stack is set to" - + " **Powershell Core**. \n" - + "3. In the **Hosting** tab, ensure the **Consumption" - + " (Serverless)** plan type is selected.\n" - + "4. Make other preferrable configuration changes, if needed, then" - + " click **Create**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**2. Import Function App Code**\n\n" - + "1. In the newly created Function App, select **Functions** on" - + " the left pane and click **+ New Function**.\n" - + "2. Select **Timer Trigger**.\n" - + "3. Enter a unique Function **Name** and leave the default cron" - + " schedule of every 5 minutes, then click **Create**.\n" - + "5. Click on **Code + Test** on the left pane. \n" - + "6. Copy the [Function App" - + " Code](https://aka.ms/sentinelqualysvmazurefunctioncode) and" - + " paste into the Function App `run.ps1` editor.\n" - + "7. Click **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**3. Configure the Function App**\n\n" - + "1. In the Function App, select the Function App Name and select" - + " **Configuration**.\n" - + "2. In the **Application settings** tab, select **+ New" - + " application setting**.\n" - + "3. Add each of the following seven (7) application settings" - + " individually, with their respective string values" - + " (case-sensitive): \n" - + "\t\tapiUsername\n" - + "\t\tapiPassword\n" - + "\t\tworkspaceID\n" - + "\t\tworkspaceKey\n" - + "\t\turi\n" - + "\t\tfilterParameters\n" - + "\t\ttimeInterval\n" - + "> - Enter the URI that corresponds to your region. The complete" - + " list of API Server URLs can be [found" - + " here](https://www.qualys.com/docs/qualys-api-vmpc-user-guide.pdf#G4.735348)." - + " The `uri` value must follow the following schema: `https:///api/2.0/fo/asset/host/vm/detection/?action=list&vm_processed_after=`" - + " -- There is no need to add a time suffix to the URI, the" - + " Function App will dynamically append the Time Value to the URI" - + " in the proper format.\n" - + "> - Add any additional filter parameters, for the" - + " `filterParameters` variable, that need to be appended to the" - + " URI. Each parameter should be seperated by an \"&\" symbol and" - + " should not include any spaces.\n" - + "> - Set the `timeInterval` (in minutes) to the value of `5` to" - + " correspond to the Timer Trigger of every `5` minutes. If the" - + " time interval needs to be modified, it is recommended to change" - + " the Function App Timer Trigger accordingly to prevent" - + " overlapping data ingestion.\n" - + "> - Note: If using Azure Key Vault, use" - + " the`@Microsoft.KeyVault(SecretUri={Security Identifier})`schema" - + " in place of the string values. Refer to [Key Vault references" - + " documentation](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references)" - + " for further details.\n" - + "4. Once all application settings have been entered, click" - + " **Save**."), - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("") - .withDescription( - "**4. Configure the host.json**.\n\n" - + "Due to the potentially large amount of Qualys host detection" - + " data being ingested, it can cause the execution time to surpass" - + " the default Function App timeout of five (5) minutes. Increase" - + " the default timeout duration to the maximum of ten (10)" - + " minutes, under the Consumption Plan, to allow more time for the" - + " Function App to execute.\n\n" - + "1. In the Function App, select the Function App Name and select" - + " the **App Service Editor** blade.\n" - + "2. Click **Go** to open the editor, then select the" - + " **host.json** file under the **wwwroot** directory.\n" - + "3. Add the line `\"functionTimeout\": \"00:10:00\",` above the" - + " `managedDependancy` line \n" - + "4. Ensure **SAVED** appears on the top right corner of the" - + " editor, then exit the editor.\n\n" - + "> NOTE: If a longer timeout duration is required, consider" - + " upgrading to an [App Service" - + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/CreateAPIPolling.json - */ - /** - * Sample code: Creates or updates a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { - manager - .dataConnectors() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new CodelessApiPollingDataConnector() - .withConnectorUiConfig( - new CodelessUiConnectorConfigProperties() - .withTitle("GitHub Enterprise Audit Log") - .withPublisher("GitHub") - .withDescriptionMarkdown( - "The GitHub audit log connector provides the capability to ingest GitHub logs into" - + " Azure Sentinel. By connecting GitHub audit logs into Azure Sentinel, you can" - + " view this data in workbooks, use it to create custom alerts, and improve your" - + " investigation process.") - .withGraphQueriesTableName("GitHubAuditLogPolling_CL") - .withGraphQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesGraphQueriesItem() - .withMetricName("Total events received") - .withLegend("GitHub audit log events") - .withBaseQuery("{{graphQueriesTableName}}"))) - .withSampleQueries( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesSampleQueriesItem() - .withDescription("All logs") - .withQuery("{{graphQueriesTableName}}\n | take 10 "))) - .withDataTypes( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesDataTypesItem() - .withName("{{graphQueriesTableName}}") - .withLastDataReceivedQuery( - "{{graphQueriesTableName}}\n" - + " | summarize Time = max(TimeGenerated)\n" - + " | where isnotempty(Time)"))) - .withConnectivityCriteria( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() - .withType(ConnectivityType.fromString("SentinelKindsV2")) - .withValue(Arrays.asList()))) - .withAvailability(new Availability().withStatus(AvailabilityStatus.ONE).withIsPreview(true)) - .withPermissions( - new Permissions() - .withResourceProvider( - Arrays - .asList( - new PermissionsResourceProviderItem() - .withProvider( - ProviderName.MICROSOFT_OPERATIONAL_INSIGHTS_WORKSPACES) - .withPermissionsDisplayText( - "read and write permissions are required.") - .withProviderDisplayName("Workspace") - .withScope(PermissionProviderScope.WORKSPACE) - .withRequiredPermissions( - new RequiredPermissions() - .withWrite(true) - .withRead(true) - .withDelete(true)))) - .withCustoms( - Arrays - .asList( - new PermissionsCustomsItem() - .withName("GitHub API personal token Key") - .withDescription( - "You need access to GitHub personal token, the key should have" - + " 'admin:org' scope")))) - .withInstructionSteps( - Arrays - .asList( - new CodelessUiConnectorConfigPropertiesInstructionStepsItem() - .withTitle("Connect GitHub Enterprise Audit Log to Azure Sentinel") - .withDescription( - "Enable GitHub audit Logs. \n" - + " Follow" - + " [this](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)" - + " to create or find your personal key") - .withInstructions( - Arrays - .asList( - new InstructionStepsInstructionsItem() - .withParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"enable\":\"true\",\"userRequestPlaceHoldersInput\":[{\"displayText\":\"Organization" - + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"\",\"requestObjectKey\":\"apiEndpoint\"}]}", - Object.class, - SerializerEncoding.JSON)) - .withType(SettingType.fromString("APIKey"))))))) - .withPollingConfig( - new CodelessConnectorPollingConfigProperties() - .withAuth( - new CodelessConnectorPollingAuthProperties() - .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) - .withRequest( - new CodelessConnectorPollingRequestProperties() - .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") - .withRateLimitQps(50) - .withQueryWindowInMin(15) - .withHttpMethod("Get") - .withQueryTimeFormat("yyyy-MM-ddTHH:mm:ssZ") - .withRetryCount(2) - .withTimeoutInSeconds(60) - .withHeaders( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"Accept\":\"application/json\",\"User-Agent\":\"Scuba\"}", - Object.class, - SerializerEncoding.JSON)) - .withQueryParameters( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"phrase\":\"created:{_QueryWindowStartTime}..{_QueryWindowEndTime}\"}", - Object.class, - SerializerEncoding.JSON))) - .withPaging( - new CodelessConnectorPollingPagingProperties() - .withPagingType("LinkHeader") - .withPageSizeParaName("per_page")) - .withResponse( - new CodelessConnectorPollingResponseProperties() - .withEventsJsonPaths(Arrays.asList("$")))), + .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))), Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java index 54ce6d4bb0bc..2ef2986e146c 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,37 +9,7 @@ /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json - */ - /** - * 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-09-01-preview/examples/dataConnectors/DeleteGenericUI.json - */ - /** - * Sample code: Delete a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -52,34 +22,4 @@ public static void deleteAnOffice365DataConnector( .dataConnectors() .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json - */ - /** - * Sample code: Delete a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java deleted file mode 100644 index b9727cf73d26..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for DataConnectors Disconnect. */ -public final class DataConnectorsDisconnectSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json - */ - /** - * Sample code: Disconnect an APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void disconnectAnAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java index 4e229927f6b9..dd09c846fd4b 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,67 +9,37 @@ /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureSecurityCenterById.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-09-01-preview/examples/dataConnectors/GetGenericUI.json - */ - /** - * Sample code: Get a GenericUI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAGenericUIDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an Office ATP data connector. + * Sample code: Get a ASC data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnOfficeATPDataConnector( + public static void getAASCDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** - * Sample code: Get a IoT data connector. + * Sample code: Get an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAIoTDataConnector( + public static void getAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -84,81 +54,37 @@ public static void getAMCASDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json - */ - /** - * Sample code: Get a TI Taxii data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATITaxiiDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** - * Sample code: Get a MicrosoftThreatIntelligence data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMicrosoftThreatIntelligenceDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json - */ - /** - * Sample code: Get a ASC data connector. + * Sample code: Get an AwsCloudTrail data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAASCDataConnector( + public static void getAnAwsCloudTrailDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json - */ - /** - * Sample code: Get a TI data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get an AwsCloudTrail data connector. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAwsCloudTrailDataConnector( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -173,22 +99,21 @@ public static void getAMDATPDataConnector( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetThreatIntelligenceById.json */ /** - * Sample code: Get a MicrosoftThreatProtection data connector. + * Sample code: Get a TI data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAMicrosoftThreatProtectionDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -201,109 +126,4 @@ public static void getAnAADDataConnector( .dataConnectors() .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json - */ - /** - * Sample code: Get an AATP data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAATPDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json - */ - /** - * Sample code: Get a APIPolling data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAAPIPollingDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json - */ - /** - * Sample code: Get an Office IRM data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeIRMDataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json - */ - /** - * Sample code: Get a Dynamics365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADynamics365DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json - */ - /** - * Sample code: Get an Office365 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOffice365DataConnector( - 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-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json - */ - /** - * Sample code: Get an Aws S3 data connector. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAwsS3DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-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 962a0a285d9e..7c06cbf02299 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/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 deleted file mode 100644 index 0bb699a3decd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for DomainWhois Get. */ -public final class DomainWhoisGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json - */ - /** - * Sample code: Get whois information for a single domain name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getWhoisInformationForASingleDomainName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java deleted file mode 100644 index c18a6971c401..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; -import java.time.OffsetDateTime; -import java.util.UUID; - -/** Samples for Entities Expand. */ -public final class EntitiesExpandSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json - */ - /** - * Sample code: Expand an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void expandAnEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .expandWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityExpandParameters() - .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) - .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) - .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); - } -} 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 deleted file mode 100644 index 87a4794ab75b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java +++ /dev/null @@ -1,37 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for Entities GetInsights. */ -public final class EntitiesGetInsightsSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json - */ - /** - * Sample code: Entity Insight. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityInsight(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .getInsightsWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityGetInsightsParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withAddDefaultExtendedTimeRange(false) - .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java deleted file mode 100644 index 03835df0aca6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java +++ /dev/null @@ -1,260 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Entities Get. */ -public final class EntitiesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json - */ - /** - * Sample code: Get a submissionMail entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASubmissionMailEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json - */ - /** - * Sample code: Get a dns entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json - */ - /** - * Sample code: Get a file hash entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json - */ - /** - * Sample code: Get an IoT device entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIoTDeviceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json - */ - /** - * Sample code: Get a registry key entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryKeyEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json - */ - /** - * Sample code: Get a mailbox entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json - */ - /** - * Sample code: Get a malware entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json - */ - /** - * Sample code: Get a security alert entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityAlertEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json - */ - /** - * Sample code: Get an ip entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json - */ - /** - * Sample code: Get an account entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json - */ - /** - * Sample code: Get a cloud application entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getACloudApplicationEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json - */ - /** - * Sample code: Get a file entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json - */ - /** - * Sample code: Get a registry value entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getARegistryValueEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json - */ - /** - * Sample code: Get a url entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json - */ - /** - * Sample code: Get a mailCluster entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailClusterEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json - */ - /** - * Sample code: Get a security group entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASecurityGroupEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json - */ - /** - * Sample code: Get a mailMessage entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAMailMessageEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json - */ - /** - * Sample code: Get an azure resource entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnAzureResourceEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json - */ - /** - * Sample code: Get a host entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json - */ - /** - * Sample code: Get a process entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); - } -} 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 deleted file mode 100644 index 660a3055de2e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; -import java.time.OffsetDateTime; - -/** Samples for EntitiesGetTimeline List. */ -public final class EntitiesGetTimelineListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json - */ - /** - * Sample code: Entity timeline. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void entityTimeline(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesGetTimelines() - .listWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - new EntityTimelineParameters() - .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) - .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) - .withNumberOfBucket(4), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java deleted file mode 100644 index 76d03c406094..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java +++ /dev/null @@ -1,22 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Entities List. */ -public final class EntitiesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json - */ - /** - * Sample code: Get all entities. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java deleted file mode 100644 index a07e0a7b42bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; - -/** Samples for Entities Queries. */ -public final class EntitiesQueriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json - */ - /** - * Sample code: Get Entity Query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entities() - .queriesWithResponse( - "myRg", - "myWorkspace", - "e1d3d618-e11f-478b-98e3-bb381539a8e1", - EntityItemQueryKind.INSIGHT, - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java deleted file mode 100644 index 49db6e77c5cc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntitiesRelations List. */ -public final class EntitiesRelationsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json - */ - /** - * Sample code: Get all relations of an entity. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllRelationsOfAnEntity( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); - } -} 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 deleted file mode 100644 index 719027f63353..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java +++ /dev/null @@ -1,101 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; -import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; -import com.azure.resourcemanager.securityinsights.models.EntityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for EntityQueries CreateOrUpdate. */ -public final class EntityQueriesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json - */ - /** - * Sample code: Creates or updates an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsOrUpdatesAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "07da3cc8-c8ad-4710-a44e-334cdcb7882b", - new ActivityCustomEntityQuery() - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withTitle("An account was deleted on this host") - .withContent("On '{{Computer}}' the account '{{TargetAccount}}' was deleted by '{{AddedBy}}'") - .withDescription("Account deleted on host") - .withQueryDefinitions( - new ActivityEntityQueriesPropertiesQueryDefinitions() - .withQuery( - "let GetAccountActions = (v_Host_Name:string, v_Host_NTDomain:string," - + " v_Host_DnsDomain:string, v_Host_AzureID:string, v_Host_OMSAgentID:string){\n" - + "SecurityEvent\n" - + "| where EventID in (4725, 4726, 4767, 4720, 4722, 4723, 4724)\n" - + "// parsing for Host to handle variety of conventions coming from data\n" - + "| extend Host_HostName = case(\n" - + "Computer has '@', tostring(split(Computer, '@')[0]),\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[1]),\n" - + "Computer has '.', tostring(split(Computer, '.')[0]),\n" - + "Computer\n" - + ")\n" - + "| extend Host_NTDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', tostring(split(Computer, '.')[-2]), \n" - + "Computer\n" - + ")\n" - + "| extend Host_DnsDomain = case(\n" - + "Computer has '\\\\', tostring(split(Computer, '\\\\')[0]), \n" - + "Computer has '.', strcat_array(array_slice(split(Computer,'.'),-2,-1),'.'), \n" - + "Computer\n" - + ")\n" - + "| where (Host_HostName =~ v_Host_Name and Host_NTDomain =~ v_Host_NTDomain) \n" - + "or (Host_HostName =~ v_Host_Name and Host_DnsDomain =~ v_Host_DnsDomain) \n" - + "or v_Host_AzureID =~ _ResourceId \n" - + "or v_Host_OMSAgentID == SourceComputerId\n" - + "| project TimeGenerated, EventID, Activity, Computer, TargetAccount," - + " TargetUserName, TargetDomainName, TargetSid, SubjectUserName, SubjectUserSid," - + " _ResourceId, SourceComputerId\n" - + "| extend AddedBy = SubjectUserName\n" - + "// Future support for Activities\n" - + "| extend timestamp = TimeGenerated, HostCustomEntity = Computer," - + " AccountCustomEntity = TargetAccount\n" - + "};\n" - + "GetAccountActions('{{Host_HostName}}', '{{Host_NTDomain}}'," - + " '{{Host_DnsDomain}}', '{{Host_AzureID}}', '{{Host_OMSAgentID}}')\n" - + " \n" - + "| where EventID == 4726 ")) - .withInputEntityType(EntityType.HOST) - .withRequiredInputFieldsSets( - Arrays - .asList( - Arrays.asList("Host_HostName", "Host_NTDomain"), - Arrays.asList("Host_HostName", "Host_DnsDomain"), - Arrays.asList("Host_AzureID"), - Arrays.asList("Host_OMSAgentID"))) - .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) - .withEnabled(true), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java deleted file mode 100644 index 9ca8ca1c3964..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueries Delete. */ -public final class EntityQueriesDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json - */ - /** - * Sample code: Delete an entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java deleted file mode 100644 index c5ddd58221cf..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java +++ /dev/null @@ -1,40 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueries Get. */ -public final class EntityQueriesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json - */ - /** - * Sample code: Get an Activity entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json - */ - /** - * Sample code: Get an Expansion entity query. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnExpansionEntityQuery( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java deleted file mode 100644 index 3f319789b367..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; - -/** Samples for EntityQueries List. */ -public final class EntityQueriesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json - */ - /** - * Sample code: Get all entity queries. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); - } -} 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 deleted file mode 100644 index 8e1290833c7a..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityQueryTemplates Get. */ -public final class EntityQueryTemplatesGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json - */ - /** - * Sample code: Get an Activity entity query template. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnActivityEntityQueryTemplate( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java deleted file mode 100644 index 4648fd151d8b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; - -/** Samples for EntityQueryTemplates List. */ -public final class EntityQueryTemplatesListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json - */ - /** - * Sample code: Get all entity query templates. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllEntityQueryTemplates( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.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 deleted file mode 100644 index de44787f195e..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for EntityRelations GetRelation. */ -public final class EntityRelationsGetRelationSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json - */ - /** - * Sample code: Get an entity relation. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnEntityRelation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .entityRelations() - .getRelationWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java deleted file mode 100644 index a839ca483bbc..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.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.generated; - -import com.azure.resourcemanager.securityinsights.models.FileFormat; -import com.azure.resourcemanager.securityinsights.models.FileImportContentType; -import com.azure.resourcemanager.securityinsights.models.FileMetadata; -import com.azure.resourcemanager.securityinsights.models.IngestionMode; - -/** Samples for FileImports Create. */ -public final class FileImportsCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json - */ - /** - * Sample code: Create a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") - .withExistingWorkspace("myRg", "myWorkspace") - .withIngestionMode(IngestionMode.INGEST_ANY_VALID_RECORDS) - .withContentType(FileImportContentType.STIX_INDICATOR) - .withImportFile( - new FileMetadata().withFileFormat(FileFormat.JSON).withFileName("myFile.json").withFileSize(4653)) - .withSource("mySource") - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java deleted file mode 100644 index 6e961ca4a8bd..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java +++ /dev/null @@ -1,22 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports Delete. */ -public final class FileImportsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json - */ - /** - * Sample code: Delete a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java deleted file mode 100644 index cf0ff15ffb5b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports Get. */ -public final class FileImportsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json - */ - /** - * Sample code: Get a file import. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .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/FileImportsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java deleted file mode 100644 index 4f080eb0b16c..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for FileImports List. */ -public final class FileImportsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json - */ - /** - * Sample code: Get all file imports. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java index 8a16e508a98f..24e4b1863361 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/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 ab58f3db35c5..fcc9e7b198cf 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/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 b0cc0dbe7c41..7f51723f0311 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/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 3bdb6e55cdb5..d35acda57b97 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/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 4b99d62695e0..e7cf47640e0a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java @@ -4,13 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -21,14 +18,10 @@ public static void createsOrUpdatesAnIncidentRelation( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .createOrUpdateWithResponse( - "myRg", - "myWorkspace", - "afbd324f-6c48-459c-8710-8d1e1cd03812", - "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - new RelationInner() - .withRelatedResourceId( - "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812") + .withRelatedResourceId( + "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096") + .create(); } } 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 e9f0630456b0..ccb2c439c5f5 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/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 9ca14fce1f49..2f440f2eac90 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/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 223b77dfe78f..d3c03ec735cc 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/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 fac645158493..1cbe467edfff 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/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 deleted file mode 100644 index 1d10ad728869..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.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.generated; - -import com.azure.core.util.Context; -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/2022-09-01-preview/examples/incidents/CreateTeam.json - */ - /** - * Sample code: Creates incident teams group. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", - "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java index 7213c317f62f..f317c69f9748 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/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 aaebebca140b..ebac7745b6d3 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/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 521cc7b9a7ea..57c34eed5c70 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/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 396a34e22e02..774d4d8eedad 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/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 05dac3dfd232..9a1a759c3952 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/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/incidents/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 12ee00a614f6..0c090bc64999 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/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 deleted file mode 100644 index 8aff9771734b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Incidents RunPlaybook. */ -public final class IncidentsRunPlaybookSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json - */ - /** - * Sample code: Incidents_RunPlaybook. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void incidentsRunPlaybook( - 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 deleted file mode 100644 index 4c5af0fbd9f2..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for IpGeodata Get. */ -public final class IpGeodataGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json - */ - /** - * Sample code: Get geodata for a single IP address. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getGeodataForASingleIPAddress( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java deleted file mode 100644 index 2e1c2cff2c93..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ /dev/null @@ -1,117 +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.generated; - -import com.azure.resourcemanager.securityinsights.models.Kind; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataCategories; -import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; -import com.azure.resourcemanager.securityinsights.models.MetadataSource; -import com.azure.resourcemanager.securityinsights.models.MetadataSupport; -import com.azure.resourcemanager.securityinsights.models.Operator; -import com.azure.resourcemanager.securityinsights.models.SourceKind; -import com.azure.resourcemanager.securityinsights.models.SupportTier; -import java.time.LocalDate; -import java.util.Arrays; - -/** Samples for Metadata Create. */ -public final class MetadataCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json - */ - /** - * Sample code: Create/update full metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createUpdateFullMetadata( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) - .withSource( - new MetadataSource() - .withKind(SourceKind.SOLUTION) - .withName("Contoso Solution 1.0") - .withSourceId("b688a130-76f4-4a07-bf57-762222a3cadf")) - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .withSupport( - new MetadataSupport() - .withTier(SupportTier.PARTNER) - .withName("Microsoft") - .withEmail("support@microsoft.com") - .withLink("https://support.microsoft.com/")) - .withDependencies( - new MetadataDependencies() - .withOperator(Operator.AND) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withOperator(Operator.OR) - .withCriteria( - Arrays - .asList( - new MetadataDependencies() - .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) - .withName("Microsoft Defender for Endpoint"), - new MetadataDependencies() - .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), - new MetadataDependencies() - .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) - .withVersion("2.0"))), - new MetadataDependencies() - .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) - .withVersion("1.0"), - new MetadataDependencies() - .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) - .withCategories( - new MetadataCategories() - .withDomains(Arrays.asList("Application", "Security – Insider Threat")) - .withVerticals(Arrays.asList("Healthcare"))) - .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/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json - */ - /** - * Sample code: Create/update minimal metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createUpdateMinimalMetadata( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .metadatas() - .define("metadataName") - .withExistingWorkspace("myRg", "myWorkspace") - .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") - .withParentId( - "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) - .create(); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java deleted file mode 100644 index 83b191e5ca95..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ /dev/null @@ -1,22 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata Delete. */ -public final class MetadataDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json - */ - /** - * Sample code: Delete metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java deleted file mode 100644 index 9d738dafd085..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata Get. */ -public final class MetadataGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json - */ - /** - * Sample code: Get single metadata by name. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getSingleMetadataByName( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java deleted file mode 100644 index 05d6eb76725f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ /dev/null @@ -1,35 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for Metadata List. */ -public final class MetadataListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json - */ - /** - * Sample code: Get all metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } - - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json - */ - /** - * Sample code: Get all metadata with OData filter/orderby/skip/top. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllMetadataWithODataFilterOrderbySkipTop( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java deleted file mode 100644 index 91f5be55253b..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ /dev/null @@ -1,29 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; -import com.azure.resourcemanager.securityinsights.models.MetadataModel; - -/** Samples for Metadata Update. */ -public final class MetadataUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json - */ - /** - * Sample code: Update metadata. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); - resource - .update() - .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) - .apply(); - } -} 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 deleted file mode 100644 index 83381c6ff091..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Delete. */ -public final class OfficeConsentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json - */ - /** - * Sample code: Delete an office consent. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteAnOfficeConsent( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java deleted file mode 100644 index 82ebecfad742..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Get. */ -public final class OfficeConsentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json - */ - /** - * Sample code: Get an office consent. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java deleted file mode 100644 index bff20163b14d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for OfficeConsents List. */ -public final class OfficeConsentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json - */ - /** - * Sample code: Get all office consents. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllOfficeConsents( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java index bd9e0689a55d..c0bf16b496b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. 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 deleted file mode 100644 index 9b87891b4ad7..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings Delete. */ -public final class ProductSettingsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json - */ - /** - * Sample code: Delete EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteEyesOnSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java deleted file mode 100644 index c48e37a90773..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java +++ /dev/null @@ -1,22 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings Get. */ -public final class ProductSettingsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json - */ - /** - * Sample code: Get EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java deleted file mode 100644 index e54fd9e369a6..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java +++ /dev/null @@ -1,22 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for ProductSettings List. */ -public final class ProductSettingsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json - */ - /** - * Sample code: Get all settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java deleted file mode 100644 index d84adcba1067..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EyesOn; - -/** Samples for ProductSettings Update. */ -public final class ProductSettingsUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json - */ - /** - * Sample code: Update EyesOn settings. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void updateEyesOnSettings( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .productSettings() - .updateWithResponse( - "myRg", - "myWorkspace", - "EyesOn", - new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java index 4f4f433d1c48..825100fe4b2e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java index 5a7fbfb4f91a..aef7a20ed483 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java index fa8f8cd73f74..1fe9f4e9c42f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java index a8eb1f6d6008..2d7bbf9a59db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java @@ -9,7 +9,7 @@ /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics 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 177a2c21f7ab..c77a31c205c0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 73d131daaf98..3d31aa253845 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/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 1e61ad09b71b..88872c1c9bbb 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/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 089fa7920c92..0dea3b6e31fc 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/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 deleted file mode 100644 index eedc402653a9..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.RepoType; - -/** Samples for SourceControl ListRepositories. */ -public final class SourceControlListRepositoriesSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json - */ - /** - * Sample code: Get repository list. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); - } -} 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 deleted file mode 100644 index 3981370a4a6f..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java +++ /dev/null @@ -1,50 +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.generated; - -import com.azure.resourcemanager.securityinsights.models.ContentPathMap; -import com.azure.resourcemanager.securityinsights.models.ContentType; -import com.azure.resourcemanager.securityinsights.models.RepoType; -import com.azure.resourcemanager.securityinsights.models.Repository; -import java.util.Arrays; - -/** Samples for SourceControlsOperation Create. */ -public final class SourceControlsOperationCreateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json - */ - /** - * Sample code: Creates a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void createsASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .define("789e0c1f-4a3d-43ad-809c-e713b677b04a") - .withExistingWorkspace("myRg", "myWorkspace") - .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") - .withDisplayName("My Source Control") - .withDescription("This is a source control") - .withRepoType(RepoType.GITHUB) - .withContentTypes(Arrays.asList(ContentType.fromString("AnalyticRules"), ContentType.WORKBOOK)) - .withRepository( - new Repository() - .withUrl("https://github.com/user/repo") - .withBranch("master") - .withDisplayUrl("https://github.com/user/repo") - .withPathMapping( - Arrays - .asList( - new ContentPathMap() - .withContentType(ContentType.fromString("AnalyticRules")) - .withPath("path/to/rules"), - new ContentPathMap() - .withContentType(ContentType.WORKBOOK) - .withPath("path/to/workbooks")))) - .create(); - } -} 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 deleted file mode 100644 index 3479bbc73c0d..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java +++ /dev/null @@ -1,25 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Delete. */ -public final class SourceControlsOperationDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json - */ - /** - * Sample code: Delete a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void deleteASourceControl( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java deleted file mode 100644 index e311a8036dba..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java +++ /dev/null @@ -1,24 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation Get. */ -public final class SourceControlsOperationGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json - */ - /** - * Sample code: Get a source control. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java deleted file mode 100644 index 348b8fabfa69..000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java +++ /dev/null @@ -1,23 +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.generated; - -import com.azure.core.util.Context; - -/** Samples for SourceControlsOperation List. */ -public final class SourceControlsOperationListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json - */ - /** - * Sample code: Get all source controls. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllSourceControls( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); - } -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java index 19453e0a796a..da0c3a88540c 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/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 1934f75a9e79..0510adc720fd 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 @@ -11,7 +11,7 @@ /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -40,7 +40,7 @@ public static void createANewThreatIntelligence( .withRevoked(false) .withConfidence(78) .withThreatTypes(Arrays.asList("compromised")) - .withValidFrom("2021-09-15T17:44:00.114052Z") + .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), Context.NONE); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java index 6185703dc8aa..700aa645aa5a 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 @@ -11,7 +11,7 @@ /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. 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 fe4c1fb359c4..90df8b33815e 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/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 73c9f32e2419..aad6ce689528 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/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 d04ce8551107..3dda82da939b 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/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 487339a28251..f80263bfc1e0 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 @@ -7,13 +7,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; +import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingOrder; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -31,14 +31,14 @@ public static void queryThreatIntelligenceIndicatorsAsPerFilteringCriteria( .withPageSize(100) .withMinConfidence(25) .withMaxConfidence(80) - .withMinValidUntil("2021-04-05T17:44:00.114052Z") - .withMaxValidUntil("2021-04-25T17:44:00.114052Z") + .withMinValidUntil("2020-04-05T17:44:00.114052Z") + .withMaxValidUntil("2020-04-25T17:44:00.114052Z") .withSortBy( Arrays .asList( new ThreatIntelligenceSortingCriteria() .withItemKey("lastUpdatedTimeUtc") - .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) + .withSortOrder(ThreatIntelligenceSortingOrder.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), Context.NONE); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java index 96e9c364d8e4..a5a4b4eaaeea 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 @@ -11,7 +11,7 @@ /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. 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 3ab41f9ce6d6..8eed6bcf93a1 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/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 f6508ac2af4a..4e03840ca5a0 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 @@ -4,51 +4,36 @@ package com.azure.resourcemanager.securityinsights.generated; -import java.util.HashMap; -import java.util.Map; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlistItem.json */ /** - * Sample code: Creates or updates a watchlist item. + * Sample code: Create or update a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlistItem( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void createOrUpdateAWatchlistItem( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) throws IOException { manager .watchlistItems() .define("82ba292c-dc97-4dfc-969d-d4dd9e666842") .withExistingWatchlist("myRg", "myWorkspace", "highValueAsset") .withEtag("0300bf09-0000-0000-0000-5c37296e0000") .withItemsKeyValue( - mapOf( - "Business tier", - "10.0.2.0/24", - "Data tier", - "10.0.2.0/24", - "Gateway subnet", - "10.0.255.224/27", - "Private DMZ in", - "10.0.0.0/27", - "Public DMZ out", - "10.0.0.96/27", - "Web Tier", - "10.0.1.0/24")) + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"Business tier\":\"10.0.2.0/24\",\"Data tier\":\"10.0.2.0/24\",\"Gateway" + + " subnet\":\"10.0.255.224/27\",\"Private DMZ in\":\"10.0.0.0/27\",\"Public DMZ" + + " out\":\"10.0.0.96/27\",\"Web Tier\":\"10.0.1.0/24\"}", + Object.class, + SerializerEncoding.JSON)) .create(); } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java index 95b63e3a64e9..ac5d540c7017 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,10 +9,10 @@ /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/DeleteWatchlistItem.json */ /** - * Sample code: Delete a watchlist Item. + * Sample code: Delete a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ 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 e86b44a1108a..3070cfe97b2f 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/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 7fe192510721..3da5265c148e 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/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. 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 d668e090cc94..134b98b4eb11 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,19 +4,19 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.resourcemanager.securityinsights.models.SourceType; +import com.azure.resourcemanager.securityinsights.models.Source; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlist.json */ /** - * Sample code: Creates or updates a watchlist and bulk creates watchlist items. + * Sample code: Create or update a watchlist. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( + public static void createOrUpdateAWatchlist( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .watchlists() @@ -25,25 +25,21 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) + .withSource(Source.LOCAL_FILE) .withDescription("Watchlist from CSV content") - .withNumberOfLinesToSkip(1) - .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") .withItemsSearchKey("header1") - .withContentType("text/csv") .create(); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** - * Sample code: Creates or updates a watchlist. + * Sample code: Create or update a watchlist and bulk creates watchlist items. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAWatchlist( + public static void createOrUpdateAWatchlistAndBulkCreatesWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .watchlists() @@ -52,10 +48,12 @@ public static void createsOrUpdatesAWatchlist( .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") .withDisplayName("High Value Assets Watchlist") .withProvider("Microsoft") - .withSource("watchlist.csv") - .withSourceType(SourceType.LOCAL_FILE) + .withSource(Source.LOCAL_FILE) .withDescription("Watchlist from CSV content") + .withNumberOfLinesToSkip(1) + .withRawContent("This line will be skipped\nheader1,header2\nvalue1,value2") .withItemsSearchKey("header1") + .withContentType("text/csv") .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 173a9fdce43f..8d538271808d 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/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 5de292dd4f01..4f169b45d9e1 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/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/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 1ff890f70c81..da61166c444e 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/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2022-11-01/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists.