diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 51d1f53d44663..2e9757ccfb0b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2023-01-19) + +- 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-2023-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md index be7cd5eb6b9ee..bbead06fbc51b 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-2023-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-securityinsights - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md index de287165b2a01..3843e3cf898ca 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,18 +58,12 @@ ## 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 @@ -139,23 +73,10 @@ - [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 +91,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 +128,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/2023-02-01/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -244,12 +154,10 @@ public final class ActionsCreateOrUpdateSamples { ### Actions_Delete ```java -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -265,7 +173,7 @@ public final class ActionsDeleteSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -273,12 +181,10 @@ public final class ActionsDeleteSamples { ### Actions_Get ```java -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -294,7 +200,7 @@ public final class ActionsGetSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -302,12 +208,10 @@ public final class ActionsGetSamples { ### Actions_ListByAlertRule ```java -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -316,7 +220,10 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -324,12 +231,10 @@ public final class ActionsListByAlertRuleSamples { ### AlertRuleTemplates_Get ```java -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/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -340,7 +245,8 @@ public final class AlertRuleTemplatesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); } } ``` @@ -348,12 +254,10 @@ public final class AlertRuleTemplatesGetSamples { ### AlertRuleTemplates_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -362,7 +266,7 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -370,7 +274,6 @@ public final class AlertRuleTemplatesListSamples { ### AlertRules_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; @@ -381,16 +284,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 +299,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/2023-02-01/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -419,212 +317,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()))))), - Context.NONE); + .withEnabled(true), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -644,11 +342,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -671,7 +369,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) @@ -717,275 +414,7 @@ public final class AlertRulesCreateOrUpdateSamples { new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - 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); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -1004,12 +433,10 @@ public final class AlertRulesCreateOrUpdateSamples { ### AlertRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -1019,7 +446,8 @@ public final class AlertRulesDeleteSamples { public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1027,12 +455,10 @@ public final class AlertRulesDeleteSamples { ### AlertRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -1043,25 +469,12 @@ public final class AlertRulesGetSamples { 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/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); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -1069,11 +482,13 @@ public final class AlertRulesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -1084,7 +499,11 @@ public final class AlertRulesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); + .getWithResponse( + "myRg", + "myWorkspace", + "microsoftSecurityIncidentCreationRuleExample", + com.azure.core.util.Context.NONE); } } ``` @@ -1092,12 +511,10 @@ public final class AlertRulesGetSamples { ### AlertRules_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -1105,7 +522,7 @@ public final class AlertRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); + manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -1120,7 +537,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/2023-02-01/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. @@ -1145,12 +562,10 @@ public final class AutomationRulesCreateOrUpdateSamples { ### AutomationRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -1161,7 +576,8 @@ public final class AutomationRulesDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1169,12 +585,10 @@ public final class AutomationRulesDeleteSamples { ### AutomationRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -1184,7 +598,8 @@ public final class AutomationRulesGetSamples { public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1192,12 +607,10 @@ public final class AutomationRulesGetSamples { ### AutomationRules_List ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -1205,149 +618,7 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); - } -} -``` - -### 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); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -1355,9 +626,6 @@ public final class BookmarkRelationsListSamples { ### Bookmarks_CreateOrUpdate ```java -import com.azure.resourcemanager.securityinsights.models.AttackTactic; -import com.azure.resourcemanager.securityinsights.models.BookmarkEntityMappings; -import com.azure.resourcemanager.securityinsights.models.EntityFieldMapping; import com.azure.resourcemanager.securityinsights.models.UserInfo; import java.time.OffsetDateTime; import java.util.Arrays; @@ -1366,7 +634,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/2023-02-01/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -1380,28 +648,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(); } } @@ -1410,12 +665,10 @@ public final class BookmarksCreateOrUpdateSamples { ### Bookmarks_Delete ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -1425,7 +678,8 @@ public final class BookmarksDeleteSamples { public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1433,12 +687,10 @@ public final class BookmarksDeleteSamples { ### Bookmarks_Get ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1448,7 +700,8 @@ public final class BookmarksGetSamples { public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -1456,12 +709,10 @@ public final class BookmarksGetSamples { ### Bookmarks_List ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1469,2302 +720,255 @@ public final class BookmarksListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); + manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` -### 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/2023-02-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( - "myRg", - "myWorkspace", - "316ec55e-7138-4d63-ab18-90c8a60fd1c8", - new DataConnectorConnectBody() - .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") - .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("fakeKeyPlaceholder") - .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( + .createOrUpdateWithResponse( "myRg", "myWorkspace", "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"), - 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( - "myRg", - "myWorkspace", - "73e01a99-5cd7-4139-a149-9f2736ff2ab5", - new TIDataConnector() - .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("$")))), - Context.NONE); - } -} -``` - -### DataConnectors_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for DataConnectors Delete. */ -public final class DataConnectorsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json - */ - /** - * 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); + .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))), + com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** - * Sample code: Entity timeline. + * Sample code: Creates or updates an Threat Intelligence Platform data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void entityTimeline(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .entitiesGetTimelines() - .listWithResponse( + .dataConnectors() + .createOrUpdateWithResponse( "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); + "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))), + com.azure.core.util.Context.NONE); } } ``` -### EntitiesRelations_List +### DataConnectors_Delete ```java -import com.azure.core.util.Context; - -/** Samples for EntitiesRelations List. */ -public final class EntitiesRelationsListSamples { +/** Samples for DataConnectors Delete. */ +public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** - * Sample code: Get all relations of an entity. + * Sample code: Delete an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllRelationsOfAnEntity( + public static void deleteAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` -### EntityQueries_CreateOrUpdate +### DataConnectors_Get ```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 { +/** Samples for DataConnectors Get. */ +public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** - * Sample code: Creates or updates an Activity entity query. + * Sample code: Get a ASC data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnActivityEntityQuery( + public static void getAASCDataConnector( 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; + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE); } -} -``` - -### EntityQueries_Delete -```java -import com.azure.core.util.Context; - -/** Samples for EntityQueries Delete. */ -public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** - * Sample code: Delete an entity query. + * Sample code: Get an Office365 data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getAnOffice365DataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** - * Sample code: Get an Activity entity query. + * Sample code: Get a MCAS data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnActivityEntityQuery( + public static void getAMCASDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** - * Sample code: Get an Expansion entity query. + * Sample code: Get an AwsCloudTrail data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnExpansionEntityQuery( + public static void getAnAwsCloudTrailDataConnector( 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); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** - * Sample code: Get an Activity entity query template. + * Sample code: Get an AATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnActivityEntityQueryTemplate( + public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** - * Sample code: Get all entity query templates. + * Sample code: Get a MDATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllEntityQueryTemplates( + public static void getAMDATPDataConnector( 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); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetThreatIntelligenceById.json */ /** - * Sample code: Create a file import. + * Sample code: Get a TI data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getATIDataConnector(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); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** - * Sample code: Get a file import. + * Sample code: Get an AAD data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getAnAADDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager - .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); } } ``` -### FileImports_List +### DataConnectors_List ```java -import com.azure.core.util.Context; - -/** Samples for FileImports List. */ -public final class FileImportsListSamples { +/** Samples for DataConnectors List. */ +public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetDataConnectors.json */ /** - * Sample code: Get all file imports. + * Sample code: Get all data connectors. * * @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); + public static void getAllDataConnectors( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -3775,7 +979,7 @@ public final class FileImportsListSamples { /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/CreateIncidentComment.json */ /** * Sample code: Creates or updates an incident comment. @@ -3797,12 +1001,10 @@ public final class IncidentCommentsCreateOrUpdateSamples { ### IncidentComments_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. @@ -3818,7 +1020,7 @@ public final class IncidentCommentsDeleteSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3826,12 +1028,10 @@ public final class IncidentCommentsDeleteSamples { ### IncidentComments_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. @@ -3847,7 +1047,7 @@ public final class IncidentCommentsGetSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3855,12 +1055,10 @@ public final class IncidentCommentsGetSamples { ### IncidentComments_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. @@ -3871,7 +1069,15 @@ public final class IncidentCommentsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3879,13 +1085,10 @@ public final class IncidentCommentsListSamples { ### IncidentRelations_CreateOrUpdate ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; - /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -3896,15 +1099,11 @@ public final class IncidentRelationsCreateOrUpdateSamples { 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(); } } ``` @@ -3912,12 +1111,10 @@ public final class IncidentRelationsCreateOrUpdateSamples { ### IncidentRelations_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -3933,7 +1130,7 @@ public final class IncidentRelationsDeleteSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3941,12 +1138,10 @@ public final class IncidentRelationsDeleteSamples { ### IncidentRelations_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -3962,7 +1157,7 @@ public final class IncidentRelationsGetSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3970,12 +1165,10 @@ public final class IncidentRelationsGetSamples { ### IncidentRelations_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -3986,7 +1179,15 @@ public final class IncidentRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -4005,7 +1206,7 @@ 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/2023-02-01/examples/incidents/CreateIncident.json */ /** * Sample code: Creates or updates an incident. @@ -4034,45 +1235,13 @@ public final class IncidentsCreateOrUpdateSamples { } ``` -### 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 - */ - /** - * 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); - } -} -``` - ### 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/2023-02-01/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. @@ -4082,7 +1251,8 @@ public final class IncidentsDeleteSamples { public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4090,12 +1260,10 @@ public final class IncidentsDeleteSamples { ### Incidents_Get ```java -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. @@ -4105,7 +1273,8 @@ public final class IncidentsGetSamples { public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4113,12 +1282,10 @@ public final class IncidentsGetSamples { ### Incidents_List ```java -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. @@ -4126,125 +1293,85 @@ public final class IncidentsListSamples { * @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); - } -} -``` - -### 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 - */ - /** - * Sample code: Get all incident alerts. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager - .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); - } -} -``` - -### Incidents_ListBookmarks - -```java -import com.azure.core.util.Context; - -/** Samples for Incidents ListBookmarks. */ -public final class IncidentsListBookmarksSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json - */ - /** - * Sample code: Get all incident bookmarks. - * - * @param manager Entry point to SecurityInsightsManager. - */ - public static void getAllIncidentBookmarks( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } ``` -### Incidents_ListEntities +### Incidents_ListAlerts ```java -import com.azure.core.util.Context; - -/** Samples for Incidents ListEntities. */ -public final class IncidentsListEntitiesSamples { +/** 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/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentAlerts.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Get all incident alerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void getAllIncidentAlerts( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } ``` -### Incidents_RunPlaybook +### Incidents_ListBookmarks ```java -import com.azure.core.util.Context; - -/** Samples for Incidents RunPlaybook. */ -public final class IncidentsRunPlaybookSamples { +/** Samples for Incidents ListBookmarks. */ +public final class IncidentsListBookmarksSamples { /* - * 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/2023-02-01/examples/incidents/GetAllIncidentBookmarks.json */ /** - * Sample code: Incidents_RunPlaybook. + * Sample code: Get all incident bookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void incidentsRunPlaybook( + public static void getAllIncidentBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } ``` -### IpGeodata_Get +### Incidents_ListEntities ```java -import com.azure.core.util.Context; - -/** Samples for IpGeodata Get. */ -public final class IpGeodataGetSamples { +/** Samples for Incidents ListEntities. */ +public final class IncidentsListEntitiesSamples { /* - * 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/2023-02-01/examples/incidents/GetAllIncidentEntities.json */ /** - * Sample code: Get geodata for a single IP address. + * Sample code: Gets all incident related entities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getGeodataForASingleIPAddress( + public static void getsAllIncidentRelatedEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager + .incidents() + .listEntitiesWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } ``` @@ -4252,7 +1379,6 @@ public final class IpGeodataGetSamples { ### Metadata_Create ```java -import com.azure.resourcemanager.securityinsights.models.Kind; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataCategories; import com.azure.resourcemanager.securityinsights.models.MetadataDependencies; @@ -4267,7 +1393,7 @@ import java.util.Arrays; /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -4284,7 +1410,7 @@ public final class MetadataCreateSamples { .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .withSource( new MetadataSource() .withKind(SourceKind.SOLUTION) @@ -4310,22 +1436,22 @@ public final class MetadataCreateSamples { .asList( new MetadataDependencies() .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withName("Microsoft Defender for Endpoint"), new MetadataDependencies() .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), + .withKind("DataConnector"), new MetadataDependencies() .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withVersion("2.0"))), new MetadataDependencies() .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) + .withKind("Playbook") .withVersion("1.0"), new MetadataDependencies() .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) + .withKind("Parser")))) .withCategories( new MetadataCategories() .withDomains(Arrays.asList("Application", "Security – Insider Threat")) @@ -4343,7 +1469,7 @@ public final class MetadataCreateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -4359,7 +1485,7 @@ public final class MetadataCreateSamples { .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .create(); } } @@ -4368,12 +1494,10 @@ public final class MetadataCreateSamples { ### Metadata_Delete ```java -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -4381,7 +1505,7 @@ public final class MetadataDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } ``` @@ -4389,12 +1513,10 @@ public final class MetadataDeleteSamples { ### Metadata_Get ```java -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -4403,7 +1525,7 @@ public final class MetadataGetSamples { */ public static void getSingleMetadataByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } ``` @@ -4411,12 +1533,10 @@ public final class MetadataGetSamples { ### Metadata_List ```java -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -4424,11 +1544,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -4437,7 +1557,7 @@ public final class MetadataListSamples { */ public static void getAllMetadataWithODataFilterOrderbySkipTop( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4445,14 +1565,13 @@ public final class MetadataListSamples { ### Metadata_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -4461,7 +1580,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) @@ -4470,84 +1592,13 @@ public final class MetadataUpdateSamples { } ``` -### OfficeConsents_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Delete. */ -public final class OfficeConsentsDeleteSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json - */ - /** - * 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); - } -} -``` - -### OfficeConsents_Get - -```java -import com.azure.core.util.Context; - -/** Samples for OfficeConsents Get. */ -public final class OfficeConsentsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json - */ - /** - * 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); - } -} -``` - -### OfficeConsents_List - -```java -import com.azure.core.util.Context; - -/** Samples for OfficeConsents List. */ -public final class OfficeConsentsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json - */ - /** - * 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); - } -} -``` - ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -4555,101 +1606,7 @@ public final class OperationsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); - } -} -``` - -### ProductSettings_Delete - -```java -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); - } -} -``` - -### ProductSettings_Get - -```java -import com.azure.core.util.Context; - -/** Samples for ProductSettings Get. */ -public final class ProductSettingsGetSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json - */ - /** - * 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); - } -} -``` - -### ProductSettings_List - -```java -import com.azure.core.util.Context; - -/** Samples for ProductSettings List. */ -public final class ProductSettingsListSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json - */ - /** - * 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); - } -} -``` - -### ProductSettings_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.EyesOn; - -/** Samples for ProductSettings Update. */ -public final class ProductSettingsUpdateSamples { - /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json - */ - /** - * 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); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -4658,7 +1615,6 @@ public final class ProductSettingsUpdateSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -4672,7 +1628,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/2023-02-01/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -4726,7 +1682,7 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { .withIsDefaultSettings(true) .withAnomalySettingsVersion(0) .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -4734,12 +1690,10 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { ### SecurityMLAnalyticsSettings_Delete ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -4750,7 +1704,8 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE); } } ``` @@ -4758,12 +1713,10 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples { ### SecurityMLAnalyticsSettings_Get ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -4774,7 +1727,7 @@ public final class SecurityMLAnalyticsSettingsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE); } } ``` @@ -4782,12 +1735,10 @@ public final class SecurityMLAnalyticsSettingsGetSamples { ### SecurityMLAnalyticsSettings_List ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -4796,7 +1747,7 @@ public final class SecurityMLAnalyticsSettingsListSamples { */ public static void getAllSecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); + manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4807,7 +1758,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/2023-02-01/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -4829,12 +1780,10 @@ public final class SentinelOnboardingStatesCreateSamples { ### SentinelOnboardingStates_Delete ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -4843,7 +1792,9 @@ public final class SentinelOnboardingStatesDeleteSamples { */ public static void deleteSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } ``` @@ -4851,12 +1802,10 @@ public final class SentinelOnboardingStatesDeleteSamples { ### SentinelOnboardingStates_Get ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -4865,7 +1814,9 @@ public final class SentinelOnboardingStatesGetSamples { */ public static void getSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } ``` @@ -4873,12 +1824,10 @@ public final class SentinelOnboardingStatesGetSamples { ### SentinelOnboardingStates_List ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -4887,147 +1836,7 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); - } -} -``` - -### 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); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5035,14 +1844,13 @@ public final class SourceControlsOperationListSamples { ### ThreatIntelligenceIndicator_AppendTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -5058,7 +1866,7 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5066,14 +1874,13 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { ### ThreatIntelligenceIndicator_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -5106,7 +1913,7 @@ public final class ThreatIntelligenceIndicatorCreateSamples { .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5114,14 +1921,13 @@ public final class ThreatIntelligenceIndicatorCreateSamples { ### ThreatIntelligenceIndicator_CreateIndicator ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -5150,10 +1956,10 @@ 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); + com.azure.core.util.Context.NONE); } } ``` @@ -5161,12 +1967,10 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { ### ThreatIntelligenceIndicator_Delete ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -5177,7 +1981,8 @@ public final class ThreatIntelligenceIndicatorDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE); } } ``` @@ -5185,12 +1990,10 @@ public final class ThreatIntelligenceIndicatorDeleteSamples { ### ThreatIntelligenceIndicator_Get ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -5201,7 +2004,8 @@ public final class ThreatIntelligenceIndicatorGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } ``` @@ -5209,16 +2013,15 @@ public final class ThreatIntelligenceIndicatorGetSamples { ### ThreatIntelligenceIndicator_QueryIndicators ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; +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/2023-02-01/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -5236,16 +2039,16 @@ 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))) + .withItemKey("fakeTokenPlaceholder") + .withSortOrder(ThreatIntelligenceSortingOrder.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5253,14 +2056,13 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { ### ThreatIntelligenceIndicator_ReplaceTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -5278,7 +2080,7 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5286,12 +2088,10 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { ### ThreatIntelligenceIndicatorMetrics_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -5300,7 +2100,9 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { */ public static void getThreatIntelligenceIndicatorsMetrics( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager + .threatIntelligenceIndicatorMetrics() + .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5308,12 +2110,10 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { ### ThreatIntelligenceIndicatorsOperation_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -5324,7 +2124,7 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -5332,68 +2132,51 @@ 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/2023-02-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; - } } ``` ### WatchlistItems_Delete ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlistItem.json */ /** - * Sample code: Delete a watchlist Item. + * Sample code: Delete a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ @@ -5402,7 +2185,11 @@ public final class WatchlistItemsDeleteSamples { manager .watchlistItems() .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", + com.azure.core.util.Context.NONE); } } ``` @@ -5410,12 +2197,10 @@ public final class WatchlistItemsDeleteSamples { ### WatchlistItems_Get ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -5426,7 +2211,11 @@ public final class WatchlistItemsGetSamples { manager .watchlistItems() .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "3f8901fe-63d9-4875-9ad5-9fb3b8105797", + com.azure.core.util.Context.NONE); } } ``` @@ -5434,12 +2223,10 @@ public final class WatchlistItemsGetSamples { ### WatchlistItems_List ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -5448,7 +2235,7 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } ``` @@ -5456,19 +2243,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/2023-02-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 +2264,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/2023-02-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 +2287,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(); } } @@ -5516,12 +2301,10 @@ public final class WatchlistsCreateOrUpdateSamples { ### Watchlists_Delete ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -5529,7 +2312,9 @@ public final class WatchlistsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager + .watchlists() + .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } ``` @@ -5537,12 +2322,10 @@ public final class WatchlistsDeleteSamples { ### Watchlists_Get ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -5550,7 +2333,7 @@ public final class WatchlistsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } ``` @@ -5558,12 +2341,10 @@ public final class WatchlistsGetSamples { ### Watchlists_List ```java -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -5571,7 +2352,7 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml b/sdk/securityinsights/azure-resourcemanager-securityinsights/pom.xml index 8bc8a35a859bc..20d204962873a 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-2023-02. 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 6868ca4ea727a..8611db4425a71 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,16 @@ 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 +47,15 @@ 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,31 +81,11 @@ 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; @@ -145,18 +93,10 @@ public final class SecurityInsightsManager { 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 +107,6 @@ public final class SecurityInsightsManager { private WatchlistItems watchlistItems; - private DataConnectors dataConnectors; - - private DataConnectorsCheckRequirementsOperations dataConnectorsCheckRequirementsOperations; - private Operations operations; private final SecurityInsights clientObject; @@ -338,7 +274,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 +379,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 +392,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 +428,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. */ @@ -635,18 +451,6 @@ public Metadatas metadatas() { 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 +477,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 +541,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 1679ca2138ad0..18cfd50a24315 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java @@ -44,21 +44,6 @@ public interface ActionsClient { PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - /** * Gets the action of alert rule. * @@ -77,21 +62,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** - * Creates or updates the action of alert rule. + * Gets the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); + ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Creates or updates the action of alert rule. @@ -117,18 +100,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the action of alert rule. + * Creates or updates the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); /** * Delete the action of alert rule. @@ -146,4 +132,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + + /** + * Delete the action of alert rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param actionId Action ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java index c568ee0f23feb..1747732b0446d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java @@ -46,13 +46,15 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -60,13 +62,11 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index d40ca296e5fc6..c77a3e9fa2fa2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java @@ -46,13 +46,15 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -60,15 +62,13 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -93,15 +94,14 @@ AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -109,12 +109,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -122,12 +124,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 8bdfc546a32d2..1e448c15a2037 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java @@ -13,20 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); - /** * Gets the automation rule. * @@ -44,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Creates or updates the automation rule. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -52,10 +38,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -79,7 +65,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -87,10 +73,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -108,6 +94,20 @@ Response createOrUpdateWithResponse( Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + /** + * Delete the automation rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + /** * Gets all automation rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java deleted file mode 100644 index 1d63a4251db12..0000000000000 --- 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 e644d527b90a3..0000000000000 --- 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 767fec60845b3..0e9d306ada842 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java @@ -46,13 +46,15 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -60,15 +62,13 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Creates or updates the bookmark. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); /** * Creates or updates the bookmark. @@ -93,15 +94,14 @@ BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); + BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); /** * Delete the bookmark. @@ -109,12 +109,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -122,13 +125,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java deleted file mode 100644 index 146c3f4c17933..0000000000000 --- 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 78d1cc36c200c..fe323df0c4a72 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 e9ae9d9fcfedd..0000000000000 --- 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 28404013fdcbe..0000000000000 --- 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 bfa335c3065ee..0000000000000 --- 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 10130bd876ab1..0000000000000 --- 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 68ba3c6be0c38..0000000000000 --- 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 96c60a276daef..0000000000000 --- 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 9f6c0165269d7..0000000000000 --- 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 91450d050bdea..0000000000000 --- 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 c8f34adc35784..6ea533722f102 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 8f2125a0506df..bb3cd56384e4c 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 12e0bda1f5e85..33a80a3568b41 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 50c85d732cb84..0000000000000 --- 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 index a42eaa9112f18..c54168b52e0dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java @@ -53,20 +53,6 @@ PagedIterable list( Integer skip, Context context); - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); - /** * Get a Metadata. * @@ -84,7 +70,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Delete a Metadata. + * Get a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -92,9 +78,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Metadata. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String metadataName); + MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -113,20 +100,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Create a Metadata. + * Delete a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Create a Metadata. @@ -150,20 +134,20 @@ Response createWithResponse( Context context); /** - * Update an existing Metadata. + * Create a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. + * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); + MetadataModelInner create( + String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); /** * Update an existing Metadata. @@ -185,4 +169,20 @@ Response updateWithResponse( String metadataName, MetadataPatch metadataPatch, Context context); + + /** + * Update an existing Metadata. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param metadataName The Metadata name. + * @param metadataPatch Partial metadata request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetadataModelInner update( + String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java deleted file mode 100644 index 09ab2236789b7..0000000000000 --- 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 ddb0f006d6b3c..0000000000000 --- 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 4d9c0b816c820..d7ae5ad3f366b 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. @@ -184,13 +114,6 @@ public interface SecurityInsights { */ MetadatasClient getMetadatas(); - /** - * Gets the OfficeConsentsClient object to access its operations. - * - * @return the OfficeConsentsClient object. - */ - OfficeConsentsClient getOfficeConsents(); - /** * Gets the SentinelOnboardingStatesClient object to access its operations. * @@ -205,27 +128,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 +163,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 421b464275887..4a2af29bc349b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java @@ -47,13 +47,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -61,15 +63,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -78,17 +78,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -97,19 +99,17 @@ SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -117,12 +117,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -130,13 +133,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java index 10a75e9aee2e0..500eef1cdbded 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java @@ -13,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ public interface SentinelOnboardingStatesClient { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - /** * Get Sentinel onboarding state. * @@ -45,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Create Sentinel onboarding state. + * Get Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -56,7 +41,7 @@ Response getWithResponse( * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner create( + SentinelOnboardingStateInner get( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** @@ -81,7 +66,7 @@ Response createWithResponse( Context context); /** - * Delete Sentinel onboarding state. + * Create Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -89,9 +74,11 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + SentinelOnboardingStateInner create( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -110,17 +97,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Gets all Sentinel onboarding states. + * Delete Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. @@ -136,4 +123,17 @@ Response deleteWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Gets all Sentinel onboarding states. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Sentinel onboarding states. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsClient.java deleted file mode 100644 index df97d27b4605a..0000000000000 --- 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 cbf7109c8ebbc..0000000000000 --- 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 326b9eedc2e1d..7c8b95c16111d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java @@ -19,27 +19,27 @@ public interface ThreatIntelligenceIndicatorMetricsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 1e34a2b75f055..b8bcc35455e34 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java @@ -16,21 +16,6 @@ /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public interface ThreatIntelligenceIndicatorsClient { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -51,18 +36,19 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -81,23 +67,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -121,17 +102,23 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -148,6 +135,19 @@ Response createWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -191,16 +191,19 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -209,19 +212,16 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -230,17 +230,19 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -249,17 +251,15 @@ ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceTagsWithResponse( + ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsOperationsClient.java index bbb61deb6dee1..0b5fe047d34a7 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 80ba49f0d3be4..eb6ea4f652409 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 10b174e1207f9..65c90c3f5868a 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 ca6a6d8e19e0c..0000000000000 --- 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 be85a145cdd0a..88b429d8c6699 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 ee6d93cd9141e..0000000000000 --- 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 3a0bdc1ed428b..9787ed64ae969 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 22c53e70b3363..793c0838fdbb6 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 412a0c40b92e1..67708914e0847 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java @@ -18,6 +18,10 @@ public final class ActionRequestProperties extends ActionPropertiesBase { @JsonProperty(value = "triggerUri", required = true) private String triggerUri; + /** Creates an instance of ActionRequestProperties class. */ + public ActionRequestProperties() { + } + /** * Get the triggerUri property: Logic App Callback URL for this specific workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java index 3122bbedd575f..960532a3b3615 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 0661a17d64444..785b119c87b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java @@ -17,6 +17,10 @@ public final class ActionResponseProperties extends ActionPropertiesBase { @JsonProperty(value = "workflowId") private String workflowId; + /** Creates an instance of ActionResponseProperties class. */ + public ActionResponseProperties() { + } + /** * Get the workflowId property: The name of the logic app's workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java deleted file mode 100644 index e3017231f55dc..0000000000000 --- 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 f8483ae549dc3..0000000000000 --- 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 f3346f5f0a508..9daa6f9da9dd3 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 a3b8dba668999..991b853ffa116 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 1dbd5f5a9d027..0000000000000 --- 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 039d66c006749..f78270cddf6ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java @@ -103,6 +103,10 @@ public final class AnomalySecurityMLAnalyticsSettingsProperties { @JsonProperty(value = "settingsDefinitionId") private UUID settingsDefinitionId; + /** Creates an instance of AnomalySecurityMLAnalyticsSettingsProperties class. */ + public AnomalySecurityMLAnalyticsSettingsProperties() { + } + /** * Get the description property: The description of the SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java deleted file mode 100644 index 4e31c9709d7d4..0000000000000 --- 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 c7755a357b32f..0000000000000 --- 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 486d75131f913..51c71ec827fac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AscDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscDataConnectorProperties class. */ + public AscDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java index 1880bf1f167c8..0523e36cd73df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java @@ -23,6 +23,10 @@ public final class AutomationRuleInner extends ResourceWithEtag { @JsonProperty(value = "properties", required = true) private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); + /** Creates an instance of AutomationRuleInner class. */ + public AutomationRuleInner() { + } + /** * Get the innerProperties property: Automation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java index 7208c57ed3b71..85363dedd3808 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java @@ -64,6 +64,10 @@ public final class AutomationRuleProperties { @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo createdBy; + /** Creates an instance of AutomationRuleProperties class. */ + public AutomationRuleProperties() { + } + /** * Get the displayName property: The display name of the automation rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java index 49ef9cc2defa6..3f152b62a05d7 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 fb81e27a84570..0000000000000 --- 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 e73dcc2482d49..6fe113c9c158e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java @@ -23,6 +23,10 @@ public final class AzureResourceEntityProperties extends EntityCommonProperties @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; + /** Creates an instance of AzureResourceEntityProperties class. */ + public AzureResourceEntityProperties() { + } + /** * Get the resourceId property: The azure resource id of the resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java deleted file mode 100644 index 24e6c6ae3a874..0000000000000 --- 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 5d04c419ecc56..0c087a3a45511 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 44be7d59238af..fe7e5cbb2b8dd 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 3b8a4b7b7a4ee..0a73580c561b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java @@ -30,6 +30,10 @@ public final class CloudApplicationEntityProperties extends EntityCommonProperti @JsonProperty(value = "instanceName", access = JsonProperty.Access.WRITE_ONLY) private String instanceName; + /** Creates an instance of CloudApplicationEntityProperties class. */ + public CloudApplicationEntityProperties() { + } + /** * Get the appId property: The technical identifier of the application. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java deleted file mode 100644 index ec2fa5baa2728..0000000000000 --- 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 cfec062d16099..06be9daa98ff3 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 6fde14a69e47e..0000000000000 --- 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 5565c6456bf3b..b197548705d5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java @@ -36,6 +36,10 @@ public final class DnsEntityProperties extends EntityCommonProperties { @JsonProperty(value = "ipAddressEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List ipAddressEntityIds; + /** Creates an instance of DnsEntityProperties class. */ + public DnsEntityProperties() { + } + /** * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java deleted file mode 100644 index e88e1fce95ed4..0000000000000 --- 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 bde2773bc7c97..0000000000000 --- 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 17b9864df9bbb..0000000000000 --- 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 8fc05f9c066a9..0000000000000 --- 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 286aa9d87ccc6..0000000000000 --- 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 1526fff102b44..0000000000000 --- 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 0b2543093f8ee..0000000000000 --- 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 f829a29d3b07d..0000000000000 --- 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 f1bdc7049f0e0..0000000000000 --- 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 b0d7b460f1ae8..0000000000000 --- 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 14d25888dac98..0000000000000 --- 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 5f1ff9e9d6f58..0000000000000 --- 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 90e3adfec3d77..0000000000000 --- 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 7588902fa6034..9fc1d12ab5d5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java @@ -36,6 +36,10 @@ public final class FileEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) private String hostEntityId; + /** Creates an instance of FileEntityProperties class. */ + public FileEntityProperties() { + } + /** * Get the directory property: The full path to the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java index 8ebadc2878607..aeb52c51f490f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java @@ -24,6 +24,10 @@ public final class FileHashEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hashValue", access = JsonProperty.Access.WRITE_ONLY) private String hashValue; + /** Creates an instance of FileHashEntityProperties class. */ + public FileHashEntityProperties() { + } + /** * Get the algorithm property: The hash algorithm type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java deleted file mode 100644 index fe47f14b590cb..0000000000000 --- 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 1ae17de2e4938..0000000000000 --- 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 3ce589c95ac66..e9c7e2f543347 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 162717edb32f2..ebbb8cc52c5fd 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 d001a56c976d5..0000000000000 --- 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 16f6768461088..7e8f10cbaac04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java @@ -67,6 +67,10 @@ public final class HostEntityProperties extends EntityCommonProperties { @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) private String osVersion; + /** Creates an instance of HostEntityProperties class. */ + public HostEntityProperties() { + } + /** * Get the azureId property: The azure resource id of the VM. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java index 5be6c7dc4e9b8..52b6ecb245167 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java @@ -82,6 +82,10 @@ public final class HuntingBookmarkProperties extends EntityCommonProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /** Creates an instance of HuntingBookmarkProperties class. */ + public HuntingBookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java index 18459e1b4f138..c5e7f0834b7df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java @@ -19,6 +19,10 @@ public final class IncidentAlertListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentAlertListInner class. */ + public IncidentAlertListInner() { + } + /** * Get the value property: Array of incident alerts. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java index aa6aec92f5881..e313e259db7a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java @@ -19,6 +19,10 @@ public final class IncidentBookmarkListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentBookmarkListInner class. */ + public IncidentBookmarkListInner() { + } + /** * Get the value property: Array of incident bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java index 5bde60b473fa1..04ef33791fa86 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 6cc4d172a5e22..35379f0b4aa30 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 3f6dbe089b16e..2741408f9497c 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 7f44360a2ebdf..ce22cb92e7fda 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 5262e2c3ba589..76839ec2b3618 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 63643c5077a2a..0000000000000 --- 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 1917add910f9e..0000000000000 --- 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 971f9f13da46d..9a43bacbace52 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 fa6b07dd783f8..0a9b814b6a3c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java @@ -32,6 +32,10 @@ public final class IpEntityProperties extends EntityCommonProperties { @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) private List threatIntelligence; + /** Creates an instance of IpEntityProperties class. */ + public IpEntityProperties() { + } + /** * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java deleted file mode 100644 index 423fdf2974b65..0000000000000 --- 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 c048baca30533..0000000000000 --- 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 62c3cc3aec6a2..b523b9c536eb4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java @@ -103,6 +103,10 @@ public final class MailClusterEntityProperties extends EntityCommonProperties { @JsonProperty(value = "clusterGroup", access = JsonProperty.Access.WRITE_ONLY) private String clusterGroup; + /** Creates an instance of MailClusterEntityProperties class. */ + public MailClusterEntityProperties() { + } + /** * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java index e2d92d2606a64..9d3fb6ad8c86f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java @@ -168,6 +168,10 @@ public final class MailMessageEntityProperties extends EntityCommonProperties { @JsonProperty(value = "deliveryLocation") private DeliveryLocation deliveryLocation; + /** Creates an instance of MailMessageEntityProperties class. */ + public MailMessageEntityProperties() { + } + /** * Get the fileEntityIds property: The File entity ids of this mail message's attachments. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java index c0ec6c6fdaee8..efc2be76821be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java @@ -37,6 +37,10 @@ public final class MailboxEntityProperties extends EntityCommonProperties { @JsonProperty(value = "externalDirectoryObjectId", access = JsonProperty.Access.WRITE_ONLY) private UUID externalDirectoryObjectId; + /** Creates an instance of MailboxEntityProperties class. */ + public MailboxEntityProperties() { + } + /** * Get the mailboxPrimaryAddress property: The mailbox's primary address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java index ded00f33417f7..847174346dd7e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java @@ -36,6 +36,10 @@ public final class MalwareEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List processEntityIds; + /** Creates an instance of MalwareEntityProperties class. */ + public MalwareEntityProperties() { + } + /** * Get the category property: The malware category by the vendor, e.g. Trojan. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java deleted file mode 100644 index 529764ae709a0..0000000000000 --- 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 38068dd107827..ec62979cf3ca9 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 789441efbf971..0000000000000 --- 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 a1466e451fb02..014902f2a0521 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 index 25c3b51662426..ca46becac6cb8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java @@ -5,7 +5,6 @@ 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; @@ -25,6 +24,10 @@ public final class MetadataModelInner extends ResourceWithEtag { @JsonProperty(value = "properties") private MetadataProperties innerProperties; + /** Creates an instance of MetadataModelInner class. */ + public MetadataModelInner() { + } + /** * Get the innerProperties property: Metadata properties. * @@ -125,7 +128,7 @@ public MetadataModelInner withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.innerProperties() == null ? null : this.innerProperties().kind(); } @@ -135,7 +138,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataModelInner object itself. */ - public MetadataModelInner withKind(Kind kind) { + public MetadataModelInner withKind(String kind) { if (this.innerProperties() == null) { this.innerProperties = new MetadataProperties(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java index 3fed7e25da810..4616508662543 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataProperties.java @@ -6,7 +6,6 @@ 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; @@ -44,7 +43,7 @@ public final class MetadataProperties { * The kind of content the metadata is for. */ @JsonProperty(value = "kind", required = true) - private Kind kind; + private String kind; /* * Source of the content. This is where/how it was created. @@ -138,6 +137,10 @@ public final class MetadataProperties { @JsonProperty(value = "previewImagesDark") private List previewImagesDark; + /** Creates an instance of MetadataProperties class. */ + public MetadataProperties() { + } + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -213,7 +216,7 @@ public MetadataProperties withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.kind; } @@ -223,7 +226,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataProperties object itself. */ - public MetadataProperties withKind(Kind kind) { + public MetadataProperties withKind(String kind) { this.kind = kind; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java index 470f6f2cb6848..45161eabdde9a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataPropertiesPatch.java @@ -5,7 +5,6 @@ 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; @@ -43,7 +42,7 @@ public final class MetadataPropertiesPatch { * The kind of content the metadata is for. */ @JsonProperty(value = "kind") - private Kind kind; + private String kind; /* * Source of the content. This is where/how it was created. @@ -137,6 +136,10 @@ public final class MetadataPropertiesPatch { @JsonProperty(value = "previewImagesDark") private List previewImagesDark; + /** Creates an instance of MetadataPropertiesPatch class. */ + public MetadataPropertiesPatch() { + } + /** * Get the contentId property: Static ID for the content. Used to identify dependencies and content from solutions * or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the @@ -212,7 +215,7 @@ public MetadataPropertiesPatch withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.kind; } @@ -222,7 +225,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataPropertiesPatch object itself. */ - public MetadataPropertiesPatch withKind(Kind kind) { + public MetadataPropertiesPatch withKind(String kind) { this.kind = kind; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java index 6c482ad3565a9..70a8a6b6897e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java @@ -47,6 +47,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleProperties @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedUtc; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java index d5732a0625a07..c4532292646ec 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 6688b38be2fb1..0000000000000 --- 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 7bef9230fe38e..0000000000000 --- 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 68d2ff985a208..0000000000000 --- 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 2399f7dba1651..0000000000000 --- 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 810e29f8c3400..0000000000000 --- 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 2d2b3f5d67917..0000000000000 --- 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 97788b8fd862c..0000000000000 --- 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 e79cb5b7768f8..0000000000000 --- 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 86464533c6a1a..0000000000000 --- 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 7e6a246d93cb2..0000000000000 --- 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 9a64b134a987e..0000000000000 --- 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 e1ef2000626cc..0000000000000 --- 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 ef163ee8eda7d..0000000000000 --- 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 4b02a823625c2..382d87a6613e4 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 5ae6bc4079354..0000000000000 --- 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 c3e618acc5a32..0000000000000 --- 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 b64db3bd6270e..0000000000000 --- 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 4f19d046961e7..0000000000000 --- 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 ec5a4d2872bb9..b7fba78deacdc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java @@ -35,6 +35,10 @@ public final class OperationInner { @JsonProperty(value = "isDataAction") private Boolean isDataAction; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the display property: Properties of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java index b1dde67379389..655e1522bcbce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java @@ -67,6 +67,10 @@ public final class ProcessEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processId", access = JsonProperty.Access.WRITE_ONLY) private String processId; + /** Creates an instance of ProcessEntityProperties class. */ + public ProcessEntityProperties() { + } + /** * Get the accountEntityId property: The account entity id running the processes. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java index 405ab6789eafd..c8ab8e0f600c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java @@ -24,6 +24,10 @@ public final class RegistryKeyEntityProperties extends EntityCommonProperties { @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) private String key; + /** Creates an instance of RegistryKeyEntityProperties class. */ + public RegistryKeyEntityProperties() { + } + /** * Get the hive property: the hive that holds the registry key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java index a15af888fb1bd..a1db6026f23ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java @@ -37,6 +37,10 @@ public final class RegistryValueEntityProperties extends EntityCommonProperties @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY) private RegistryValueKind valueType; + /** Creates an instance of RegistryValueEntityProperties class. */ + public RegistryValueEntityProperties() { + } + /** * Get the keyEntityId property: The registry key entity id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java index 40a02c226353c..407ab2618c47f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java @@ -17,6 +17,10 @@ public final class RelationInner extends ResourceWithEtag { @JsonProperty(value = "properties") private RelationProperties innerProperties; + /** Creates an instance of RelationInner class. */ + public RelationInner() { + } + /** * Get the innerProperties property: Relation properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java index 99e3df52c8c14..d02e2734c093e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java @@ -35,6 +35,10 @@ public final class RelationProperties { @JsonProperty(value = "relatedResourceKind", access = JsonProperty.Access.WRITE_ONLY) private String relatedResourceKind; + /** Creates an instance of RelationProperties class. */ + public RelationProperties() { + } + /** * Get the relatedResourceId property: The resource ID of the related resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java deleted file mode 100644 index dff64861cae53..0000000000000 --- 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 98738e4e20290..39e7c5214fc6e 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 42be477852893..0751845d4d10f 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 21db1aca93e58..b1ec169a23da3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java @@ -171,6 +171,10 @@ public final class SecurityAlertProperties extends EntityCommonProperties { @JsonProperty(value = "resourceIdentifiers", access = JsonProperty.Access.WRITE_ONLY) private List resourceIdentifiers; + /** Creates an instance of SecurityAlertProperties class. */ + public SecurityAlertProperties() { + } + /** * Get the alertDisplayName property: The display name of the alert. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java index e6bf9c697c0ab..c7704c108f5cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java @@ -30,6 +30,10 @@ public final class SecurityGroupEntityProperties extends EntityCommonProperties @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) private String sid; + /** Creates an instance of SecurityGroupEntityProperties class. */ + public SecurityGroupEntityProperties() { + } + /** * Get the distinguishedName property: The group distinguished name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java index 8bf08cc6714d7..c6f751dfa6aa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Anomaly", value = AnomalySecurityMLAnalyticsSettings.class)}) @Fluent public class SecurityMLAnalyticsSettingInner extends ResourceWithEtag { + /** Creates an instance of SecurityMLAnalyticsSettingInner class. */ + public SecurityMLAnalyticsSettingInner() { + } + /** {@inheritDoc} */ @Override public SecurityMLAnalyticsSettingInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java index e46fd29c170a9..368b6dbbd3408 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java @@ -17,6 +17,10 @@ public final class SentinelOnboardingStateInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SentinelOnboardingStateProperties innerProperties; + /** Creates an instance of SentinelOnboardingStateInner class. */ + public SentinelOnboardingStateInner() { + } + /** * Get the innerProperties property: The Sentinel onboarding state object. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java index d1067a68a26d6..881aae69ba588 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java @@ -16,6 +16,10 @@ public final class SentinelOnboardingStateProperties { @JsonProperty(value = "customerManagedKey") private Boolean customerManagedKey; + /** Creates an instance of SentinelOnboardingStateProperties class. */ + public SentinelOnboardingStateProperties() { + } + /** * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java index 420eae2ca8575..aeef11eb5f718 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java @@ -18,6 +18,10 @@ public final class SentinelOnboardingStatesListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SentinelOnboardingStatesListInner class. */ + public SentinelOnboardingStatesListInner() { + } + /** * Get the value property: Array of Sentinel onboarding states. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java deleted file mode 100644 index bc77b021a5b58..0000000000000 --- 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 fe11570beafcd..0000000000000 --- 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 3d9c0096e645c..0000000000000 --- 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 c7b2417c0cdc4..0000000000000 --- 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 b676b6b710614..3aa288796faa6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java @@ -73,6 +73,10 @@ public final class SubmissionMailEntityProperties extends EntityCommonProperties @JsonProperty(value = "reportType", access = JsonProperty.Access.WRITE_ONLY) private String reportType; + /** Creates an instance of SubmissionMailEntityProperties class. */ + public SubmissionMailEntityProperties() { + } + /** * Get the networkMessageId property: The network message id of email to which submission belongs. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java deleted file mode 100644 index defd84d018052..0000000000000 --- 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 62d09af2a1b64..e43c3d1ba2ccc 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 9054e9c2939ed..0000000000000 --- 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 3118a288a38b0..0000000000000 --- 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 2cabad3ea7655..0000000000000 --- 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 94e3ad449679e..a0475d7a80671 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java @@ -187,6 +187,10 @@ public final class ThreatIntelligenceIndicatorProperties extends EntityCommonPro @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extensions; + /** Creates an instance of ThreatIntelligenceIndicatorProperties class. */ + public ThreatIntelligenceIndicatorProperties() { + } + /** * Get the threatIntelligenceTags property: List of tags. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java index 66c6f53009c56..5930206a39554 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) @Fluent public class ThreatIntelligenceInformationInner extends ResourceWithEtag { + /** Creates an instance of ThreatIntelligenceInformationInner class. */ + public ThreatIntelligenceInformationInner() { + } + /** {@inheritDoc} */ @Override public ThreatIntelligenceInformationInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java index fccc6810b44c3..94a545978b2e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java @@ -19,6 +19,10 @@ public final class ThreatIntelligenceMetricsListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceMetricsListInner class. */ + public ThreatIntelligenceMetricsListInner() { + } + /** * Get the value property: Array of threat intelligence metric fields (type/threat type/source). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java deleted file mode 100644 index e65e280aade23..0000000000000 --- 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 2faf94e2db69c..0000000000000 --- 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 9a9c6252b3951..0000000000000 --- 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 833855a5cdd74..7ccc954ce3ddb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java @@ -17,6 +17,10 @@ public final class UrlEntityProperties extends EntityCommonProperties { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; + /** Creates an instance of UrlEntityProperties class. */ + public UrlEntityProperties() { + } + /** * Get the url property: A full URL the entity points to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java index 14c1ca299bc28..afd1799b39322 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 e7424ae995450..1bf5568574fdc 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 b33026a9990e3..44c8f0d3bbdaa 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 97fa95571482c..e967da3c04398 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 7b08804507b76..a37fe904739ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsClientImpl.java @@ -58,7 +58,7 @@ public final class ActionsClientImpl implements ActionsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsActi") - private interface ActionsService { + public interface ActionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 09f8ea57b3331..f4284ef8eb34b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ActionsImpl.java @@ -41,15 +41,6 @@ public PagedIterable listByAlertRule( return Utils.mapPage(inner, inner1 -> new ActionResponseImpl(inner1, this.manager())); } - public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); - if (inner != null) { - return new ActionResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + public ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + ActionResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId, actionId); + if (inner != null) { + return new ActionResponseImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -74,6 +70,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, actionId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId, actionId); + } + public ActionResponse getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java index d017573675b91..5e88244d177c8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java @@ -55,7 +55,7 @@ public final class AlertRuleTemplatesClientImpl implements AlertRuleTemplatesCli */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRuleTemplatesService { + public interface AlertRuleTemplatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 e5bdc4bc9ffc0..a8a1e69eefb43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String wo return Utils.mapPage(inner, inner1 -> new AlertRuleTemplateImpl(inner1, this.manager())); } - public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { - AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); - if (inner != null) { - return new AlertRuleTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context) { Response inner = @@ -63,6 +54,15 @@ public Response getWithResponse( } } + public AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId) { + AlertRuleTemplateInner inner = this.serviceClient().get(resourceGroupName, workspaceName, alertRuleTemplateId); + if (inner != null) { + return new AlertRuleTemplateImpl(inner, this.manager()); + } else { + return null; + } + } + private AlertRuleTemplatesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java index e092a7beec6db..2d349aed1042d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesClientImpl.java @@ -58,7 +58,7 @@ public final class AlertRulesClientImpl implements AlertRulesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAler") - private interface AlertRulesService { + public interface AlertRulesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 4f4d06aa4fa96..02bf47b985216 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRulesImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceN return Utils.mapPage(inner, inner1 -> new AlertRuleImpl(inner1, this.manager())); } - public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { - AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); - if (inner != null) { - return new AlertRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, Context context) { Response inner = @@ -62,9 +53,8 @@ public Response getWithResponse( } } - public AlertRule createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { - AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + public AlertRule get(String resourceGroupName, String workspaceName, String ruleId) { + AlertRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleId); if (inner != null) { return new AlertRuleImpl(inner, this.manager()); } else { @@ -89,8 +79,14 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String ruleId) { - this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + public AlertRule createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule) { + AlertRuleInner inner = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, ruleId, alertRule); + if (inner != null) { + return new AlertRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -98,6 +94,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, ruleId, context); } + public void delete(String resourceGroupName, String workspaceName, String ruleId) { + this.serviceClient().delete(resourceGroupName, workspaceName, ruleId); + } + private AlertRulesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java index 68b5fbf010892..615c3d4348590 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesClientImpl.java @@ -58,7 +58,7 @@ public final class AutomationRulesClientImpl implements AutomationRulesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsAuto") - private interface AutomationRulesService { + public interface AutomationRulesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 90cf494caf3d7..4933ef8b33fcd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AutomationRulesImpl.java @@ -28,15 +28,6 @@ public AutomationRulesImpl( this.serviceManager = serviceManager; } - public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { - AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); - if (inner != null) { - return new AutomationRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { - return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + public AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId) { + AutomationRuleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, automationRuleId); + if (inner != null) { + return new AutomationRuleImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -61,6 +57,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, automationRuleId, context); } + public Object delete(String resourceGroupName, String workspaceName, String automationRuleId) { + return this.serviceClient().delete(resourceGroupName, workspaceName, automationRuleId); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new AutomationRuleImpl(inner1, this.manager())); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkExpandResponseImpl.java deleted file mode 100644 index b42e787c9a3f9..0000000000000 --- 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 58081823ee604..fa5e7b6fcbbb3 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 0e1ed907707da..0000000000000 --- 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 40b134363e7c8..0000000000000 --- 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 f2f214d54a937..0000000000000 --- 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 0c90dbec02922..0000000000000 --- 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 4dc36ed754b44..b60478aae8ce3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java @@ -58,7 +58,7 @@ public final class BookmarksClientImpl implements BookmarksClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarksService { + public interface BookmarksService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 e87053fd58141..bee3f246130b9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String workspaceNa return Utils.mapPage(inner, inner1 -> new BookmarkImpl(inner1, this.manager())); } - public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { - BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); - if (inner != null) { - return new BookmarkImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + public Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId) { + BookmarkInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId); + if (inner != null) { + return new BookmarkImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, context); } + public void delete(String resourceGroupName, String workspaceName, String bookmarkId) { + this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId); + } + public Bookmark getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorRequirementsStateImpl.java deleted file mode 100644 index 2543bc68e69cc..0000000000000 --- 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 b19d22164e896..0000000000000 --- 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 1c97eca6aff9c..0000000000000 --- 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 1a58d841aa80c..aea55e8c6ca25 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; @@ -60,7 +58,7 @@ public final class DataConnectorsClientImpl implements DataConnectorsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsService { + public interface DataConnectorsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 33b8c30d12472..6e1fa4b53fdfd 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 918c289e473c6..0000000000000 --- 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 be9939f6abc01..0000000000000 --- 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 4f643ea4b7176..0000000000000 --- 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 75885149ad4dc..0000000000000 --- 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 f9c1c922a5b44..0000000000000 --- 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 f2cffddbe5666..0000000000000 --- 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 79b119a109c9f..0000000000000 --- 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 6ce063fd52fef..0000000000000 --- 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 d1fbb7073274d..0000000000000 --- 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 328b7929d8aad..0000000000000 --- 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 bebd12d78d762..0000000000000 --- 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 ebe0040b31fce..0000000000000 --- 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 419788334c116..0000000000000 --- 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 cff5f927a8326..0000000000000 --- 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 66f6d4fb5322b..0000000000000 --- 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 aed9918b1c34e..0000000000000 --- 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 36db8654b8daf..0000000000000 --- 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 e60bfb3413bf6..0000000000000 --- 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 040dcb3be9b11..0000000000000 --- 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 a30ef2467eab2..0000000000000 --- 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 6521f11e7b259..0000000000000 --- 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 a6c7727374109..0000000000000 --- 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 370082d593758..0000000000000 --- 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 4b6a389586649..0000000000000 --- 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 05175bc230d31..0000000000000 --- 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 b1fdfd6e37423..0000000000000 --- 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 5c20f86fb9926..dd9f5c0406b83 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsClientImpl.java @@ -58,7 +58,7 @@ public final class IncidentCommentsClientImpl implements IncidentCommentsClient */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentCommentsService { + public interface IncidentCommentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 8092ca8833a54..61cc928437c56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentCommentsImpl.java @@ -50,17 +50,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentCommentImpl(inner1, this.manager())); } - public IncidentComment get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - IncidentCommentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); - if (inner != null) { - return new IncidentCommentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context) { Response inner = @@ -78,8 +67,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + public IncidentComment get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + IncidentCommentInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentCommentId); + if (inner != null) { + return new IncidentCommentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -89,6 +85,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentCommentId, context); } + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentCommentId); + } + public IncidentComment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentEntitiesResponseImpl.java index 317c6b5ed21f1..8fc58b9f65b48 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 d9c3946392275..347e885b87077 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 408f9e893f0fb..0000000000000 --- 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 2087692a0fbfe..47d861a0cd4b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentRelationsClientImpl.java @@ -58,7 +58,7 @@ public final class IncidentRelationsClientImpl implements IncidentRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentRelationsService { + public interface IncidentRelationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 ae14e641b851e..526606bd3fed8 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 a07638efa7789..fa55ff0476f3f 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. */ @@ -65,25 +62,7 @@ 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); - + public interface IncidentsService { @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 a49e1a802a76c..e220f57b97c25 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 cfcbc8e039f65..0000000000000 --- 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 7afbd00545ef2..0000000000000 --- 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 index 268664bb18db8..71f15db33cea7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadataModelImpl.java @@ -7,7 +7,6 @@ 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; @@ -56,7 +55,7 @@ public String version() { return this.innerModel().version(); } - public Kind kind() { + public String kind() { return this.innerModel().kind(); } @@ -253,13 +252,8 @@ public MetadataModel refresh(Context context) { } public MetadataModelImpl withEtag(String etag) { - if (isInCreateMode()) { - this.innerModel().withEtag(etag); - return this; - } else { - this.updateMetadataPatch.withEtag(etag); - return this; - } + this.innerModel().withEtag(etag); + return this; } public MetadataModelImpl withContentId(String contentId) { @@ -292,7 +286,7 @@ public MetadataModelImpl withVersion(String version) { } } - public MetadataModelImpl withKind(Kind kind) { + public MetadataModelImpl withKind(String kind) { if (isInCreateMode()) { this.innerModel().withKind(kind); return this; diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java index c99b2cc76eaf1..ef5e945d421ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasClientImpl.java @@ -60,7 +60,7 @@ public final class MetadatasClientImpl implements MetadatasClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsMeta") - private interface MetadatasService { + public interface MetadatasService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -541,14 +541,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. + * @return a Metadata along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { - return getAsync(resourceGroupName, workspaceName, metadataName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); } /** @@ -557,16 +559,14 @@ public MetadataModelInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. + * @return a Metadata. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); + public MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName) { + return getWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE).getValue(); } /** @@ -695,13 +695,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - deleteAsync(resourceGroupName, workspaceName, metadataName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); } /** @@ -710,16 +713,13 @@ public void delete(String resourceGroupName, String workspaceName, String metada * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, metadataName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String metadataName) { + deleteWithResponse(resourceGroupName, workspaceName, metadataName, Context.NONE); } /** @@ -870,15 +870,20 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadata Metadata resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. + * @return metadata resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { - return createAsync(resourceGroupName, workspaceName, metadataName, metadata).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String metadataName, + MetadataModelInner metadata, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); } /** @@ -888,20 +893,15 @@ public MetadataModelInner create( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadata Metadata resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. + * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataModelInner metadata, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadata, context).block(); + public MetadataModelInner create( + String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata) { + return createWithResponse(resourceGroupName, workspaceName, metadataName, metadata, Context.NONE).getValue(); } /** @@ -1052,15 +1052,20 @@ private Mono updateAsync( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadataPatch Partial metadata request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. + * @return metadata resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { - return updateAsync(resourceGroupName, workspaceName, metadataName, metadataPatch).block(); + public Response updateWithResponse( + String resourceGroupName, + String workspaceName, + String metadataName, + MetadataPatch metadataPatch, + Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); } /** @@ -1070,20 +1075,16 @@ public MetadataModelInner update( * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. * @param metadataPatch Partial metadata request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition along with {@link Response}. + * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String workspaceName, - String metadataName, - MetadataPatch metadataPatch, - Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, metadataName, metadataPatch, context).block(); + public MetadataModelInner update( + String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch) { + return updateWithResponse(resourceGroupName, workspaceName, metadataName, metadataPatch, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java index fb795703dad24..3cc27196f79a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/MetadatasImpl.java @@ -46,15 +46,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new MetadataModelImpl(inner1, this.manager())); } - public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { - MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); - if (inner != null) { - return new MetadataModelImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context) { Response inner = @@ -70,8 +61,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String metadataName) { - this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); + public MetadataModel get(String resourceGroupName, String workspaceName, String metadataName) { + MetadataModelInner inner = this.serviceClient().get(resourceGroupName, workspaceName, metadataName); + if (inner != null) { + return new MetadataModelImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -79,6 +75,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, metadataName, context); } + public void delete(String resourceGroupName, String workspaceName, String metadataName) { + this.serviceClient().delete(resourceGroupName, workspaceName, metadataName); + } + public MetadataModel getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentImpl.java deleted file mode 100644 index 3ea1193ca8e66..0000000000000 --- 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 fd9d8a21ca81d..0000000000000 --- 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 3f6213360a58d..0000000000000 --- 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/OperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java index 42c9980bb42d5..bb5c8b75a44d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsOper") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.SecurityInsights/operations") @ExpectedResponses({200}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java deleted file mode 100644 index 5a8f6c3d0f229..0000000000000 --- 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 5596bd0f4aa9a..0000000000000 --- 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 16262d97eb12b..3a3a7a0aab0b1 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 fc0358a24f1d9..0000000000000 --- 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 86963e3bc62a9..9fa3acc24d95a 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,16 @@ 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 +173,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 +185,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. */ @@ -381,18 +245,6 @@ 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 +269,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 +329,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 +363,24 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; + this.apiVersion = "2023-02-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 2cd5970544403..7b3b07173b664 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsClientImpl.java @@ -60,7 +60,7 @@ public final class SecurityMLAnalyticsSettingsClientImpl implements SecurityMLAn */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSecu") - private interface SecurityMLAnalyticsSettingsService { + public interface SecurityMLAnalyticsSettingsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 f0d4218f31a30..3404cd1a75ebd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityMLAnalyticsSettingsImpl.java @@ -41,16 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new SecurityMLAnalyticsSettingImpl(inner1, this.manager())); } - public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { - SecurityMLAnalyticsSettingInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); - if (inner != null) { - return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, Context context) { Response inner = @@ -66,15 +56,9 @@ public Response getWithResponse( } } - public SecurityMLAnalyticsSetting createOrUpdate( - String resourceGroupName, - String workspaceName, - String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + public SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName) { SecurityMLAnalyticsSettingInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + this.serviceClient().get(resourceGroupName, workspaceName, settingsResourceName); if (inner != null) { return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); } else { @@ -104,8 +88,20 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + public SecurityMLAnalyticsSetting createOrUpdate( + String resourceGroupName, + String workspaceName, + String settingsResourceName, + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting) { + SecurityMLAnalyticsSettingInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, settingsResourceName, securityMLAnalyticsSetting); + if (inner != null) { + return new SecurityMLAnalyticsSettingImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -113,6 +109,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsResourceName, context); } + public void delete(String resourceGroupName, String workspaceName, String settingsResourceName) { + this.serviceClient().delete(resourceGroupName, workspaceName, settingsResourceName); + } + private SecurityMLAnalyticsSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java index 9035d0d85eefc..2cd6c74e2eb7f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesClientImpl.java @@ -55,7 +55,7 @@ public final class SentinelOnboardingStatesClientImpl implements SentinelOnboard */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSent") - private interface SentinelOnboardingStatesService { + public interface SentinelOnboardingStatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 805ce3714bf1e..807a52a88f80c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SentinelOnboardingStatesImpl.java @@ -29,17 +29,6 @@ public SentinelOnboardingStatesImpl( this.serviceManager = serviceManager; } - public SentinelOnboardingState get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - SentinelOnboardingStateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); - if (inner != null) { - return new SentinelOnboardingStateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context) { Response inner = @@ -57,8 +46,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { - this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); + public SentinelOnboardingState get( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + SentinelOnboardingStateInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, sentinelOnboardingStateName); + if (inner != null) { + return new SentinelOnboardingStateImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -68,13 +64,8 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, sentinelOnboardingStateName, context); } - public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { - SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SentinelOnboardingStatesListImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName) { + this.serviceClient().delete(resourceGroupName, workspaceName, sentinelOnboardingStateName); } public Response listWithResponse( @@ -92,6 +83,15 @@ public Response listWithResponse( } } + public SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName) { + SentinelOnboardingStatesListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new SentinelOnboardingStatesListImpl(inner, this.manager()); + } else { + return null; + } + } + public SentinelOnboardingState getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SettingListImpl.java deleted file mode 100644 index d42aef74defe5..0000000000000 --- 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 e54bfa38cc021..0000000000000 --- 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 8923bdc0d8b35..0000000000000 --- 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 7d0d20b95466e..0000000000000 --- 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 bb8376e2af853..0000000000000 --- 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 154c48e0138ad..0000000000000 --- 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 467e637cf289d..0000000000000 --- 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 4193894c5c114..0000000000000 --- 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 246f25d1030c8..5adb0907e7343 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsClientImpl.java @@ -56,7 +56,7 @@ public final class ThreatIntelligenceIndicatorMetricsClientImpl implements Threa */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorMetricsService { + public interface ThreatIntelligenceIndicatorMetricsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 a89b3041bc583..b47abd6de5d07 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorMetricsImpl.java @@ -27,15 +27,6 @@ public ThreatIntelligenceIndicatorMetricsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { - ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response listWithResponse( } } + public ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName) { + ThreatIntelligenceMetricsListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new ThreatIntelligenceMetricsListImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorMetricsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java index c25005bfa019e..fa73b7c32aa22 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsClientImpl.java @@ -64,7 +64,7 @@ public final class ThreatIntelligenceIndicatorsClientImpl implements ThreatIntel */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsService { + public interface ThreatIntelligenceIndicatorsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 ad629fc04fc95..e1dbd4b46918b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsImpl.java @@ -31,17 +31,6 @@ public ThreatIntelligenceIndicatorsImpl( this.serviceManager = serviceManager; } - public ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response createIndicatorWithResponse( String resourceGroupName, String workspaceName, @@ -62,8 +51,10 @@ public Response createIndicatorWithResponse( } } - public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { - ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().createIndicator(resourceGroupName, workspaceName, threatIntelligenceProperties); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -86,13 +77,8 @@ public Response getWithResponse( } } - public ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + public ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name) { + ThreatIntelligenceInformationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); if (inner != null) { return new ThreatIntelligenceInformationImpl(inner, this.manager()); } else { @@ -121,8 +107,18 @@ public Response createWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); + public ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().create(resourceGroupName, workspaceName, name, threatIntelligenceProperties); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -130,6 +126,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + public PagedIterable queryIndicators( String resourceGroupName, String workspaceName, @@ -151,14 +151,6 @@ public PagedIterable queryIndicators( return Utils.mapPage(inner, inner1 -> new ThreatIntelligenceInformationImpl(inner1, this.manager())); } - public void appendTags( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { - this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); - } - public Response appendTagsWithResponse( String resourceGroupName, String workspaceName, @@ -170,18 +162,12 @@ public Response appendTagsWithResponse( .appendTagsWithResponse(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags, context); } - public ThreatIntelligenceInformation replaceTags( + public void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { - ThreatIntelligenceInformationInner inner = - this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); - if (inner != null) { - return new ThreatIntelligenceInformationImpl(inner, this.manager()); - } else { - return null; - } + ThreatIntelligenceAppendTags threatIntelligenceAppendTags) { + this.serviceClient().appendTags(resourceGroupName, workspaceName, name, threatIntelligenceAppendTags); } public Response replaceTagsWithResponse( @@ -206,6 +192,20 @@ public Response replaceTagsWithResponse( } } + public ThreatIntelligenceInformation replaceTags( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags) { + ThreatIntelligenceInformationInner inner = + this.serviceClient().replaceTags(resourceGroupName, workspaceName, name, threatIntelligenceReplaceTags); + if (inner != null) { + return new ThreatIntelligenceInformationImpl(inner, this.manager()); + } else { + return null; + } + } + private ThreatIntelligenceIndicatorsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java index ac5099ba79a9b..443cfc23997d4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ThreatIntelligenceIndicatorsOperationsClientImpl.java @@ -63,7 +63,7 @@ public final class ThreatIntelligenceIndicatorsOperationsClientImpl */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsThre") - private interface ThreatIntelligenceIndicatorsOperationsService { + public interface ThreatIntelligenceIndicatorsOperationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 df68b9a281d2b..85146cfb466c0 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 ba1748990562c..de254ef21b71d 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 4b5b6d0486c83..3f0b8d50c6d27 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 0257b61bfb203..be89928459eb6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java @@ -58,7 +58,7 @@ public final class WatchlistItemsClientImpl implements WatchlistItemsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistItemsService { + public interface WatchlistItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 fc1cb65f09173..68ce318460108 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java @@ -41,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } - public WatchlistItem get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - WatchlistItemInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - if (inner != null) { - return new WatchlistItemImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, @@ -73,8 +62,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + public WatchlistItem get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + WatchlistItemInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + if (inner != null) { + return new WatchlistItemImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -88,6 +84,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + } + public WatchlistItem getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java index 56e2704b12520..a53f208db860e 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. */ @@ -60,7 +58,7 @@ public final class WatchlistsClientImpl implements WatchlistsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsWatc") - private interface WatchlistsService { + public interface WatchlistsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -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 139a0477f33ff..32f2893a57265 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 bf95fed22e284..0000000000000 --- 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 2c2d4b0f24aae..99ced6ed3cabd 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 45cdb56dc88a0..0000000000000 --- 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 25261e2030c44..c0750bbf489b2 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 d662cdb888ec1..20e2ae896d10f 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 385e767940bd0..17fc2338ded89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java @@ -18,6 +18,10 @@ public class ActionPropertiesBase { @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; + /** Creates an instance of ActionPropertiesBase class. */ + public ActionPropertiesBase() { + } + /** * Get the logicAppResourceId property: Logic App Resource Id, * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java index ccc8692cff412..036949c4ad3cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java @@ -17,6 +17,10 @@ public final class ActionRequest extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionRequestProperties innerProperties; + /** Creates an instance of ActionRequest class. */ + public ActionRequest() { + } + /** * Get the innerProperties property: Action properties for put request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionResponse.java index 3540eefe0690d..945eb10973af9 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/ActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java index 9e8ad565443d0..135ad0df89da0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java @@ -16,6 +16,15 @@ public final class ActionType extends ExpandableStringEnum { /** Static value RunPlaybook for ActionType. */ public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java index 97de0d03303b9..45591fc7f1eea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java @@ -45,12 +45,14 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ - ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Gets the action of alert rule. @@ -59,14 +61,12 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Delete the action of alert rule. @@ -75,11 +75,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Delete the action of alert rule. @@ -88,14 +91,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Gets the action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java index 4f7ecdd353b97..f9dd5b49803f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java @@ -25,6 +25,10 @@ public final class ActionsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ActionsList class. */ + public ActionsList() { + } + /** * Get the nextLink property: URL to fetch the next set of actions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java deleted file mode 100644 index e010a8c88c2a2..0000000000000 --- 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 610d4eff8d46c..0000000000000 --- 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 7aadce92dcd42..0000000000000 --- 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 9066b404574c7..0000000000000 --- 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 9a85f95ebfa31..0000000000000 --- 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 1e6b52c71395b..0000000000000 --- 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/AlertDetail.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java index eff4838eabd8a..ea2e48ddf3bfc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java @@ -16,6 +16,15 @@ public final class AlertDetail extends ExpandableStringEnum { /** Static value Severity for AlertDetail. */ public static final AlertDetail SEVERITY = fromString("Severity"); + /** + * Creates a new instance of AlertDetail value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertDetail() { + } + /** * Creates or finds a AlertDetail from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java index 6abe8f54b47d1..5b2396d7cfe19 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 fb0c0d7f86b20..16ea478199862 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,14 +20,14 @@ 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 a new instance of AlertRuleKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertRuleKind() { + } /** * Creates or finds a AlertRuleKind from its string representation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java index a8705467713ba..483e3438ebf5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java @@ -23,6 +23,10 @@ public final class AlertRuleTemplateDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of AlertRuleTemplateDataSource class. */ + public AlertRuleTemplateDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java deleted file mode 100644 index 9ec04325df71e..0000000000000 --- 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 7ab1567de6d34..0000000000000 --- 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 6c1e23964aae5..f1d562c1c4873 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java @@ -41,12 +41,14 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ - AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -54,12 +56,10 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java index 8292bf9e38523..b6aa4aa014af3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java @@ -25,6 +25,10 @@ public final class AlertRuleTemplatesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRuleTemplatesList class. */ + public AlertRuleTemplatesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rule templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java index 4ce770f0de661..22b64b10d08d8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java @@ -42,12 +42,13 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ - AlertRule get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -55,13 +56,12 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRule get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -70,12 +70,14 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ - AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -84,14 +86,12 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -99,11 +99,13 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -111,11 +113,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java index c758bd659a27d..8867147572886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java @@ -25,6 +25,10 @@ public final class AlertRulesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRulesList class. */ + public AlertRulesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java index 4c140f2d9b58f..99ce3377a2898 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java @@ -22,6 +22,15 @@ public final class AlertSeverity extends ExpandableStringEnum { /** Static value Informational for AlertSeverity. */ public static final AlertSeverity INFORMATIONAL = fromString("Informational"); + /** + * Creates a new instance of AlertSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertSeverity() { + } + /** * Creates or finds a AlertSeverity from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java index db728892d6f14..114b2eb8140ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java @@ -25,6 +25,15 @@ public final class AlertStatus extends ExpandableStringEnum { /** Static value InProgress for AlertStatus. */ public static final AlertStatus IN_PROGRESS = fromString("InProgress"); + /** + * Creates a new instance of AlertStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertStatus() { + } + /** * Creates or finds a AlertStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java index 2b9ea1a543786..414a070742409 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 a06d6aea90181..0000000000000 --- 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 3a67f21d0c143..73454b1a181d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java @@ -26,6 +26,10 @@ public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalytic @JsonProperty(value = "properties") private AnomalySecurityMLAnalyticsSettingsProperties innerProperties; + /** Creates an instance of AnomalySecurityMLAnalyticsSettings class. */ + public AnomalySecurityMLAnalyticsSettings() { + } + /** * Get the innerProperties property: Anomaly Security ML Analytics Settings properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java deleted file mode 100644 index 28ec81da3af04..0000000000000 --- 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/AntispamMailDirection.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java index a6c58a1e05958..cfacebd058b59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java @@ -22,6 +22,15 @@ public final class AntispamMailDirection extends ExpandableStringEnum { /** Static value InhibitResponseFunction for AttackTactic. */ public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); + /** + * Creates a new instance of AttackTactic value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AttackTactic() { + } + /** * Creates or finds a AttackTactic from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java index 3ff1bf1a59fef..c95dd2247b4b9 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 0eee30498e7ca..0000000000000 --- 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 a703cfcce4e48..0000000000000 --- 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 fbd2b4bcaef28..1006728860501 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 @@ -17,14 +17,16 @@ 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) }) @Immutable public class AutomationRuleCondition { + /** Creates an instance of AutomationRuleCondition class. */ + public AutomationRuleCondition() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java index 0f56b3772f369..7671608ffc48e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAc @JsonProperty(value = "actionConfiguration") private IncidentPropertiesAction actionConfiguration; + /** Creates an instance of AutomationRuleModifyPropertiesAction class. */ + public AutomationRuleModifyPropertiesAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java index 6b0b8389178c2..39d781c8e0341 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedArrayType /** Static value Comments for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType COMMENTS = fromString("Comments"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedArrayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedArrayType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedArrayType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java index 1d0e540202903..a1376bb28fb20 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java @@ -14,6 +14,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedChangeTyp /** Static value Added for AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedChangeType ADDED = fromString("Added"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedChangeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedChangeType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedChangeType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java index 33ee0d2d5aee9..36b6f40f659b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java @@ -22,6 +22,10 @@ public final class AutomationRulePropertyArrayChangedValuesCondition { @JsonProperty(value = "changeType") private AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType; + /** Creates an instance of AutomationRulePropertyArrayChangedValuesCondition class. */ + public AutomationRulePropertyArrayChangedValuesCondition() { + } + /** * Get the arrayType property: The arrayType property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java deleted file mode 100644 index 670c64ea59367..0000000000000 --- 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 af5e23b9d813d..0000000000000 --- 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 40158ab460bc9..0000000000000 --- 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 index 1ca0b71450304..1ef6316561616 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java @@ -18,6 +18,15 @@ public final class AutomationRulePropertyChangedConditionSupportedChangedType /** Static value ChangedTo for AutomationRulePropertyChangedConditionSupportedChangedType. */ public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_TO = fromString("ChangedTo"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedChangedType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedChangedType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedChangedType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java index 7f7b6618b8416..4ec99c10a8261 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyChangedConditionSupportedPropertyType public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_OWNER = fromString("IncidentOwner"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedPropertyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedPropertyType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedPropertyType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java index ae9a8ff2891df..8f52fa3333600 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java @@ -35,6 +35,15 @@ public final class AutomationRulePropertyConditionSupportedOperator /** Static value NotEndsWith for AutomationRulePropertyConditionSupportedOperator. */ public static final AutomationRulePropertyConditionSupportedOperator NOT_ENDS_WITH = fromString("NotEndsWith"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedOperator() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedOperator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java index 72af96f863db6..38c8a5ca6cbe2 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 @@ -44,14 +44,6 @@ public final class 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"); @@ -220,6 +212,15 @@ public final class AutomationRulePropertyConditionSupportedProperty /** Static value Url for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty URL = fromString("Url"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedProperty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedProperty() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedProperty from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java index 9996382f4bddf..ff5cf10eefd44 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java @@ -35,6 +35,10 @@ public final class AutomationRulePropertyValuesChangedCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesChangedCondition class. */ + public AutomationRulePropertyValuesChangedCondition() { + } + /** * Get the propertyName property: The propertyName property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java index d04dd33f2854a..c6401d78b6c70 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java @@ -29,6 +29,10 @@ public final class AutomationRulePropertyValuesCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesCondition class. */ + public AutomationRulePropertyValuesCondition() { + } + /** * Get the propertyName property: The property to evaluate in an automation rule property condition. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index f2b367315f617..a8f694f9859cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction @JsonProperty(value = "actionConfiguration") private PlaybookActionProperties actionConfiguration; + /** Creates an instance of AutomationRuleRunPlaybookAction class. */ + public AutomationRuleRunPlaybookAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java index 066a10e1830ec..a2bd9c35c4593 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java @@ -43,6 +43,10 @@ public final class AutomationRuleTriggeringLogic { @JsonProperty(value = "conditions") private List conditions; + /** Creates an instance of AutomationRuleTriggeringLogic class. */ + public AutomationRuleTriggeringLogic() { + } + /** * Get the isEnabled property: Determines whether the automation rule is enabled or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java index 157bf09eeafd3..5a3125430eb84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java @@ -16,12 +16,14 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Gets the automation rule. @@ -29,14 +31,12 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -44,12 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Delete the automation rule. @@ -57,14 +59,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Gets all automation rules. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java index ca0dc3474b774..272b819532b79 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java @@ -24,6 +24,10 @@ public final class AutomationRulesList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AutomationRulesList class. */ + public AutomationRulesList() { + } + /** * Get the value property: The value property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java deleted file mode 100644 index 30665983543bf..0000000000000 --- 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 4943056eabbf3..0000000000000 --- 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 047f80cbc5a1a..0000000000000 --- 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 85fed62b4c137..bd6fabfc5678a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java @@ -22,6 +22,10 @@ public final class AwsCloudTrailDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsCloudTrailDataConnectorProperties innerProperties; + /** Creates an instance of AwsCloudTrailDataConnector class. */ + public AwsCloudTrailDataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services CloudTrail data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java index 019e54161be6d..25aa4f6f62011 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 f11d9c72a1d9f..bb73c9450fe57 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsCloudTrailDataConnectorDataTypesLogs class. */ + public AwsCloudTrailDataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsCloudTrailDataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java deleted file mode 100644 index ddfb6f7d40c15..0000000000000 --- 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 3739b6ccb5232..0000000000000 --- 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 14c7a6754785f..0000000000000 --- 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 dd24d8ad6de34..0000000000000 --- 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 4c8ea02124614..0000000000000 --- 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 64b4871d5cf41..2b51e84ec5218 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 bfdfb6f62b95f..c798de30db519 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 b46a2d88c95d1..0000000000000 --- 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 ea70e05214484..0000000000000 --- 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 0df634388d5ee..0000000000000 --- 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 b9b48339a131c..0000000000000 --- 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 f89890b19242f..99216fdd65806 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 cf54322f2c78d..0000000000000 --- 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 e1db491640d0e..0000000000000 --- 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 bfad411f1ce64..0000000000000 --- 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 3b3706f36fd81..844d404d48478 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java @@ -41,12 +41,14 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ - Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -54,14 +56,12 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Delete the bookmark. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); /** * Gets a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java deleted file mode 100644 index be26717140de0..0000000000000 --- 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 9d6d5e61b586f..df99e16b4d4af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java @@ -35,6 +35,10 @@ public final class ClientInfo { @JsonProperty(value = "userPrincipalName") private String userPrincipalName; + /** Creates an instance of ClientInfo class. */ + public ClientInfo() { + } + /** * Get the email property: The email of the client. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java index 2d0908e927daf..c6f4e9ef38fc4 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 396d69282da38..0000000000000 --- 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 a9a781b14c946..0000000000000 --- 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 b1040c30de779..0000000000000 --- 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 a0d01a5af717c..0000000000000 --- 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 cf4d6e8754b98..0000000000000 --- 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 561f409ee82f6..0000000000000 --- 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 bf0ae2f7d8b44..0000000000000 --- 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 c57fe3ddde438..0000000000000 --- 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 1f9a8f78eb43e..0000000000000 --- 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 80ff447db0ad5..0000000000000 --- 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 187727984833d..0000000000000 --- 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 288bd8d550f89..0000000000000 --- 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 06cd156687bbc..0000000000000 --- 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 2e471ac418a27..72b342810ff69 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,17 +13,20 @@ 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 a new instance of ConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConditionType() { + } /** * Creates or finds a ConditionType from its string representation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java index 7e6818923a420..7613f93e6a8e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java @@ -19,6 +19,15 @@ public final class ConfidenceLevel extends ExpandableStringEnum /** Static value High for ConfidenceLevel. */ public static final ConfidenceLevel HIGH = fromString("High"); + /** + * Creates a new instance of ConfidenceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidenceLevel() { + } + /** * Creates or finds a ConfidenceLevel from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java index 1f8966323364a..aa7a871a1503c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java @@ -25,6 +25,15 @@ public final class ConfidenceScoreStatus extends ExpandableStringEnum { - /** Static value 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 655facb3559ae..0000000000000 --- 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 da5f0724d4220..0000000000000 --- 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 d3298e56cbd90..0000000000000 --- 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 c710b1b251e26..0000000000000 --- 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 32293661fa1d8..0000000000000 --- 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 55e4aa0cd259c..0000000000000 --- 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 d9976250f875b..0000000000000 --- 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 76169a7542b08..0000000000000 --- 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 b0e8395c6c5ff..0000000000000 --- 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 9507f46b98de6..0000000000000 --- 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 a7ade225346bd..0000000000000 --- 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 52380b5cedc23..0000000000000 --- 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 331014e42fa0e..0000000000000 --- 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 936cd58c91149..36cf764ef9b52 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 b140a12dfff79..f80b3bbc2a9c5 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 623d64d420bd0..1b61de6441a50 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 96aa7a63791f4..0000000000000 --- 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 36d4914ce98b3..0000000000000 --- 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 e0bbbf5d03346..93fbfed69f7b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java @@ -16,6 +16,10 @@ public class DataConnectorWithAlertsProperties { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of DataConnectorWithAlertsProperties class. */ + public DataConnectorWithAlertsProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java index f80628152117b..36a1a1df46a6d 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 57317f6ffc3c3..0000000000000 --- 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 6524d59b35155..0000000000000 --- 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 419ceca405400..0000000000000 --- 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/DataTypeState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java index f0851844c733a..e84f1e9d4f61d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java @@ -16,6 +16,15 @@ public final class DataTypeState extends ExpandableStringEnum { /** Static value Disabled for DataTypeState. */ public static final DataTypeState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of DataTypeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataTypeState() { + } + /** * Creates or finds a DataTypeState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java deleted file mode 100644 index f0501a0e1fbcb..0000000000000 --- 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 f500a22a553ec..0000000000000 --- 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 0cfc63e3b5a8a..0000000000000 --- 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 6f8b486f4c2ea..0000000000000 --- 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 b9bc8016e8c49..0000000000000 --- 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 770b490ee8bce..0000000000000 --- 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 2a78da582b0bb..0000000000000 --- 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 ed3969162e660..e54f9356482bb 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 56380b6e2f98c..0000000000000 --- 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 eaa3c125f5675..0000000000000 --- 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 653d886600c33..0000000000000 --- 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 0df0a2723965f..0000000000000 --- 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 d1ed289fd67c8..0000000000000 --- 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 5b903538b5db7..0000000000000 --- 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 d75c0f24e472b..0000000000000 --- 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 869d7a774b30f..0000000000000 --- 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 7a22dff870a65..0000000000000 --- 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 545f2a28b66bb..0000000000000 --- 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 d8b2e8ec59256..0000000000000 --- 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 182172f2a926e..0000000000000 --- 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 29a184b1bde33..0000000000000 --- 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 aa1daf59c56e6..0000000000000 --- 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 664d22e8eae5a..244061308706c 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 7ebdadd6fc3c6..0000000000000 --- 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 49d3c8f895a19..5252752f3fb19 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java @@ -26,6 +26,10 @@ public class EntityCommonProperties { @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; + /** Creates an instance of EntityCommonProperties class. */ + public EntityCommonProperties() { + } + /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java deleted file mode 100644 index e925912285ebb..0000000000000 --- 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 8d0d6ec6ebdcf..0000000000000 --- 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 fb8e3981d5343..0000000000000 --- 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 f8558de18c341..0000000000000 --- 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 0d26828407936..0000000000000 --- 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 04a3e0d4c5303..0000000000000 --- 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 dbb22861ff01a..0000000000000 --- 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 15d19b7473a95..0000000000000 --- 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 e04c157d5dc66..0000000000000 --- 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 3759170c00e3b..0000000000000 --- 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 5968f17a56cde..0000000000000 --- 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 0000000000000..0013048923871 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityKindEnum.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.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 a new instance of EntityKindEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityKindEnum() { + } + + /** + * Creates or finds a EntityKindEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding EntityKindEnum. + */ + @JsonCreator + public static EntityKindEnum fromString(String name) { + return fromString(name, EntityKindEnum.class); + } + + /** + * Gets known EntityKindEnum values. + * + * @return known EntityKindEnum values. + */ + public static Collection values() { + return values(EntityKindEnum.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java deleted file mode 100644 index 0e160998fea52..0000000000000 --- 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 b5081a9937a3f..f0fb60fa302b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java @@ -23,6 +23,10 @@ public final class EntityMapping { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of EntityMapping class. */ + public EntityMapping() { + } + /** * Get the entityType property: The V3 type of the mapped entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java index 5d33cc2b87a47..449a0fa75e2a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java @@ -64,6 +64,15 @@ public final class EntityMappingType extends ExpandableStringEnum { - /** Static value 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 d0f22a8e74b05..0000000000000 --- 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 9af86d0f151c2..0000000000000 --- 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 3b7459c1f2130..0000000000000 --- 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 edd51be3360f7..0000000000000 --- 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 b1a3ce1e859b8..0000000000000 --- 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 f5b1c79889452..0000000000000 --- 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 537821cbebab0..0000000000000 --- 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 28db9eb064609..0000000000000 --- 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 cb8a8e6b155e2..0000000000000 --- 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 21ce0db46791c..0000000000000 --- 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 a767e8fea94d3..0000000000000 --- 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 4bddc9d19d913..0000000000000 --- 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 28d08ca8e2716..0000000000000 --- 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 fff8bc9123109..0000000000000 --- 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 e5a502f1acfb8..0000000000000 --- 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 5f024f5132c63..0000000000000 --- 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 f06f9e561d6b5..0000000000000 --- 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 e18fee517f1d3..0000000000000 --- 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/EventGroupingAggregationKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java index 8849d5c4a7b91..6e0980e896b95 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java @@ -16,6 +16,15 @@ public final class EventGroupingAggregationKind extends ExpandableStringEnum 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 a3620d7458fc3..0000000000000 --- 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 79231d5f4fcde..0000000000000 --- 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 05d0db1cba993..0000000000000 --- 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 d01e4fca5f25b..218cfb57f5d25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java @@ -22,6 +22,10 @@ public final class FieldMapping { @JsonProperty(value = "columnName") private String columnName; + /** Creates an instance of FieldMapping class. */ + public FieldMapping() { + } + /** * Get the identifier property: the V3 identifier of the entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java index 7cfc51143dbb1..770c9688fcad8 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 b75ccaba87f1d..0000000000000 --- 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/FileHashAlgorithm.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java index 60f2e72f165e0..71548df30f7a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java @@ -25,6 +25,15 @@ public final class FileHashAlgorithm extends ExpandableStringEnum 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 0be57c4ae5d81..0000000000000 --- 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 5037750b29573..0000000000000 --- 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 865e69307352d..0000000000000 --- 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 ae0a2d6348d24..0000000000000 --- 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 39027c4f608c9..0000000000000 --- 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 792e517d8d108..6da78c6f2a114 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 ce4da38707f03..f73a0e6a8f121 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 018fafeb72565..0000000000000 --- 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 e551140636d87..0000000000000 --- 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 cdf5cd5f92699..0000000000000 --- 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 c6ae35c723373..0000000000000 --- 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 0892d2a463238..0000000000000 --- 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 1f2111a56b48d..0000000000000 --- 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 89bfdf241a525..0000000000000 --- 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 ef8388621d5ae..0000000000000 --- 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 675f38adbbe96..5f7e0a8e0b868 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java @@ -56,6 +56,10 @@ public final class GeoLocation { @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; + /** Creates an instance of GeoLocation class. */ + public GeoLocation() { + } + /** * Get the asn property: Autonomous System Number. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java deleted file mode 100644 index cc444f69cd21e..0000000000000 --- 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 8717c6a073ff5..0000000000000 --- 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 c02767abf5e70..0000000000000 --- 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 bb0a74c7e027e..0000000000000 --- 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 07ee2d932d262..0000000000000 --- 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 a0f7e3b56450f..0000000000000 --- 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 c6a5e97fd9ca9..4bdfe6f016886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java @@ -58,6 +58,10 @@ public final class GroupingConfiguration { @JsonProperty(value = "groupByCustomDetails") private List groupByCustomDetails; + /** Creates an instance of GroupingConfiguration class. */ + public GroupingConfiguration() { + } + /** * Get the enabled property: Grouping enabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java index 08e75c45b2b33..5c97f87d9393c 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 3ea294c0b3b58..e532adddbf014 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 2d051e853f0fc..6b46a7e5c07eb 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 f86ce54b9f24f..c51272dd77e9e 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/IncidentClassification.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java index 400aa8f0d0c49..37d377dcfef3a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java @@ -22,6 +22,15 @@ public final class IncidentClassification extends ExpandableStringEnum value; + /** 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 3e39bb7cd39ce..a8093e07c4416 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 3746be98a60ad..74a866d473bd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java @@ -22,6 +22,10 @@ public final class IncidentConfiguration { @JsonProperty(value = "groupingConfiguration") private GroupingConfiguration groupingConfiguration; + /** Creates an instance of IncidentConfiguration class. */ + public IncidentConfiguration() { + } + /** * Get the createIncident property: Create incidents from alerts triggered by this analytics rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java index f282c15e2c9d7..76897316c690b 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 e8ee0d18e29b6..1dba990980615 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java @@ -34,6 +34,10 @@ public final class IncidentInfo { @JsonProperty(value = "relationName") private String relationName; + /** Creates an instance of IncidentInfo class. */ + public IncidentInfo() { + } + /** * Get the incidentId property: Incident Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java index c24c4a8522eab..975a88bd59ca9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java @@ -23,6 +23,10 @@ public final class IncidentLabel { @JsonProperty(value = "labelType", access = JsonProperty.Access.WRITE_ONLY) private IncidentLabelType labelType; + /** Creates an instance of IncidentLabel class. */ + public IncidentLabel() { + } + /** * Get the labelName property: The name of the label. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java index 19999e0261f65..1212669d63e97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java @@ -16,6 +16,15 @@ public final class IncidentLabelType extends ExpandableStringEnum value; + /** 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 dee86cc228605..32b1f5991cfe6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java @@ -41,6 +41,10 @@ public final class IncidentOwnerInfo { @JsonProperty(value = "ownerType") private OwnerType ownerType; + /** Creates an instance of IncidentOwnerInfo class. */ + public IncidentOwnerInfo() { + } + /** * Get the email property: The email of the user the incident is assigned to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java deleted file mode 100644 index 924ddce626e4f..0000000000000 --- 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 0278075d0b460..7680e876e1834 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java @@ -53,6 +53,10 @@ public final class IncidentPropertiesAction { @JsonProperty(value = "labels") private List labels; + /** Creates an instance of IncidentPropertiesAction class. */ + public IncidentPropertiesAction() { + } + /** * Get the severity property: The severity of the incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java index 078c2fce6eb80..b55bbcbd00d3b 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/IncidentSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java index 4be03522b9c58..c55bda3bdadad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java @@ -22,6 +22,15 @@ public final class IncidentSeverity extends ExpandableStringEnum { /** Static value Closed for IncidentStatus. */ public static final IncidentStatus CLOSED = fromString("Closed"); + /** + * Creates a new instance of IncidentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentStatus() { + } + /** * Creates or finds a IncidentStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java index 3a2710c7cad6e..7bdd87b0684bd 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 7cb969486ee31..0000000000000 --- 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 0efb0bc5aff8b..0000000000000 --- 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 e69737b5e3c81..0000000000000 --- 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 c9877e7f9273b..0000000000000 --- 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 f870634fb1997..0000000000000 --- 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 6dd0b8e28f15f..0000000000000 --- 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 3c889abbed883..0000000000000 --- 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 f9428faa609ae..0000000000000 --- 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 ea811b7bdc9a6..0000000000000 --- 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 626304571d5cb..0000000000000 --- 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 08c5f7cb09c25..0000000000000 --- 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 486e7914039cb..0000000000000 --- 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 227c38863a55d..0000000000000 --- 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 45cf764a6a76a..0000000000000 --- 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 cf5ebc9db245e..0000000000000 --- 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 787fff5098c38..0000000000000 --- 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 06ab4d1c051d5..7c178bb8e59c4 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 beeac5a11a604..3d515e80089c5 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 c85e9c1ab3752..0000000000000 --- 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/KillChainIntent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java index ff0016d01c524..54a18155d7bca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java @@ -52,6 +52,15 @@ public final class KillChainIntent extends ExpandableStringEnum /** Static value Impact for KillChainIntent. */ public static final KillChainIntent IMPACT = fromString("Impact"); + /** + * Creates a new instance of KillChainIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KillChainIntent() { + } + /** * Creates or finds a KillChainIntent from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java deleted file mode 100644 index b8879fab665fb..0000000000000 --- 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 ee71cb19cfb9d..0000000000000 --- 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 9538371ea2c41..0000000000000 --- 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 3dc6cb43070cb..0000000000000 --- 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 1f8aeca643cc4..09e125a870250 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 8d4c01ef2b891..95e6ff04bb139 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 9441ac626ef07..b5a19baf3c610 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 efcd2bbb952b2..9b45db1895955 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 ab2433df85a50..0000000000000 --- 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/MatchingMethod.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java index 412bb642d81e4..760410892abc3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java @@ -22,6 +22,15 @@ public final class MatchingMethod extends ExpandableStringEnum { /** Static value Selected for MatchingMethod. */ public static final MatchingMethod SELECTED = fromString("Selected"); + /** + * Creates a new instance of MatchingMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MatchingMethod() { + } + /** * Creates or finds a MatchingMethod from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java deleted file mode 100644 index bf543c75aaafc..0000000000000 --- 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 4849da973db9a..56a01a8d5bebf 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 ced242cf519f6..47e45201f9aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java @@ -16,6 +16,10 @@ public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnec @JsonProperty(value = "discoveryLogs") private DataConnectorDataTypeCommon discoveryLogs; + /** Creates an instance of McasDataConnectorDataTypes class. */ + public McasDataConnectorDataTypes() { + } + /** * Get the discoveryLogs property: Discovery log data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java deleted file mode 100644 index 97b1be834a33a..0000000000000 --- 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 be4c5abc500b7..f943c4e956959 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 index 568297b27c579..8c6d3e99ebc05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java @@ -28,6 +28,10 @@ public final class MetadataAuthor { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataAuthor class. */ + public MetadataAuthor() { + } + /** * Get the name property: Name of the author. Company or person. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java index d2101c1cc1cf7..2a244bb3737d6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java @@ -23,6 +23,10 @@ public final class MetadataCategories { @JsonProperty(value = "verticals") private List verticals; + /** Creates an instance of MetadataCategories class. */ + public MetadataCategories() { + } + /** * Get the domains property: domain for the solution content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java index 0fcabe6da5cd3..c6b0e43c35355 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java @@ -25,7 +25,7 @@ public final class MetadataDependencies { * Type of the content item we depend on */ @JsonProperty(value = "kind") - private Kind kind; + private String kind; /* * Version of the the content item we depend on. Can be blank, * or missing to indicate any version fulfills the @@ -52,6 +52,10 @@ public final class MetadataDependencies { @JsonProperty(value = "criteria") private List criteria; + /** Creates an instance of MetadataDependencies class. */ + public MetadataDependencies() { + } + /** * Get the contentId property: Id of the content item we depend on. * @@ -77,7 +81,7 @@ public MetadataDependencies withContentId(String contentId) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.kind; } @@ -87,7 +91,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataDependencies object itself. */ - public MetadataDependencies withKind(Kind kind) { + public MetadataDependencies withKind(String kind) { this.kind = kind; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java index a5a93f7aa39fd..138ea70302504 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java @@ -25,6 +25,10 @@ public final class MetadataList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of MetadataList class. */ + public MetadataList() { + } + /** * Get the value property: Array of metadata. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java index 392d45ae54999..a7d21ad88ab51 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataModel.java @@ -78,7 +78,7 @@ public interface MetadataModel { * * @return the kind value. */ - Kind kind(); + String kind(); /** * Gets the source property: Source of the content. This is where/how it was created. @@ -322,7 +322,7 @@ interface WithKind { * @param kind The kind of content the metadata is for. * @return the next definition stage. */ - WithCreate withKind(Kind kind); + WithCreate withKind(String kind); } /** The stage of the MetadataModel definition allowing to specify source. */ interface WithSource { @@ -496,8 +496,7 @@ interface WithPreviewImagesDark { /** The template for MetadataModel update. */ interface Update - extends UpdateStages.WithEtag, - UpdateStages.WithContentId, + extends UpdateStages.WithContentId, UpdateStages.WithParentId, UpdateStages.WithVersion, UpdateStages.WithKind, @@ -533,16 +532,6 @@ interface Update } /** 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 { /** @@ -591,7 +580,7 @@ interface WithKind { * @param kind The kind of content the metadata is for. * @return the next definition stage. */ - Update withKind(Kind kind); + Update withKind(String kind); } /** The stage of the MetadataModel update allowing to specify source. */ interface WithSource { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java index 7556f02585fb6..9d31b5405ff3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java @@ -12,13 +12,17 @@ /** Metadata patch request body. */ @Fluent -public final class MetadataPatch extends ResourceWithEtag { +public final class MetadataPatch { /* * Metadata patch request body */ @JsonProperty(value = "properties") private MetadataPropertiesPatch innerProperties; + /** Creates an instance of MetadataPatch class. */ + public MetadataPatch() { + } + /** * Get the innerProperties property: Metadata patch request body. * @@ -28,13 +32,6 @@ 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 @@ -119,7 +116,7 @@ public MetadataPatch withVersion(String version) { * * @return the kind value. */ - public Kind kind() { + public String kind() { return this.innerProperties() == null ? null : this.innerProperties().kind(); } @@ -129,7 +126,7 @@ public Kind kind() { * @param kind the kind value to set. * @return the MetadataPatch object itself. */ - public MetadataPatch withKind(Kind kind) { + public MetadataPatch withKind(String kind) { if (this.innerProperties() == null) { this.innerProperties = new MetadataPropertiesPatch(); } @@ -497,9 +494,7 @@ public MetadataPatch withPreviewImagesDark(List previewImagesDark) { * * @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 index 41a206a6dccf9..8c21deca2e754 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java @@ -29,6 +29,10 @@ public final class MetadataSource { @JsonProperty(value = "sourceId") private String sourceId; + /** Creates an instance of MetadataSource class. */ + public MetadataSource() { + } + /** * Get the kind property: Source type of the content. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java index a25d51b568bed..a2d9a01d2b2df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java @@ -35,6 +35,10 @@ public final class MetadataSupport { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataSupport class. */ + public MetadataSupport() { + } + /** * Get the tier property: Type of support for content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java index b8be150a2a19c..5640a663d54e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java @@ -53,12 +53,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. + * @return a Metadata along with {@link Response}. */ - MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Get a Metadata. @@ -66,14 +68,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. + * @return a Metadata. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -81,11 +81,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String metadataName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Delete a Metadata. @@ -93,14 +96,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Get a Metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java index 201a74e0f4e16..d72927a479667 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleI @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRule class. */ + public MicrosoftSecurityIncidentCreationAlertRule() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java index 5a6e176fc2a3c..d76b0b58863bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java @@ -36,6 +36,10 @@ public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleCommonProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java index d908982016d7a..acae8ee1cc5ca 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 d6958d5cf48af..15773137fe28a 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,13 +29,14 @@ 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 7a23f7a2b182d..0000000000000 --- 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 551cb9589235c..0000000000000 --- 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 8ed7cfef085ed..0000000000000 --- 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 bafc9102b1dde..0000000000000 --- 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 80908337be80d..0000000000000 --- 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 7665b6940195e..0000000000000 --- 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 25d2ff4c15b41..0000000000000 --- 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 2a339d8590fd3..0000000000000 --- 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 537732e3a1225..0000000000000 --- 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 c82170f9180d6..0000000000000 --- 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 ed83191305b56..0000000000000 --- 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 2fb508346db83..0ed289a3b0832 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 f96e94afc7493..6363966ccdc99 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 f4bb9c178fe0d..d5115e8c9b482 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java @@ -9,6 +9,10 @@ /** Exchange data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesExchange class. */ + public OfficeDataConnectorDataTypesExchange() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesExchange withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java index 85b62eaef4d0a..08ab9688e59a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java @@ -9,6 +9,10 @@ /** SharePoint data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesSharePoint class. */ + public OfficeDataConnectorDataTypesSharePoint() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesSharePoint withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java index a16d1b5ddc04a..1ff0e69de273e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java @@ -9,6 +9,10 @@ /** Teams data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesTeams class. */ + public OfficeDataConnectorDataTypesTeams() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesTeams withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java deleted file mode 100644 index 0572876278d14..0000000000000 --- 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 0a26b9e454929..0000000000000 --- 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 8e52f4d91bb24..0000000000000 --- 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 42b1400cfcf47..0000000000000 --- 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 0e71c0fd1cad8..0000000000000 --- 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 2c7496612394b..0000000000000 --- 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 54967890e46e1..bad441db6f3b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "resource") private String resource; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the description property: Description of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java index 47df47f995193..c88eb98bd9440 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java @@ -25,6 +25,10 @@ public final class OperationsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OperationsList class. */ + public OperationsList() { + } + /** * Get the nextLink property: URL to fetch the next set of operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java index 77aafbf0cf2b5..5e030be941b83 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java @@ -16,6 +16,15 @@ public final class Operator extends ExpandableStringEnum { /** Static value OR for Operator. */ public static final Operator OR = fromString("OR"); + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + /** * Creates or finds a Operator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java deleted file mode 100644 index 6fff096285297..0000000000000 --- 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/OwnerType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java index 8bb1280540329..82b98bb7dcacb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java @@ -19,6 +19,15 @@ public final class OwnerType extends ExpandableStringEnum { /** Static value Group for OwnerType. */ public static final OwnerType GROUP = fromString("Group"); + /** + * Creates a new instance of OwnerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OwnerType() { + } + /** * Creates or finds a OwnerType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java deleted file mode 100644 index ba4232af432ec..0000000000000 --- 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 cfeebee1b0459..0000000000000 --- 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 943909826a2e7..0000000000000 --- 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 d2db9072abc2f..0000000000000 --- 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 9d85ffb7802b6..7adeef14203e0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; @@ -14,7 +15,7 @@ public final class PlaybookActionProperties { /* * The resource id of the playbook resource. */ - @JsonProperty(value = "logicAppResourceId") + @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; /* @@ -23,6 +24,10 @@ public final class PlaybookActionProperties { @JsonProperty(value = "tenantId") private UUID tenantId; + /** Creates an instance of PlaybookActionProperties class. */ + public PlaybookActionProperties() { + } + /** * Get the logicAppResourceId property: The resource id of the playbook resource. * @@ -69,5 +74,13 @@ public PlaybookActionProperties withTenantId(UUID tenantId) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (logicAppResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logicAppResourceId in model PlaybookActionProperties")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(PlaybookActionProperties.class); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java deleted file mode 100644 index e62fa3c417171..0000000000000 --- 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 1d192d71c851c..17f62476d878d 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 ead1ce681b979..0000000000000 --- 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 index dc048782a94f5..be5d0f5368a51 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyArrayChangedConditionProperties extends AutomationRul @JsonProperty(value = "conditionProperties") private AutomationRulePropertyArrayChangedValuesCondition conditionProperties; + /** Creates an instance of PropertyArrayChangedConditionProperties class. */ + public PropertyArrayChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java deleted file mode 100644 index a508d41ec8736..0000000000000 --- 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 index 22470af86a465..d0916572cfff9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyChangedConditionProperties extends AutomationRuleCond @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesChangedCondition conditionProperties; + /** Creates an instance of PropertyChangedConditionProperties class. */ + public PropertyChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java index 7c641a0bca1ee..58c0036f081d9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesCondition conditionProperties; + /** Creates an instance of PropertyConditionProperties class. */ + public PropertyConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java deleted file mode 100644 index a365b42e5c16b..0000000000000 --- 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 e20070c785ad5..0000000000000 --- 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/RegistryHive.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java index 0b533e8cddbbb..37cb3be9e41f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java @@ -40,6 +40,15 @@ public final class RegistryHive extends ExpandableStringEnum { /** Static value HKEY_CURRENT_USER for RegistryHive. */ public static final RegistryHive HKEY_CURRENT_USER = fromString("HKEY_CURRENT_USER"); + /** + * Creates a new instance of RegistryHive value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegistryHive() { + } + /** * Creates or finds a RegistryHive from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java index 116afd6feb604..e5a22b2b8cb94 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 8121d653cb19d..326ada27161e9 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/RegistryValueKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java index 7f214d1bf04f9..ca55b89110bad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java @@ -37,6 +37,15 @@ public final class RegistryValueKind extends ExpandableStringEnum value; + /** Creates an instance of RelationList class. */ + public RelationList() { + } + /** * Get the nextLink property: URL to fetch the next set of relations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repo.java deleted file mode 100644 index 8510709ca5b34..0000000000000 --- 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 02aaa874b88de..0000000000000 --- 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 dcb33e87b257f..0000000000000 --- 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 3e26879725a58..0000000000000 --- 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 5e10c94993ffe..0000000000000 --- 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 146d39665d202..0000000000000 --- 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 7024f46e5562d..0000000000000 --- 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 6ed4515163c82..8d8a4234f62d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java @@ -24,6 +24,10 @@ public class ResourceWithEtag extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ResourceWithEtag class. */ + public ResourceWithEtag() { + } + /** * Get the etag property: Etag of the azure resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java deleted file mode 100644 index 21b538e67f101..0000000000000 --- 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 5d5575688e635..a74f858df2b8f 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 181410c28e15a..85e1994a1f2ee 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 143d98192d0da..10849882137af 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 3052a35d0c5c9..ef4fce81c88c4 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 3613253e952af..9ab3a972e6e6a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java @@ -22,6 +22,10 @@ public final class SecurityAlertPropertiesConfidenceReasonsItem { @JsonProperty(value = "reasonType", access = JsonProperty.Access.WRITE_ONLY) private String reasonType; + /** Creates an instance of SecurityAlertPropertiesConfidenceReasonsItem class. */ + public SecurityAlertPropertiesConfidenceReasonsItem() { + } + /** * Get the reason property: The reason's description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java deleted file mode 100644 index a34da5bbcc1a6..0000000000000 --- 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 119f867b58eba..75769871bd464 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 eb9b7a727ef69..16f1f3a2a2ef2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java @@ -42,12 +42,14 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ - SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -55,14 +57,12 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -71,16 +71,18 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ - SecurityMLAnalyticsSetting createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -89,18 +91,16 @@ SecurityMLAnalyticsSetting createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSetting createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -108,11 +108,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -120,12 +123,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java index 25eeab69e8b98..1f6989b762024 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java @@ -23,6 +23,10 @@ public final class SecurityMLAnalyticsSettingsDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of SecurityMLAnalyticsSettingsDataSource class. */ + public SecurityMLAnalyticsSettingsDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java index 81074368d1146..4a893dec833a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java @@ -13,6 +13,15 @@ public final class SecurityMLAnalyticsSettingsKind extends ExpandableStringEnum< /** Static value Anomaly for SecurityMLAnalyticsSettingsKind. */ public static final SecurityMLAnalyticsSettingsKind ANOMALY = fromString("Anomaly"); + /** + * Creates a new instance of SecurityMLAnalyticsSettingsKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityMLAnalyticsSettingsKind() { + } + /** * Creates or finds a SecurityMLAnalyticsSettingsKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java index 8b72b6ba1ce9d..da720ca5591bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java @@ -25,6 +25,10 @@ public final class SecurityMLAnalyticsSettingsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SecurityMLAnalyticsSettingsList class. */ + public SecurityMLAnalyticsSettingsList() { + } + /** * Get the nextLink property: URL to fetch the next set of SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java index abcc5d92aa343..97d1d3a659b08 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java @@ -15,12 +15,14 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ - SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Get Sentinel onboarding state. @@ -28,14 +30,12 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -43,11 +43,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Delete Sentinel onboarding state. @@ -55,40 +58,37 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ - SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); /** * Get Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java deleted file mode 100644 index 6ec2ac268c710..0000000000000 --- 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 84b5c972e9eb7..0000000000000 --- 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 94296a654ffb8..0000000000000 --- 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 9533bec7514d8..0000000000000 --- 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/SettingsStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java index f9cb8e47afa61..be00c933f58d0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java @@ -16,6 +16,15 @@ public final class SettingsStatus extends ExpandableStringEnum { /** Static value Flighting for SettingsStatus. */ public static final SettingsStatus FLIGHTING = fromString("Flighting"); + /** + * Creates a new instance of SettingsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingsStatus() { + } + /** * Creates or finds a SettingsStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java new file mode 100644 index 0000000000000..52929420b4a37 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Source.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The 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 a new instance of Source value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Source() { + } + + /** + * 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 6c5a64405d59c..0000000000000 --- 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 8fa041261e9ab..0000000000000 --- 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 291568ce34484..0000000000000 --- 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 d7301e3d70cc0..0000000000000 --- 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 index 81b1a237ddf02..fe135dfaf18fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java @@ -22,6 +22,15 @@ public final class SourceKind extends ExpandableStringEnum { /** Static value SourceRepository for SourceKind. */ public static final SourceKind SOURCE_REPOSITORY = fromString("SourceRepository"); + /** + * Creates a new instance of SourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceKind() { + } + /** * Creates or finds a SourceKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java deleted file mode 100644 index b1e052ce22519..0000000000000 --- 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 e1aa218951eff..0024c03c75864 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 index e911816eb754d..e0a4460671f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java @@ -19,6 +19,15 @@ public final class SupportTier extends ExpandableStringEnum { /** Static value Community for SupportTier. */ public static final SupportTier COMMUNITY = fromString("Community"); + /** + * Creates a new instance of SupportTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SupportTier() { + } + /** * Creates or finds a SupportTier from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java deleted file mode 100644 index 897fc3f44ce7a..0000000000000 --- 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 4d49f30e45e97..993b1a8493543 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 6615ba9b2f749..cd851c57de98c 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 a51ae50a528a8..84b7c9e247af0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java @@ -9,6 +9,10 @@ /** Data type for indicators connection. */ @Fluent public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { + /** Creates an instance of TIDataConnectorDataTypesIndicators class. */ + public TIDataConnectorDataTypesIndicators() { + } + /** {@inheritDoc} */ @Override public TIDataConnectorDataTypesIndicators withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamInformation.java deleted file mode 100644 index ea1eb3549b752..0000000000000 --- 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 40d641ab84531..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Describes team properties. */ -@Fluent -public final class TeamProperties { - /* - * The name of the team - */ - @JsonProperty(value = "teamName", required = true) - private String teamName; - - /* - * The description of the team - */ - @JsonProperty(value = "teamDescription") - private String teamDescription; - - /* - * List of member IDs to add to the team - */ - @JsonProperty(value = "memberIds") - private List memberIds; - - /* - * List of group IDs to add their members to the team - */ - @JsonProperty(value = "groupIds") - private List groupIds; - - /** - * Get the teamName property: The name of the team. - * - * @return the teamName value. - */ - public String teamName() { - return this.teamName; - } - - /** - * Set the teamName property: The name of the team. - * - * @param teamName the teamName value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - /** - * Get the teamDescription property: The description of the team. - * - * @return the teamDescription value. - */ - public String teamDescription() { - return this.teamDescription; - } - - /** - * Set the teamDescription property: The description of the team. - * - * @param teamDescription the teamDescription value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamDescription(String teamDescription) { - this.teamDescription = teamDescription; - return this; - } - - /** - * Get the memberIds property: List of member IDs to add to the team. - * - * @return the memberIds value. - */ - public List memberIds() { - return this.memberIds; - } - - /** - * Set the memberIds property: List of member IDs to add to the team. - * - * @param memberIds the memberIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withMemberIds(List memberIds) { - this.memberIds = memberIds; - return this; - } - - /** - * Get the groupIds property: List of group IDs to add their members to the team. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: List of group IDs to add their members to the team. - * - * @param groupIds the groupIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (teamName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property teamName in model TeamProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java index f04cc179e840d..5e1474c1eb71a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java @@ -19,6 +19,15 @@ public final class TemplateStatus extends ExpandableStringEnum { /** Static value NotAvailable for TemplateStatus. */ public static final TemplateStatus NOT_AVAILABLE = fromString("NotAvailable"); + /** + * Creates a new instance of TemplateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TemplateStatus() { + } + /** * Creates or finds a TemplateStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java index 9acbec19c77f4..fb95037b9ee03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java @@ -46,6 +46,10 @@ public final class ThreatIntelligence { @JsonProperty(value = "threatType", access = JsonProperty.Access.WRITE_ONLY) private String threatType; + /** Creates an instance of ThreatIntelligence class. */ + public ThreatIntelligence() { + } + /** * Get the confidence property: Confidence (must be between 0 and 1). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java deleted file mode 100644 index 924536281280d..0000000000000 --- 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 734f6a42748a1..0000000000000 --- 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 847257381b591..38a0f63db31c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java @@ -17,6 +17,10 @@ public final class ThreatIntelligenceAppendTags { @JsonProperty(value = "threatIntelligenceTags") private List threatIntelligenceTags; + /** Creates an instance of ThreatIntelligenceAppendTags class. */ + public ThreatIntelligenceAppendTags() { + } + /** * Get the threatIntelligenceTags property: List of tags to be appended. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java index 689e8a88e5646..7a86d8fe30a11 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java @@ -43,6 +43,10 @@ public final class ThreatIntelligenceExternalReference { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map hashes; + /** Creates an instance of ThreatIntelligenceExternalReference class. */ + public ThreatIntelligenceExternalReference() { + } + /** * Get the description property: External reference description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java index 86be0cc60915a..cecf231a67e7b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java @@ -89,6 +89,10 @@ public final class ThreatIntelligenceFilteringCriteria { @JsonProperty(value = "skipToken") private String skipToken; + /** Creates an instance of ThreatIntelligenceFilteringCriteria class. */ + public ThreatIntelligenceFilteringCriteria() { + } + /** * Get the pageSize property: Page size. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java index bb55e69667941..b052bbc4a4bb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java @@ -29,6 +29,10 @@ public final class ThreatIntelligenceGranularMarkingModel { @JsonProperty(value = "selectors") private List selectors; + /** Creates an instance of ThreatIntelligenceGranularMarkingModel class. */ + public ThreatIntelligenceGranularMarkingModel() { + } + /** * Get the language property: Language granular marking model. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java index a9e60f8006600..540eca0eb46cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java @@ -14,25 +14,25 @@ public interface ThreatIntelligenceIndicatorMetrics { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ - ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java index 5ce9f114369e2..cb0c015043d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceIn @JsonProperty(value = "properties") private ThreatIntelligenceIndicatorProperties innerProperties; + /** Creates an instance of ThreatIntelligenceIndicatorModel class. */ + public ThreatIntelligenceIndicatorModel() { + } + /** * Get the innerProperties property: Threat Intelligence Entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java index 464cb4b65fbe0..bf1b6241afe05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java @@ -10,20 +10,6 @@ /** Resource collection API of ThreatIntelligenceIndicators. */ public interface ThreatIntelligenceIndicators { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -43,17 +29,18 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -71,22 +58,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -109,16 +91,22 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -134,6 +122,18 @@ Response createWithResponse( */ Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -175,15 +175,18 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -192,18 +195,15 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -212,16 +212,18 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ - ThreatIntelligenceInformation replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -230,16 +232,14 @@ ThreatIntelligenceInformation replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ - Response replaceTagsWithResponse( + ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorsOperations.java index 444a66aa1384f..371326e0b90a6 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 63195abe89bbd..fc8d2b29c70cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java @@ -25,6 +25,10 @@ public final class ThreatIntelligenceInformationList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceInformationList class. */ + public ThreatIntelligenceInformationList() { + } + /** * Get the nextLink property: URL to fetch the next set of information objects. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java index 8a1ba6f2bd1d9..b9da00cd0cc65 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceKillChainPhase { @JsonProperty(value = "phaseName") private String phaseName; + /** Creates an instance of ThreatIntelligenceKillChainPhase class. */ + public ThreatIntelligenceKillChainPhase() { + } + /** * Get the killChainName property: Kill chainName name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java index 2cb0c00e17c5a..b1a55af9a16e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java @@ -35,6 +35,10 @@ public final class ThreatIntelligenceMetric { @JsonProperty(value = "sourceMetrics") private List sourceMetrics; + /** Creates an instance of ThreatIntelligenceMetric class. */ + public ThreatIntelligenceMetric() { + } + /** * Get the lastUpdatedTimeUtc property: Last updated indicator metric. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java index 62bd0e31c2fc0..9c4b6e14c4a99 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceMetricEntity { @JsonProperty(value = "metricValue") private Integer metricValue; + /** Creates an instance of ThreatIntelligenceMetricEntity class. */ + public ThreatIntelligenceMetricEntity() { + } + /** * Get the metricName property: Metric name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java index 2d20ceae39ac0..512a2b5cb9072 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java @@ -16,6 +16,10 @@ public final class ThreatIntelligenceMetrics { @JsonProperty(value = "properties") private ThreatIntelligenceMetric properties; + /** Creates an instance of ThreatIntelligenceMetrics class. */ + public ThreatIntelligenceMetrics() { + } + /** * Get the properties property: Threat intelligence metrics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java index 1a80738051c9f..f4b8451c20be6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceParsedPattern { @JsonProperty(value = "patternTypeValues") private List patternTypeValues; + /** Creates an instance of ThreatIntelligenceParsedPattern class. */ + public ThreatIntelligenceParsedPattern() { + } + /** * Get the patternTypeKey property: Pattern type key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java index ead9ca6b88336..9753eba99ef8e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceParsedPatternTypeValue { @JsonProperty(value = "value") private String value; + /** Creates an instance of ThreatIntelligenceParsedPatternTypeValue class. */ + public ThreatIntelligenceParsedPatternTypeValue() { + } + /** * Get the valueType property: Type of the value. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java new file mode 100644 index 0000000000000..aba07d20627db --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceInnerKind.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.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 a new instance of ThreatIntelligenceResourceInnerKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceResourceInnerKind() { + } + + /** + * 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 6595128b74d9d..0000000000000 --- 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 7c51d95d08ad6..00b56b46258a8 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 c5933ebe83428..0000000000000 --- 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 0000000000000..59b7e0beeee8a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingOrder.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.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 a new instance of ThreatIntelligenceSortingOrder value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceSortingOrder() { + } + + /** + * 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 a6e561d9e99ec..0000000000000 --- 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 125e1dd55a280..0000000000000 --- 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 22f12b8a6ab9f..0000000000000 --- 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 7b2b40b0a6485..0000000000000 --- 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 d34ece2d531a3..0000000000000 --- 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 e6c563cb369f9..0000000000000 --- 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 7d42bccca4700..0000000000000 --- 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 9bb9323008777..ebeed445bade8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java @@ -16,6 +16,15 @@ public final class TriggersOn extends ExpandableStringEnum { /** Static value Alerts for TriggersOn. */ public static final TriggersOn ALERTS = fromString("Alerts"); + /** + * Creates a new instance of TriggersOn value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersOn() { + } + /** * Creates or finds a TriggersOn from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java index 84c11fc4fc6b0..20aa5497f51e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java @@ -16,6 +16,15 @@ public final class TriggersWhen extends ExpandableStringEnum { /** Static value Updated for TriggersWhen. */ public static final TriggersWhen UPDATED = fromString("Updated"); + /** + * Creates a new instance of TriggersWhen value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersWhen() { + } + /** * Creates or finds a TriggersWhen from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java deleted file mode 100644 index 5a79fd5025442..0000000000000 --- 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 8548886d5a2db..0000000000000 --- 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 0af80094b7e0f..e5a552c56bddf 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 8d8dc55f03095..000883c8a5f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java @@ -29,6 +29,10 @@ public final class UserInfo { @JsonProperty(value = "objectId") private UUID objectId; + /** Creates an instance of UserInfo class. */ + public UserInfo() { + } + /** * Get the email property: The email of the user. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java deleted file mode 100644 index 7b74ced2e0681..0000000000000 --- 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 285474b81325a..0000000000000 --- 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 f00eabf5856b8..5265a9ceea861 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 b077295fb50bf..97bdafb63b973 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 97bc46f5f4bd7..2a2b51e4346e0 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 9b56cdba24034..4877c8a87c71f 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 4e03f77f637e8..4c0e933d47db5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java @@ -25,6 +25,10 @@ public final class WatchlistList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistList class. */ + public WatchlistList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlists. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java index 4e53d746f0644..7ba59e628b63b 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 5356e46d32f66..0000000000000 --- 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 afdeedcf85a7c..0000000000000 --- 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 8105fba3b9de5..0000000000000 --- 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 5315f66e3e280..0000000000000 --- 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 8495bcf9e510f..0000000000000 --- 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 68e39f44ac620..50fdff493f210 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/2023-02-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 4eade4f804870..a5a107e90271c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -25,6 +23,6 @@ public static void deleteAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java index 3d2f9a3fcd1a7..e9be05b5c6312 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -25,6 +23,6 @@ public static void getAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java index 61efbd321ea97..9652758da121f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -18,6 +16,9 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java index 5e2ef04f866cc..a9fc28cbf1576 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -20,6 +18,7 @@ public static void getAlertRuleTemplateById( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java index 30931adbd1bbc..e844f18463ffc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -18,6 +16,6 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java index df3209f52c0cd..3e7f0b573375b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; @@ -15,16 +14,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 +29,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/2023-02-01/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -53,212 +47,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()))))), - Context.NONE); + .withEnabled(true), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -278,11 +72,11 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -305,7 +99,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) @@ -351,275 +144,7 @@ public static void createsOrUpdatesAScheduledAlertRule( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - 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); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java index ae8c5d3527899..a66a0c7ddb4f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -19,6 +17,7 @@ public final class AlertRulesDeleteSamples { public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java index 5f59cda357eb7..b16ae2fbbc606 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -20,25 +18,12 @@ public static void getAScheduledAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json - */ - /** - * 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/2023-02-01/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -46,11 +31,13 @@ public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights. * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -61,6 +48,10 @@ public static void getAMicrosoftSecurityIncidentCreationRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); + .getWithResponse( + "myRg", + "myWorkspace", + "microsoftSecurityIncidentCreationRuleExample", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java index a76a803ecb342..88a5fa8ade6d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -17,6 +15,6 @@ public final class AlertRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); + manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java index 0ddbba866ce2c..21f3a7b8ea5d5 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/2023-02-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 9931b428f9930..49835f030281c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -20,6 +18,7 @@ public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java index 79bd1f2bf1dd3..b31c57eeb8ac5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -19,6 +17,7 @@ public final class AutomationRulesGetSamples { public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java index cb067a4161d23..46222d1e488f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -17,6 +15,6 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java deleted file mode 100644 index 02135e4b1f24a..0000000000000 --- 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 4ee602ef802a8..0000000000000 --- 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 90fe86d803f01..0000000000000 --- 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 6ae73ac9318f4..0000000000000 --- 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 c04cb45847c23..0000000000000 --- 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 f54f13ae59da1..1cdf2b0001e76 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/2023-02-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 adaf45b1a342c..c7d659931157c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksDeleteSamples { public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java index cca078fc516b2..8654f5dab1042 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksGetSamples { public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java index 7ff9e9471b73b..8bfd3eaeb221c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -17,6 +15,6 @@ public final class BookmarksListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); + manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java deleted file mode 100644 index 236b908d09558..0000000000000 --- 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 d00218190776a..0000000000000 --- 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("fakeKeyPlaceholder") - .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("fakeKeyPlaceholder") - .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 8a4b352fb2740..a72fc4d6bf12c 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,21 @@ 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/2023-02-01/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -77,77 +35,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"), - Context.NONE); + .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json - */ - /** - * 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/2023-02-01/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -163,527 +62,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("$")))), - Context.NONE); + .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java index 54ce6d4bb0bc2..bbecfd9dcad2c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java @@ -4,42 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json - */ - /** - * 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/2023-02-01/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -50,36 +18,7 @@ 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); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java deleted file mode 100644 index b9727cf73d26c..0000000000000 --- 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 4e229927f6b95..a4b8c94314592 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java @@ -4,72 +4,42 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json - */ - /** - * 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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureSecurityCenterById.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", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-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", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -80,70 +50,12 @@ public static void getAMCASDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json - */ - /** - * 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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -154,56 +66,12 @@ public static void getAnAwsCloudTrailDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json - */ - /** - * 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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** * Sample code: Get an AATP data connector. @@ -214,96 +82,54 @@ 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); + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** - * Sample code: Get an Office365 data connector. + * Sample code: Get a MDATP data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnOffice365DataConnector( + public static void getAMDATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetThreatIntelligenceById.json */ /** - * Sample code: Get an Aws S3 data connector. + * Sample code: Get a TI data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnAwsS3DataConnector( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** - * Sample code: Get an Office365 PowerBI data connector. + * Sample code: Get an AAD data connector. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnOffice365PowerBIDataConnector( + public static void getAnAADDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java index 962a0a285d9ea..39c71c29c0219 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -18,6 +16,6 @@ public final class DataConnectorsListSamples { */ public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java deleted file mode 100644 index 0bb699a3decd9..0000000000000 --- 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 c18a6971c4014..0000000000000 --- 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 87a4794ab75b7..0000000000000 --- 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 03835df0aca65..0000000000000 --- 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 660a3055de2e1..0000000000000 --- 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 76d03c4060947..0000000000000 --- 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 a07e0a7b42bda..0000000000000 --- 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 49db6e77c5cc4..0000000000000 --- 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 719027f633537..0000000000000 --- 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 9ca8ca1c39648..0000000000000 --- 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 c5ddd58221cf6..0000000000000 --- 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 3f319789b3675..0000000000000 --- 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 8e1290833c7a6..0000000000000 --- 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 4648fd151d8b9..0000000000000 --- 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 de44787f195e4..0000000000000 --- 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 a839ca483bbc9..0000000000000 --- 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 6e961ca4a8bdb..0000000000000 --- 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 cf0ff15ffb5b4..0000000000000 --- 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 4f080eb0b16ce..0000000000000 --- 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 8a16e508a98f1..b38e8969cbfd9 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/2023-02-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 ab58f3db35c55..bb197372e638b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/DeleteIncidentComment.json */ /** * Sample code: Delete the incident comment. @@ -25,6 +23,6 @@ public static void deleteTheIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java index b0cc0dbe7c41d..9140ff2f1e361 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetIncidentCommentById.json */ /** * Sample code: Get an incident comment. @@ -25,6 +23,6 @@ public static void getAnIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java index 3bdb6e55cdb50..4d646db5fa74e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/comments/GetAllIncidentComments.json */ /** * Sample code: Get all incident comments. @@ -20,6 +18,14 @@ 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); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java index 4b99d62695e0c..67c0d7685eeeb 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/2023-02-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 e9f0630456b0b..48f2961a79cc7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -25,6 +23,6 @@ public static void deleteTheIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java index 9ca14fce1f49f..b971f34d27d67 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -25,6 +23,6 @@ public static void getAnIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java index 223b77dfe78f9..36d4e5683d09e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -20,6 +18,14 @@ public static void getAllIncidentRelations( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java index fac6451584936..6d665d9b0edb5 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/2023-02-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 1d10ad7288690..0000000000000 --- 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 7213c317f62f1..8a42e9e67970b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/DeleteIncident.json */ /** * Sample code: Delete an incident. @@ -19,6 +17,7 @@ public final class IncidentsDeleteSamples { public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java index aaebebca140b2..7260d7b34c97c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidentById.json */ /** * Sample code: Get an incident. @@ -19,6 +17,7 @@ public final class IncidentsGetSamples { public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java index 521cc7b9a7eaa..734a13bf30be4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentAlerts.json */ /** * Sample code: Get all incident alerts. @@ -20,6 +18,7 @@ public static void getAllIncidentAlerts( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java index 396a34e22e023..9beb78e6eb091 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentBookmarks.json */ /** * Sample code: Get all incident bookmarks. @@ -20,6 +18,7 @@ public static void getAllIncidentBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java index 05dac3dfd2326..7c0db70e46f53 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetAllIncidentEntities.json */ /** * Sample code: Gets all incident related entities. @@ -20,6 +18,7 @@ public static void getsAllIncidentRelatedEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listEntitiesWithResponse( + "myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java index 12ee00a614f64..4586295413297 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/incidents/GetIncidents.json */ /** * Sample code: Get all incidents. @@ -17,6 +15,15 @@ public final class IncidentsListSamples { * @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); + manager + .incidents() + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java deleted file mode 100644 index 8aff9771734bc..0000000000000 --- 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 4c5af0fbd9f2e..0000000000000 --- 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 index 2e1c2cff2c935..40e2f96d29343 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java @@ -4,7 +4,6 @@ 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; @@ -19,7 +18,7 @@ /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -36,7 +35,7 @@ public static void createUpdateFullMetadata( .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") .withVersion("1.0.0.0") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .withSource( new MetadataSource() .withKind(SourceKind.SOLUTION) @@ -62,22 +61,22 @@ public static void createUpdateFullMetadata( .asList( new MetadataDependencies() .withContentId("045d06d0-ee72-4794-aba4-cf5646e4c756") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withName("Microsoft Defender for Endpoint"), new MetadataDependencies() .withContentId("dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d") - .withKind(Kind.DATA_CONNECTOR), + .withKind("DataConnector"), new MetadataDependencies() .withContentId("de4dca9b-eb37-47d6-a56f-b8b06b261593") - .withKind(Kind.DATA_CONNECTOR) + .withKind("DataConnector") .withVersion("2.0"))), new MetadataDependencies() .withContentId("31ee11cc-9989-4de8-b176-5e0ef5c4dbab") - .withKind(Kind.PLAYBOOK) + .withKind("Playbook") .withVersion("1.0"), new MetadataDependencies() .withContentId("21ba424a-9438-4444-953a-7059539a7a1b") - .withKind(Kind.PARSER)))) + .withKind("Parser")))) .withCategories( new MetadataCategories() .withDomains(Arrays.asList("Application", "Security – Insider Threat")) @@ -95,7 +94,7 @@ public static void createUpdateFullMetadata( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -111,7 +110,7 @@ public static void createUpdateMinimalMetadata( .withContentId("c00ee137-7475-47c8-9cce-ec6f0f1bedd0") .withParentId( "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName") - .withKind(Kind.ANALYTICS_RULE) + .withKind("AnalyticsRule") .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java index 83b191e5ca95f..1b0b46309cb1f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -17,6 +15,6 @@ public final class MetadataDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java index 9d738dafd0858..864f3df505148 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -18,6 +16,6 @@ public final class MetadataGetSamples { */ public static void getSingleMetadataByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java index 05d6eb76725f7..b3aea839a7fe3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -17,11 +15,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -30,6 +28,6 @@ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.Sec */ public static void getAllMetadataWithODataFilterOrderbySkipTop( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java index 91f5be55253b7..8eb3efa09b2b6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -20,7 +19,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java deleted file mode 100644 index 83381c6ff0914..0000000000000 --- 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 82ebecfad7426..0000000000000 --- 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 bff20163b14d3..0000000000000 --- 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 bd9e0689a55d5..fe557bb4c2316 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java deleted file mode 100644 index 9b87891b4ad72..0000000000000 --- 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 c48e37a907739..0000000000000 --- 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 e54fd9e369a6e..0000000000000 --- 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 d84adcba1067b..0000000000000 --- 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 4f4f433d1c48d..91ec178803905 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -19,7 +18,7 @@ /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -73,6 +72,6 @@ public static void createsOrUpdatesAAnomalySecurityMLAnalyticsSettings( .withIsDefaultSettings(true) .withAnomalySettingsVersion(0) .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java index 5a7fbfb4f91a4..af9aaedf58ce6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -20,6 +18,7 @@ public static void deleteASecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java index fa8f8cd73f740..3f32521275f28 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -20,6 +18,6 @@ public static void getAAnomalySecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java index a8eb1f6d60085..61cdf34046615 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -18,6 +16,6 @@ public final class SecurityMLAnalyticsSettingsListSamples { */ public static void getAllSecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); + manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java index 177a2c21f7abd..b7da6d562db7e 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/2023-02-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 73d131daaf987..403d0d116deb3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesDeleteSamples { */ public static void deleteSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java index 1e61ad09b71bd..49612b9a671cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesGetSamples { */ public static void getSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java index 089fa7920c926..ee5f344ce7d4d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -18,6 +16,6 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java deleted file mode 100644 index eedc402653a90..0000000000000 --- 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 3981370a4a6fe..0000000000000 --- 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 3479bbc73c0d5..0000000000000 --- 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 e311a8036dbac..0000000000000 --- 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 348b8fabfa696..0000000000000 --- 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 19453e0a796a1..b4cc56bb30fab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -27,6 +26,6 @@ public static void appendTagsToAThreatIntelligenceIndicator( "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java index 1934f75a9e79c..f5c5075cbd4bb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -40,9 +39,9 @@ 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); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java index 6185703dc8aaa..a8bcf3d4dd86b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -44,6 +43,6 @@ public static void updateAThreatIntelligenceIndicator( .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java index fe4c1fb359c4b..140af8c63ea53 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -20,6 +18,7 @@ public static void deleteAThreatIntelligenceIndicator( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java index 73c9f32e24191..a89f3d3e9bd65 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -20,6 +18,7 @@ public static void viewAThreatIntelligenceIndicatorByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java index d04ce8551107e..da162abd79799 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -18,6 +16,8 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { */ public static void getThreatIntelligenceIndicatorsMetrics( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager + .threatIntelligenceIndicatorMetrics() + .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java index 487339a28251a..df125109a38a8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java @@ -4,16 +4,15 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; -import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; +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/2023-02-01/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -31,15 +30,15 @@ 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))) + .withItemKey("fakeTokenPlaceholder") + .withSortOrder(ThreatIntelligenceSortingOrder.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java index 96e9c364d8e4a..188e6773f0714 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -29,6 +28,6 @@ public static void replaceTagsToAThreatIntelligence( new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java index 3ab41f9ce6d62..28a541d668fde 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -20,6 +18,6 @@ public static void getAllThreatIntelligenceIndicators( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java index f6508ac2af4a5..8539f1714d8b7 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/2023-02-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 95b63e3a64e9e..27eb7ed850e17 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java @@ -4,15 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlistItem.json */ /** - * Sample code: Delete a watchlist Item. + * Sample code: Delete a watchlist item. * * @param manager Entry point to SecurityInsightsManager. */ @@ -21,6 +19,10 @@ public static void deleteAWatchlistItem( manager .watchlistItems() .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java index e86b44a1108a0..930f03fdcef2b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -20,6 +18,10 @@ public static void getAWatchlistItem(com.azure.resourcemanager.securityinsights. manager .watchlistItems() .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "3f8901fe-63d9-4875-9ad5-9fb3b8105797", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java index 7fe192510721d..6cc19a583ab55 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -18,6 +16,6 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java index d668e090cc94b..5cf9cf14978a2 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/2023-02-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/2023-02-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 173a9fdce43f9..bad43731327b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -17,6 +15,8 @@ public final class WatchlistsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager + .watchlists() + .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java index 5de292dd4f01a..b4b0d3834fd02 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -17,6 +15,6 @@ public final class WatchlistsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java index 1ff890f70c810..4949f99fe498f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/stable/2023-02-01/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -17,6 +15,6 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE); } }