From e6f3c88632de49ad71f3c39dd6babbb95d8c0c29 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 6 Feb 2023 18:01:46 +0000 Subject: [PATCH] CodeGen from PR 22474 in Azure/azure-rest-api-specs Merge 2d7d423a69df7bb60fe247b92446f661187fe485 into 0202d2702fbe09d8d4abb3d16cec18f0e6a4969e --- .../CHANGELOG.md | 4 +- .../README.md | 27 +- .../SAMPLE.md | 1647 +++++++++++------ .../pom.xml | 2 +- .../SecurityInsightsManager.java | 117 +- .../fluent/ActionsClient.java | 44 +- .../fluent/AlertRuleOperationsClient.java | 93 + .../fluent/AlertRuleTemplatesClient.java | 12 +- .../fluent/AlertRulesClient.java | 34 +- .../fluent/AutomationRulesClient.java | 40 +- .../fluent/BookmarkOperationsClient.java | 22 +- .../fluent/BookmarkRelationsClient.java | 44 +- .../fluent/BookmarksClient.java | 36 +- ...torsCheckRequirementsOperationsClient.java | 16 +- .../fluent/DataConnectorsClient.java | 54 +- .../fluent/DomainWhoisClient.java | 10 +- .../fluent/EntitiesClient.java | 58 +- .../fluent/EntitiesGetTimelinesClient.java | 22 +- .../fluent/EntityQueriesClient.java | 42 +- .../fluent/EntityQueryTemplatesClient.java | 16 +- .../fluent/EntityRelationsClient.java | 12 +- .../fluent/FileImportsClient.java | 34 +- .../fluent/GetRecommendationsClient.java | 41 + .../GetTriggeredAnalyticsRuleRunsClient.java | 41 + .../securityinsights/fluent/GetsClient.java | 45 + .../fluent/IncidentCommentsClient.java | 40 +- .../fluent/IncidentRelationsClient.java | 44 +- .../fluent/IncidentTasksClient.java | 152 ++ .../fluent/IncidentsClient.java | 97 +- .../fluent/IpGeodatasClient.java | 10 +- .../fluent/MetadatasClient.java | 50 +- .../fluent/OfficeConsentsClient.java | 22 +- .../fluent/ProductSettingsClient.java | 44 +- .../fluent/SecurityInsights.java | 49 + .../SecurityMLAnalyticsSettingsClient.java | 38 +- .../SentinelOnboardingStatesClient.java | 44 +- .../SourceControlsOperationsClient.java | 42 +- ...eatIntelligenceIndicatorMetricsClient.java | 14 +- .../ThreatIntelligenceIndicatorsClient.java | 84 +- ...geredAnalyticsRuleRunOperationsClient.java | 46 + .../fluent/UpdatesClient.java | 98 + .../fluent/WatchlistItemsClient.java | 40 +- .../fluent/WatchlistsClient.java | 40 +- .../AadCheckRequirementsProperties.java | 4 + .../models/AadDataConnectorProperties.java | 4 + .../AatpCheckRequirementsProperties.java | 4 + .../models/AatpDataConnectorProperties.java | 4 + .../models/AccountEntityProperties.java | 4 + .../models/ActionRequestProperties.java | 4 + .../fluent/models/ActionResponseInner.java | 4 + .../models/ActionResponseProperties.java | 4 + .../ActivityEntityQueriesProperties.java | 4 + ...ActivityEntityQueryTemplateProperties.java | 4 + .../fluent/models/AlertRuleInner.java | 4 + .../fluent/models/AlertRuleTemplateInner.java | 4 + .../AnalyticsRuleRunTriggerProperties.java | 60 + .../models/AnomaliesSettingsProperties.java | 4 + ...SecurityMLAnalyticsSettingsProperties.java | 4 + .../fluent/models/ApiPollingParameters.java | 4 + .../AscCheckRequirementsProperties.java | 4 + .../models/AscDataConnectorProperties.java | 4 + .../fluent/models/AutomationRuleInner.java | 4 + .../models/AutomationRuleProperties.java | 4 + .../AwsCloudTrailDataConnectorProperties.java | 4 + .../models/AwsS3DataConnectorProperties.java | 4 + .../models/AzureResourceEntityProperties.java | 4 + .../models/BookmarkExpandResponseInner.java | 4 + .../fluent/models/BookmarkInner.java | 4 + .../fluent/models/BookmarkProperties.java | 4 + .../CloudApplicationEntityProperties.java | 4 + .../fluent/models/CodelessParameters.java | 4 + .../fluent/models/DataConnectorInner.java | 8 + .../DataConnectorRequirementsStateInner.java | 4 + .../fluent/models/DnsEntityProperties.java | 4 + ...ynamics365CheckRequirementsProperties.java | 4 + .../Dynamics365DataConnectorProperties.java | 4 + .../models/EnrichmentDomainWhoisInner.java | 4 + .../models/EnrichmentIpGeodataInner.java | 4 + .../models/EntityAnalyticsProperties.java | 4 + .../models/EntityExpandResponseInner.java | 4 + .../EntityGetInsightsResponseInner.java | 4 + .../fluent/models/EntityInner.java | 4 + .../fluent/models/EntityQueryInner.java | 4 + .../models/EntityQueryTemplateInner.java | 4 + .../models/EntityTimelineResponseInner.java | 4 + .../ExpansionEntityQueriesProperties.java | 4 + .../models/EyesOnSettingsProperties.java | 4 + .../fluent/models/FileEntityProperties.java | 4 + .../models/FileHashEntityProperties.java | 4 + .../fluent/models/FileImportInner.java | 4 + .../fluent/models/FileImportProperties.java | 4 + .../models/FusionAlertRuleProperties.java | 4 + .../FusionAlertRuleTemplateProperties.java | 4 + .../models/GetQueriesResponseInner.java | 4 + .../fluent/models/HostEntityProperties.java | 4 + .../models/HuntingBookmarkProperties.java | 4 + .../fluent/models/IncidentAlertListInner.java | 4 + .../models/IncidentBookmarkListInner.java | 4 + .../fluent/models/IncidentCommentInner.java | 40 +- .../models/IncidentCommentProperties.java | 48 +- .../models/IncidentEntitiesResponseInner.java | 4 + .../fluent/models/IncidentInner.java | 284 +-- .../models/IncidentPropertiesInner.java | 396 ++-- .../fluent/models/IncidentTaskInner.java | 196 ++ .../fluent/models/IncidentTaskProperties.java | 206 +++ .../IoTCheckRequirementsProperties.java | 4 + .../models/IoTDataConnectorProperties.java | 4 + .../models/IoTDeviceEntityProperties.java | 4 + .../fluent/models/IpEntityProperties.java | 4 + ...LBehaviorAnalyticsAlertRuleProperties.java | 4 + ...rAnalyticsAlertRuleTemplateProperties.java | 4 + .../models/MailClusterEntityProperties.java | 4 + .../models/MailMessageEntityProperties.java | 4 + .../models/MailboxEntityProperties.java | 4 + .../models/MalwareEntityProperties.java | 4 + .../McasCheckRequirementsProperties.java | 4 + .../models/McasDataConnectorProperties.java | 4 + .../MdatpCheckRequirementsProperties.java | 4 + .../models/MdatpDataConnectorProperties.java | 4 + .../fluent/models/MetadataModelInner.java | 4 + .../fluent/models/MetadataProperties.java | 4 + .../models/MetadataPropertiesPatch.java | 4 + ...ProtectionCheckRequirementsProperties.java | 33 + ...tionProtectionDataConnectorProperties.java | 75 + ...tyIncidentCreationAlertRuleProperties.java | 4 + ...ntCreationAlertRuleTemplateProperties.java | 4 + .../MstiCheckRequirementsProperties.java | 4 + .../models/MstiDataConnectorProperties.java | 4 + .../MtpCheckRequirementsProperties.java | 4 + .../models/MtpDataConnectorProperties.java | 34 + .../fluent/models/NicEntityProperties.java | 4 + .../fluent/models/NrtAlertRuleProperties.java | 34 + .../NrtAlertRuleTemplateProperties.java | 35 + ...365ProjectCheckRequirementsProperties.java | 4 + ...fice365ProjectDataConnectorProperties.java | 4 + .../OfficeAtpCheckRequirementsProperties.java | 4 + .../OfficeAtpDataConnectorProperties.java | 4 + .../fluent/models/OfficeConsentInner.java | 4 + .../models/OfficeConsentProperties.java | 4 + .../models/OfficeDataConnectorProperties.java | 4 + .../OfficeIrmCheckRequirementsProperties.java | 4 + .../OfficeIrmDataConnectorProperties.java | 4 + ...icePowerBICheckRequirementsProperties.java | 4 + .../OfficePowerBIDataConnectorProperties.java | 4 + .../fluent/models/OperationInner.java | 4 + .../models/ProcessEntityProperties.java | 4 + .../fluent/models/RecommendationInner.java | 612 ++++++ .../models/RecommendationListInner.java | 54 + .../models/RegistryKeyEntityProperties.java | 4 + .../models/RegistryValueEntityProperties.java | 4 + .../fluent/models/RelationInner.java | 4 + .../fluent/models/RelationProperties.java | 4 + .../fluent/models/RepoInner.java | 4 + .../models/ScheduledAlertRuleProperties.java | 13 + .../ScheduledAlertRuleTemplateProperties.java | 35 + .../models/SecurityAlertProperties.java | 4 + .../models/SecurityGroupEntityProperties.java | 4 + .../SecurityMLAnalyticsSettingInner.java | 4 + .../models/SentinelOnboardingStateInner.java | 4 + .../SentinelOnboardingStateProperties.java | 4 + .../SentinelOnboardingStatesListInner.java | 4 + .../fluent/models/SettingListInner.java | 4 + .../fluent/models/SettingsInner.java | 4 + .../fluent/models/SourceControlInner.java | 4 + .../models/SourceControlProperties.java | 4 + .../SubmissionMailEntityProperties.java | 4 + .../models/TICheckRequirementsProperties.java | 4 + .../models/TIDataConnectorProperties.java | 4 + .../fluent/models/TeamInformationInner.java | 4 + ...ThreatIntelligenceAlertRuleProperties.java | 4 + ...telligenceAlertRuleTemplateProperties.java | 4 + ...ThreatIntelligenceIndicatorProperties.java | 4 + .../ThreatIntelligenceInformationInner.java | 4 + .../ThreatIntelligenceMetricsListInner.java | 4 + .../TiTaxiiCheckRequirementsProperties.java | 4 + .../TiTaxiiDataConnectorProperties.java | 4 + .../TriggeredAnalyticsRuleRunInner.java | 178 ++ .../TriggeredAnalyticsRuleRunProperties.java | 187 ++ .../fluent/models/UebaProperties.java | 4 + .../fluent/models/UrlEntityProperties.java | 4 + .../fluent/models/WatchlistInner.java | 4 + .../fluent/models/WatchlistItemInner.java | 4 + .../models/WatchlistItemProperties.java | 4 + .../fluent/models/WatchlistProperties.java | 4 + .../implementation/ActionsClientImpl.java | 63 +- .../implementation/ActionsImpl.java | 22 +- .../AlertRuleOperationsClientImpl.java | 404 ++++ .../AlertRuleOperationsImpl.java | 53 + .../AlertRuleTemplatesClientImpl.java | 18 +- .../AlertRuleTemplatesImpl.java | 18 +- .../implementation/AlertRulesClientImpl.java | 50 +- .../implementation/AlertRulesImpl.java | 28 +- .../AutomationRulesClientImpl.java | 87 +- .../implementation/AutomationRulesImpl.java | 22 +- .../BookmarkOperationsClientImpl.java | 28 +- .../BookmarkOperationsImpl.java | 22 +- .../BookmarkRelationsClientImpl.java | 58 +- .../implementation/BookmarkRelationsImpl.java | 22 +- .../implementation/BookmarksClientImpl.java | 51 +- .../implementation/BookmarksImpl.java | 22 +- ...CheckRequirementsOperationsClientImpl.java | 25 +- ...ectorsCheckRequirementsOperationsImpl.java | 26 +- .../DataConnectorsClientImpl.java | 104 +- .../implementation/DataConnectorsImpl.java | 40 +- .../implementation/DomainWhoisClientImpl.java | 18 +- .../implementation/DomainWhoisImpl.java | 18 +- .../implementation/EntitiesClientImpl.java | 88 +- .../EntitiesGetTimelinesClientImpl.java | 28 +- .../EntitiesGetTimelinesImpl.java | 22 +- .../implementation/EntitiesImpl.java | 46 +- .../EntitiesRelationsClientImpl.java | 2 +- .../EntityQueriesClientImpl.java | 61 +- .../implementation/EntityQueriesImpl.java | 30 +- .../EntityQueryTemplatesClientImpl.java | 36 +- .../EntityQueryTemplatesImpl.java | 24 +- .../EntityRelationsClientImpl.java | 21 +- .../implementation/EntityRelationsImpl.java | 20 +- .../implementation/FileImportsClientImpl.java | 48 +- .../implementation/FileImportsImpl.java | 18 +- .../GetRecommendationsClientImpl.java | 210 +++ .../GetRecommendationsImpl.java | 61 + ...tTriggeredAnalyticsRuleRunsClientImpl.java | 345 ++++ .../GetTriggeredAnalyticsRuleRunsImpl.java | 49 + .../implementation/GetsClientImpl.java | 231 +++ .../implementation/GetsImpl.java | 64 + .../implementation/IncidentCommentImpl.java | 8 +- .../IncidentCommentsClientImpl.java | 66 +- .../implementation/IncidentCommentsImpl.java | 26 +- .../implementation/IncidentImpl.java | 151 +- .../IncidentPropertiesImpl.java | 72 +- .../IncidentRelationsClientImpl.java | 58 +- .../implementation/IncidentRelationsImpl.java | 38 +- .../implementation/IncidentTaskImpl.java | 209 +++ .../IncidentTasksClientImpl.java | 962 ++++++++++ .../implementation/IncidentTasksImpl.java | 225 +++ .../implementation/IncidentsClientImpl.java | 198 +- .../implementation/IncidentsImpl.java | 73 +- .../implementation/IpGeodatasClientImpl.java | 18 +- .../implementation/IpGeodatasImpl.java | 18 +- .../implementation/MetadatasClientImpl.java | 85 +- .../implementation/MetadatasImpl.java | 22 +- .../OfficeConsentsClientImpl.java | 32 +- .../implementation/OfficeConsentsImpl.java | 22 +- .../implementation/OperationsClientImpl.java | 2 +- .../ProductSettingsClientImpl.java | 66 +- .../implementation/ProductSettingsImpl.java | 44 +- .../implementation/RecommendationImpl.java | 127 ++ .../RecommendationListImpl.java | 48 + .../implementation/SecurityInsightsImpl.java | 100 +- ...SecurityMLAnalyticsSettingsClientImpl.java | 59 +- .../SecurityMLAnalyticsSettingsImpl.java | 40 +- .../SentinelOnboardingStatesClientImpl.java | 109 +- .../SentinelOnboardingStatesImpl.java | 40 +- .../SourceControlsClientImpl.java | 2 +- .../SourceControlsOperationsClientImpl.java | 61 +- .../SourceControlsOperationsImpl.java | 22 +- ...ntelligenceIndicatorMetricsClientImpl.java | 20 +- ...hreatIntelligenceIndicatorMetricsImpl.java | 18 +- ...hreatIntelligenceIndicatorsClientImpl.java | 130 +- .../ThreatIntelligenceIndicatorsImpl.java | 78 +- ...ligenceIndicatorsOperationsClientImpl.java | 2 +- .../TriggeredAnalyticsRuleRunImpl.java | 79 + ...dAnalyticsRuleRunOperationsClientImpl.java | 233 +++ ...iggeredAnalyticsRuleRunOperationsImpl.java | 61 + .../implementation/UpdatesClientImpl.java | 410 ++++ .../implementation/UpdatesImpl.java | 70 + .../WatchlistItemsClientImpl.java | 78 +- .../implementation/WatchlistItemsImpl.java | 26 +- .../implementation/WatchlistsClientImpl.java | 57 +- .../implementation/WatchlistsImpl.java | 22 +- .../models/AadCheckRequirements.java | 27 + .../models/AadDataConnector.java | 4 + .../models/AatpCheckRequirements.java | 27 + .../models/AatpDataConnector.java | 4 + .../models/AccountEntity.java | 8 +- .../models/ActionPropertiesBase.java | 4 + .../models/ActionRequest.java | 4 + .../securityinsights/models/ActionType.java | 12 + .../securityinsights/models/Actions.java | 22 +- .../securityinsights/models/ActionsList.java | 4 + .../models/ActivityCustomEntityQuery.java | 4 + ...tityQueriesPropertiesQueryDefinitions.java | 4 + .../models/ActivityEntityQuery.java | 4 + .../models/ActivityEntityQueryTemplate.java | 4 + ...eryTemplatePropertiesQueryDefinitions.java | 4 + .../models/ActivityTimelineItem.java | 4 + .../AddIncidentTaskActionProperties.java | 85 + .../securityinsights/models/AlertDetail.java | 9 + .../models/AlertDetailsOverride.java | 34 + .../models/AlertProperty.java | 68 + .../models/AlertPropertyMapping.java | 76 + .../models/AlertRuleKind.java | 9 + .../models/AlertRuleOperations.java | 46 + .../models/AlertRuleTemplateDataSource.java | 4 + .../AlertRuleTemplatePropertiesBase.java | 4 + .../AlertRuleTemplateWithMitreProperties.java | 4 + .../models/AlertRuleTemplates.java | 12 +- .../models/AlertRuleTemplatesList.java | 4 + .../securityinsights/models/AlertRules.java | 30 +- .../models/AlertRulesList.java | 4 + .../models/AlertSeverity.java | 9 + .../securityinsights/models/AlertStatus.java | 9 + .../models/AlertsDataTypeOfDataConnector.java | 4 + .../models/AnalyticsRuleRunTrigger.java | 75 + .../securityinsights/models/Anomalies.java | 4 + .../AnomalySecurityMLAnalyticsSettings.java | 4 + .../models/AnomalyTimelineItem.java | 4 + .../models/AntispamMailDirection.java | 9 + .../models/AscCheckRequirements.java | 4 + .../models/AscDataConnector.java | 4 + .../securityinsights/models/AttackTactic.java | 9 + .../models/AutomationRuleAction.java | 5 + .../AutomationRuleAddIncidentTaskAction.java | 67 + .../AutomationRuleBooleanCondition.java | 4 + ...RuleBooleanConditionSupportedOperator.java | 9 + .../models/AutomationRuleCondition.java | 4 + .../AutomationRuleModifyPropertiesAction.java | 4 + ...rayChangedConditionSupportedArrayType.java | 9 + ...ayChangedConditionSupportedChangeType.java | 9 + ...lePropertyArrayChangedValuesCondition.java | 4 + ...yConditionSupportedArrayConditionType.java | 9 + ...pertyArrayConditionSupportedArrayType.java | 9 + ...ationRulePropertyArrayValuesCondition.java | 4 + ...yChangedConditionSupportedChangedType.java | 9 + ...ChangedConditionSupportedPropertyType.java | 9 + ...ulePropertyConditionSupportedOperator.java | 9 + ...ulePropertyConditionSupportedProperty.java | 9 + ...ionRulePropertyValuesChangedCondition.java | 4 + ...AutomationRulePropertyValuesCondition.java | 4 + .../AutomationRuleRunPlaybookAction.java | 4 + .../models/AutomationRuleTriggeringLogic.java | 4 + .../models/AutomationRules.java | 24 +- .../models/AutomationRulesList.java | 4 + .../securityinsights/models/Availability.java | 4 + .../AwsCloudTrailCheckRequirements.java | 4 + .../models/AwsCloudTrailDataConnector.java | 4 + .../AwsCloudTrailDataConnectorDataTypes.java | 4 + ...sCloudTrailDataConnectorDataTypesLogs.java | 4 + .../models/AwsS3CheckRequirements.java | 4 + .../models/AwsS3DataConnector.java | 4 + .../models/AwsS3DataConnectorDataTypes.java | 4 + .../AwsS3DataConnectorDataTypesLogs.java | 4 + .../models/AzureDevOpsResourceInfo.java | 4 + .../models/AzureResourceEntity.java | 8 +- .../models/BookmarkEntityMappings.java | 4 + .../models/BookmarkExpandParameters.java | 4 + .../models/BookmarkExpandResponseValue.java | 4 + .../securityinsights/models/BookmarkList.java | 4 + .../models/BookmarkOperations.java | 22 +- .../models/BookmarkRelations.java | 22 +- .../models/BookmarkTimelineItem.java | 4 + .../securityinsights/models/Bookmarks.java | 22 +- .../models/BooleanConditionProperties.java | 4 + .../securityinsights/models/Category.java | 56 + .../securityinsights/models/ClientInfo.java | 4 + .../models/CloudApplicationEntity.java | 8 +- .../CodelessApiPollingDataConnector.java | 4 + ...odelessConnectorPollingAuthProperties.java | 4 + ...elessConnectorPollingConfigProperties.java | 4 + ...elessConnectorPollingPagingProperties.java | 4 + ...lessConnectorPollingRequestProperties.java | 4 + ...essConnectorPollingResponseProperties.java | 4 + .../CodelessUiConnectorConfigProperties.java | 4 + ...figPropertiesConnectivityCriteriaItem.java | 4 + ...onnectorConfigPropertiesDataTypesItem.java | 4 + ...ectorConfigPropertiesGraphQueriesItem.java | 4 + ...rConfigPropertiesInstructionStepsItem.java | 4 + ...ctorConfigPropertiesSampleQueriesItem.java | 4 + .../models/CodelessUiDataConnector.java | 4 + .../models/ConditionType.java | 9 + .../models/ConfidenceLevel.java | 9 + .../models/ConfidenceScoreStatus.java | 9 + .../models/ConnectAuthKind.java | 9 + .../models/ConnectedEntity.java | 4 + .../models/ConnectivityCriteria.java | 4 + .../models/ConnectivityType.java | 9 + .../models/ConnectorInstructionModelBase.java | 4 + .../{Constant88.java => Constant96.java} | 18 +- .../securityinsights/models/Content.java | 88 + .../models/ContentPathMap.java | 4 + .../securityinsights/models/ContentType.java | 9 + .../securityinsights/models/Context.java | 53 + .../models/CustomEntityQuery.java | 4 + .../models/CustomEntityQueryKind.java | 9 + .../securityinsights/models/Customs.java | 4 + .../models/CustomsPermission.java | 4 + .../DataConnectorAuthorizationState.java | 9 + .../models/DataConnectorConnectBody.java | 4 + .../models/DataConnectorDataTypeCommon.java | 4 + .../models/DataConnectorKind.java | 13 + .../models/DataConnectorLicenseState.java | 9 + .../models/DataConnectorList.java | 4 + .../models/DataConnectorTenantId.java | 4 + .../DataConnectorWithAlertsProperties.java | 4 + .../models/DataConnectors.java | 52 +- .../DataConnectorsCheckRequirements.java | 7 + ...ConnectorsCheckRequirementsOperations.java | 16 +- .../models/DataTypeDefinitions.java | 4 + .../models/DataTypeState.java | 9 + .../securityinsights/models/DeleteStatus.java | 9 + .../securityinsights/models/Deployment.java | 4 + .../models/DeploymentFetchStatus.java | 9 + .../models/DeploymentInfo.java | 4 + .../models/DeploymentResult.java | 9 + .../models/DeploymentState.java | 9 + .../models/DeviceImportance.java | 9 + .../securityinsights/models/DnsEntity.java | 8 +- .../securityinsights/models/DomainWhois.java | 10 +- .../models/Dynamics365CheckRequirements.java | 27 + .../models/Dynamics365DataConnector.java | 4 + .../Dynamics365DataConnectorDataTypes.java | 4 + ...ctorDataTypesDynamics365CdsActivities.java | 4 + .../models/EnrichmentDomainWhoisContact.java | 4 + .../models/EnrichmentDomainWhoisContacts.java | 4 + .../models/EnrichmentDomainWhoisDetails.java | 4 + ...EnrichmentDomainWhoisRegistrarDetails.java | 4 + .../securityinsights/models/Entities.java | 56 +- .../models/EntitiesGetTimelines.java | 22 +- .../models/EntityAnalytics.java | 4 + .../models/EntityCommonProperties.java | 4 + .../securityinsights/models/EntityEdges.java | 4 + .../models/EntityExpandParameters.java | 4 + .../models/EntityExpandResponseValue.java | 4 + .../models/EntityFieldMapping.java | 4 + .../models/EntityGetInsightsParameters.java | 4 + .../models/EntityInsightItem.java | 4 + .../EntityInsightItemQueryTimeInterval.java | 4 + .../models/EntityItemQueryKind.java | 9 + .../securityinsights/models/EntityKind.java | 9 + .../securityinsights/models/EntityList.java | 4 + .../models/EntityMapping.java | 4 + .../models/EntityMappingType.java | 9 + .../models/EntityProviders.java | 9 + .../models/EntityQueries.java | 40 +- .../models/EntityQueriesKind.java | 9 + .../models/EntityQueryItem.java | 4 + .../models/EntityQueryItemProperties.java | 4 + ...ntityQueryItemPropertiesDataTypesItem.java | 4 + .../models/EntityQueryKind.java | 9 + .../models/EntityQueryList.java | 4 + .../models/EntityQueryTemplateKind.java | 9 + .../models/EntityQueryTemplateList.java | 4 + .../models/EntityQueryTemplates.java | 14 +- .../models/EntityRelations.java | 12 +- .../models/EntityTimelineItem.java | 4 + .../models/EntityTimelineKind.java | 9 + .../models/EntityTimelineParameters.java | 4 + .../securityinsights/models/EntityType.java | 9 + .../models/EventGroupingAggregationKind.java | 9 + .../models/EventGroupingSettings.java | 4 + .../models/ExpansionEntityQuery.java | 4 + .../models/ExpansionResultAggregation.java | 4 + .../models/ExpansionResultsMetadata.java | 4 + .../securityinsights/models/EyesOn.java | 4 + .../securityinsights/models/FieldMapping.java | 4 + .../securityinsights/models/FileEntity.java | 8 +- .../securityinsights/models/FileFormat.java | 9 + .../models/FileHashAlgorithm.java | 9 + .../models/FileHashEntity.java | 8 +- .../models/FileImportContentType.java | 9 + .../models/FileImportList.java | 4 + .../models/FileImportState.java | 9 + .../securityinsights/models/FileImports.java | 12 +- .../securityinsights/models/FileMetadata.java | 4 + .../models/FusionAlertRule.java | 4 + .../models/FusionAlertRuleTemplate.java | 4 + .../FusionScenarioExclusionPattern.java | 4 + .../models/FusionSourceSettings.java | 4 + .../models/FusionSourceSubTypeSetting.java | 4 + .../models/FusionSubTypeSeverityFilter.java | 4 + .../FusionSubTypeSeverityFiltersItem.java | 4 + .../models/FusionTemplateSourceSetting.java | 4 + .../models/FusionTemplateSourceSubType.java | 4 + .../FusionTemplateSubTypeSeverityFilter.java | 4 + .../securityinsights/models/GeoLocation.java | 4 + .../models/GetInsightsError.java | 9 + .../models/GetInsightsErrorKind.java | 4 + .../models/GetInsightsResultsMetadata.java | 4 + .../models/GetRecommendations.java | 36 + .../models/GetTriggeredAnalyticsRuleRuns.java | 36 + .../securityinsights/models/Gets.java | 40 + .../models/GitHubResourceInfo.java | 4 + .../securityinsights/models/GraphQueries.java | 4 + .../models/GroupingConfiguration.java | 4 + .../securityinsights/models/HostEntity.java | 4 + .../models/HuntingBookmark.java | 4 + .../securityinsights/models/Incident.java | 448 ++--- .../models/IncidentAdditionalData.java | 38 +- .../models/IncidentClassification.java | 9 + .../models/IncidentClassificationReason.java | 9 + .../models/IncidentComment.java | 14 +- .../models/IncidentCommentList.java | 36 +- .../models/IncidentComments.java | 22 +- .../models/IncidentConfiguration.java | 4 + .../IncidentEntitiesResultsMetadata.java | 46 +- .../securityinsights/models/IncidentInfo.java | 4 + .../models/IncidentLabel.java | 4 + .../models/IncidentLabelType.java | 9 + .../securityinsights/models/IncidentList.java | 34 +- .../models/IncidentOwnerInfo.java | 4 + .../models/IncidentProperties.java | 112 +- .../models/IncidentPropertiesAction.java | 4 + .../models/IncidentRelations.java | 42 +- .../models/IncidentSeverity.java | 9 + .../models/IncidentStatus.java | 9 + .../securityinsights/models/IncidentTask.java | 331 ++++ .../models/IncidentTaskList.java | 81 + .../models/IncidentTaskStatus.java | 47 + .../models/IncidentTasks.java | 152 ++ .../securityinsights/models/Incidents.java | 83 +- .../models/IngestionMode.java | 9 + .../models/InsightQueryItem.java | 4 + .../models/InsightQueryItemProperties.java | 4 + ...ghtQueryItemPropertiesAdditionalQuery.java | 4 + ...htQueryItemPropertiesDefaultTimeRange.java | 4 + ...QueryItemPropertiesReferenceTimeRange.java | 4 + .../InsightQueryItemPropertiesTableQuery.java | 4 + ...rtiesTableQueryColumnsDefinitionsItem.java | 4 + ...rtiesTableQueryQueriesDefinitionsItem.java | 4 + ...QueriesDefinitionsPropertiesItemsItem.java | 4 + .../models/InsightsTableResult.java | 4 + .../InsightsTableResultColumnsItem.java | 4 + .../models/InstructionSteps.java | 4 + .../InstructionStepsInstructionsItem.java | 4 + .../securityinsights/models/Instructions.java | 117 ++ .../models/IoTCheckRequirements.java | 4 + .../models/IoTDataConnector.java | 4 + .../models/IoTDeviceEntity.java | 4 + .../securityinsights/models/IpEntity.java | 8 +- .../securityinsights/models/IpGeodatas.java | 10 +- .../models/KillChainIntent.java | 11 +- .../securityinsights/models/Kind.java | 9 + .../models/LastDataReceivedDataType.java | 4 + .../models/MLBehaviorAnalyticsAlertRule.java | 4 + .../MLBehaviorAnalyticsAlertRuleTemplate.java | 4 + .../models/MailClusterEntity.java | 8 +- .../models/MailMessageEntity.java | 4 + .../models/MailboxEntity.java | 8 +- .../models/MalwareEntity.java | 8 +- .../models/ManualTriggerRequestBody.java | 4 + .../models/MatchingMethod.java | 9 + .../models/McasCheckRequirements.java | 27 + .../models/McasDataConnector.java | 4 + .../models/McasDataConnectorDataTypes.java | 4 + .../models/MdatpCheckRequirements.java | 27 + .../models/MdatpDataConnector.java | 4 + .../models/MetadataAuthor.java | 4 + .../models/MetadataCategories.java | 4 + .../models/MetadataDependencies.java | 4 + .../securityinsights/models/MetadataList.java | 4 + .../models/MetadataPatch.java | 4 + .../models/MetadataSource.java | 4 + .../models/MetadataSupport.java | 4 + .../securityinsights/models/Metadatas.java | 22 +- ...nformationProtectionCheckRequirements.java | 72 + ...formationProtectionConnectorDataTypes.java | 64 + ...ationProtectionConnectorDataTypesLogs.java | 32 + ...iewInformationProtectionDataConnector.java | 104 ++ ...softSecurityIncidentCreationAlertRule.java | 4 + ...dentCreationAlertRuleCommonProperties.java | 4 + ...rityIncidentCreationAlertRuleTemplate.java | 4 + .../models/MicrosoftSecurityProductName.java | 9 + .../models/MstiCheckRequirements.java | 27 + .../models/MstiDataConnector.java | 4 + .../models/MstiDataConnectorDataTypes.java | 4 + ...nnectorDataTypesBingSafetyPhishingUrl.java | 4 + ...rDataTypesMicrosoftEmergingThreatFeed.java | 4 + .../models/MtpCheckRequirements.java | 27 + .../models/MtpDataConnector.java | 27 + .../models/MtpDataConnectorDataTypes.java | 39 +- .../MtpDataConnectorDataTypesAlerts.java | 32 + .../MtpDataConnectorDataTypesIncidents.java | 6 +- .../models/MtpFilteredProviders.java | 62 + .../securityinsights/models/MtpProvider.java | 47 + .../securityinsights/models/NicEntity.java | 8 +- .../securityinsights/models/NrtAlertRule.java | 27 + .../models/NrtAlertRuleTemplate.java | 27 + .../Office365ProjectCheckRequirements.java | 27 + .../Office365ProjectConnectorDataTypes.java | 4 + ...ffice365ProjectConnectorDataTypesLogs.java | 4 + .../models/Office365ProjectDataConnector.java | 4 + .../models/OfficeAtpCheckRequirements.java | 27 + .../models/OfficeAtpDataConnector.java | 4 + .../models/OfficeConsentList.java | 4 + .../models/OfficeConsents.java | 22 +- .../models/OfficeDataConnector.java | 4 + .../models/OfficeDataConnectorDataTypes.java | 4 + .../OfficeDataConnectorDataTypesExchange.java | 4 + ...fficeDataConnectorDataTypesSharePoint.java | 4 + .../OfficeDataConnectorDataTypesTeams.java | 4 + .../models/OfficeIrmCheckRequirements.java | 27 + .../models/OfficeIrmDataConnector.java | 4 + .../OfficePowerBICheckRequirements.java | 27 + .../OfficePowerBIConnectorDataTypes.java | 4 + .../OfficePowerBIConnectorDataTypesLogs.java | 4 + .../models/OfficePowerBIDataConnector.java | 4 + .../models/OperationDisplay.java | 4 + .../models/OperationsList.java | 4 + .../securityinsights/models/Operator.java | 9 + .../securityinsights/models/OutputType.java | 9 + .../securityinsights/models/OwnerType.java | 9 + .../models/PermissionProviderScope.java | 9 + .../securityinsights/models/Permissions.java | 4 + .../models/PermissionsCustomsItem.java | 4 + .../PermissionsResourceProviderItem.java | 4 + .../models/PlaybookActionProperties.java | 4 + .../models/PollingFrequency.java | 9 + .../securityinsights/models/Priority.java | 50 + .../models/ProcessEntity.java | 4 + .../models/ProductSettings.java | 44 +- ...opertyArrayChangedConditionProperties.java | 4 + .../PropertyArrayConditionProperties.java | 4 + .../PropertyChangedConditionProperties.java | 4 + .../models/PropertyConditionProperties.java | 4 + .../securityinsights/models/ProviderName.java | 9 + .../models/ProvisioningState.java | 56 + ...QueryBasedAlertRuleTemplateProperties.java | 34 + .../models/Recommendation.java | 155 ++ .../models/RecommendationList.java | 25 + .../models/RecommendationPatch.java | 77 + .../models/RecommendedAction.java | 115 ++ .../securityinsights/models/RegistryHive.java | 9 + .../models/RegistryKeyEntity.java | 8 +- .../models/RegistryValueEntity.java | 8 +- .../models/RegistryValueKind.java | 9 + .../securityinsights/models/RelationList.java | 4 + .../securityinsights/models/RepoList.java | 4 + .../securityinsights/models/RepoType.java | 9 + .../securityinsights/models/Repository.java | 4 + .../models/RepositoryResourceInfo.java | 4 + .../models/RequiredPermissions.java | 4 + .../models/ResourceProvider.java | 4 + .../models/ResourceWithEtag.java | 4 + .../models/SampleQueries.java | 4 + .../models/ScheduledAlertRule.java | 27 + .../ScheduledAlertRuleCommonProperties.java | 34 + .../models/ScheduledAlertRuleTemplate.java | 28 + .../models/SecurityAlert.java | 4 + ...yAlertPropertiesConfidenceReasonsItem.java | 4 + .../models/SecurityAlertTimelineItem.java | 46 + .../models/SecurityGroupEntity.java | 8 +- .../models/SecurityMLAnalyticsSettings.java | 38 +- ...SecurityMLAnalyticsSettingsDataSource.java | 4 + .../SecurityMLAnalyticsSettingsKind.java | 9 + .../SecurityMLAnalyticsSettingsList.java | 4 + .../models/SentinelEntityMapping.java | 50 + .../models/SentinelOnboardingStates.java | 34 +- .../securityinsights/models/SettingKind.java | 9 + .../securityinsights/models/SettingType.java | 9 + .../models/SettingsStatus.java | 9 + .../models/SourceControlList.java | 4 + .../models/SourceControlsOperations.java | 22 +- .../securityinsights/models/SourceKind.java | 9 + .../securityinsights/models/SourceType.java | 9 + .../securityinsights/models/State.java | 56 + .../models/SubmissionMailEntity.java | 8 +- .../securityinsights/models/SupportTier.java | 9 + .../models/TICheckRequirements.java | 27 + .../models/TIDataConnector.java | 4 + .../models/TIDataConnectorDataTypes.java | 4 + .../TIDataConnectorDataTypesIndicators.java | 4 + .../models/TeamProperties.java | 134 -- .../models/TemplateStatus.java | 9 + .../models/ThreatIntelligence.java | 4 + .../models/ThreatIntelligenceAlertRule.java | 4 + .../ThreatIntelligenceAlertRuleTemplate.java | 4 + .../models/ThreatIntelligenceAppendTags.java | 4 + .../ThreatIntelligenceExternalReference.java | 4 + .../ThreatIntelligenceFilteringCriteria.java | 4 + ...hreatIntelligenceGranularMarkingModel.java | 4 + .../ThreatIntelligenceIndicatorMetrics.java | 14 +- .../ThreatIntelligenceIndicatorModel.java | 4 + .../models/ThreatIntelligenceIndicators.java | 82 +- .../ThreatIntelligenceInformationList.java | 4 + .../ThreatIntelligenceKillChainPhase.java | 4 + .../models/ThreatIntelligenceMetric.java | 4 + .../ThreatIntelligenceMetricEntity.java | 4 + .../models/ThreatIntelligenceMetrics.java | 4 + .../ThreatIntelligenceParsedPattern.java | 4 + ...eatIntelligenceParsedPatternTypeValue.java | 4 + .../ThreatIntelligenceResourceKindEnum.java | 9 + .../ThreatIntelligenceSortingCriteria.java | 4 + ...ThreatIntelligenceSortingCriteriaEnum.java | 9 + .../models/TiTaxiiCheckRequirements.java | 27 + .../models/TiTaxiiDataConnector.java | 4 + .../models/TiTaxiiDataConnectorDataTypes.java | 4 + ...axiiDataConnectorDataTypesTaxiiClient.java | 4 + .../models/TimelineAggregation.java | 4 + .../models/TimelineError.java | 4 + .../models/TimelineResultsMetadata.java | 4 + .../models/TriggeredAnalyticsRuleRun.java | 90 + .../TriggeredAnalyticsRuleRunOperations.java | 39 + .../models/TriggeredAnalyticsRuleRuns.java | 78 + .../securityinsights/models/TriggersOn.java | 9 + .../securityinsights/models/TriggersWhen.java | 9 + .../securityinsights/models/Ueba.java | 4 + .../models/UebaDataSources.java | 9 + .../securityinsights/models/Updates.java | 50 + .../securityinsights/models/UrlEntity.java | 8 +- .../securityinsights/models/UserInfo.java | 4 + .../models/ValidationError.java | 4 + .../securityinsights/models/Version.java | 9 + .../models/WatchlistItemList.java | 4 + .../models/WatchlistItems.java | 22 +- .../models/WatchlistList.java | 4 + .../securityinsights/models/Watchlists.java | 22 +- .../WatchlistsCreateOrUpdateHeaders.java | 5 +- .../models/WatchlistsDeleteHeaders.java | 5 +- .../securityinsights/models/Webhook.java | 4 + .../ActionsCreateOrUpdateSamples.java | 2 +- .../generated/ActionsDeleteSamples.java | 6 +- .../generated/ActionsGetSamples.java | 6 +- .../ActionsListByAlertRuleSamples.java | 9 +- ...ertRuleOperationTriggerRuleRunSamples.java | 30 + .../AlertRuleTemplatesGetSamples.java | 7 +- .../AlertRuleTemplatesListSamples.java | 6 +- .../AlertRulesCreateOrUpdateSamples.java | 40 +- .../generated/AlertRulesDeleteSamples.java | 7 +- .../generated/AlertRulesGetSamples.java | 26 +- .../generated/AlertRulesListSamples.java | 6 +- .../AutomationRulesCreateOrUpdateSamples.java | 2 +- .../AutomationRulesDeleteSamples.java | 7 +- .../generated/AutomationRulesGetSamples.java | 7 +- .../generated/AutomationRulesListSamples.java | 6 +- .../BookmarkOperationExpandSamples.java | 5 +- ...ookmarkRelationsCreateOrUpdateSamples.java | 2 +- .../BookmarkRelationsDeleteSamples.java | 6 +- .../BookmarkRelationsGetSamples.java | 6 +- .../BookmarkRelationsListSamples.java | 14 +- .../BookmarksCreateOrUpdateSamples.java | 2 +- .../generated/BookmarksDeleteSamples.java | 7 +- .../generated/BookmarksGetSamples.java | 7 +- .../generated/BookmarksListSamples.java | 6 +- ...CheckRequirementsOperationPostSamples.java | 142 +- .../DataConnectorsConnectSamples.java | 13 +- .../DataConnectorsCreateOrUpdateSamples.java | 104 +- .../DataConnectorsDeleteSamples.java | 43 +- .../DataConnectorsDisconnectSamples.java | 7 +- .../generated/DataConnectorsGetSamples.java | 118 +- .../generated/DataConnectorsListSamples.java | 6 +- .../generated/DomainWhoisGetSamples.java | 6 +- .../generated/EntitiesExpandSamples.java | 5 +- .../generated/EntitiesGetInsightsSamples.java | 5 +- .../generated/EntitiesGetSamples.java | 142 +- .../EntitiesGetTimelineListSamples.java | 5 +- .../generated/EntitiesListSamples.java | 6 +- .../generated/EntitiesQueriesSamples.java | 5 +- .../EntitiesRelationsListSamples.java | 14 +- .../EntityQueriesCreateOrUpdateSamples.java | 5 +- .../generated/EntityQueriesDeleteSamples.java | 7 +- .../generated/EntityQueriesGetSamples.java | 12 +- .../generated/EntityQueriesListSamples.java | 7 +- .../EntityQueryTemplatesGetSamples.java | 7 +- .../EntityQueryTemplatesListSamples.java | 9 +- .../EntityRelationsGetRelationSamples.java | 6 +- .../generated/FileImportsCreateSamples.java | 2 +- .../generated/FileImportsDeleteSamples.java | 8 +- .../generated/FileImportsGetSamples.java | 7 +- .../generated/FileImportsListSamples.java | 13 +- .../GetRecommendationsListSamples.java | 21 + .../GetSingleRecommendationSamples.java | 28 + ...TriggeredAnalyticsRuleRunsListSamples.java | 21 + ...IncidentCommentsCreateOrUpdateSamples.java | 6 +- .../IncidentCommentsDeleteSamples.java | 10 +- .../generated/IncidentCommentsGetSamples.java | 11 +- .../IncidentCommentsListSamples.java | 18 +- ...ncidentRelationsCreateOrUpdateSamples.java | 5 +- .../IncidentRelationsDeleteSamples.java | 6 +- .../IncidentRelationsGetSamples.java | 6 +- .../IncidentRelationsListSamples.java | 14 +- .../IncidentTasksCreateOrUpdateSamples.java | 30 + .../generated/IncidentTasksDeleteSamples.java | 27 + .../generated/IncidentTasksGetSamples.java | 27 + .../generated/IncidentTasksListSamples.java | 22 + .../IncidentsCreateOrUpdateSamples.java | 18 +- .../generated/IncidentsCreateTeamSamples.java | 18 +- .../generated/IncidentsDeleteSamples.java | 11 +- .../generated/IncidentsGetSamples.java | 11 +- .../generated/IncidentsListAlertsSamples.java | 12 +- .../IncidentsListBookmarksSamples.java | 11 +- .../IncidentsListEntitiesSamples.java | 11 +- .../generated/IncidentsListSamples.java | 19 +- .../IncidentsRunPlaybookSamples.java | 7 +- .../generated/IpGeodataGetSamples.java | 6 +- .../generated/MetadataCreateSamples.java | 4 +- .../generated/MetadataDeleteSamples.java | 6 +- .../generated/MetadataGetSamples.java | 6 +- .../generated/MetadataListSamples.java | 10 +- .../generated/MetadataUpdateSamples.java | 8 +- .../OfficeConsentsDeleteSamples.java | 7 +- .../generated/OfficeConsentsGetSamples.java | 7 +- .../generated/OfficeConsentsListSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- .../ProductSettingsDeleteSamples.java | 6 +- .../generated/ProductSettingsGetSamples.java | 6 +- .../generated/ProductSettingsListSamples.java | 6 +- .../ProductSettingsUpdateSamples.java | 5 +- ...nalyticsSettingsCreateOrUpdateSamples.java | 5 +- ...urityMLAnalyticsSettingsDeleteSamples.java | 7 +- ...SecurityMLAnalyticsSettingsGetSamples.java | 6 +- ...ecurityMLAnalyticsSettingsListSamples.java | 6 +- ...SentinelOnboardingStatesCreateSamples.java | 2 +- ...SentinelOnboardingStatesDeleteSamples.java | 8 +- .../SentinelOnboardingStatesGetSamples.java | 8 +- .../SentinelOnboardingStatesListSamples.java | 6 +- .../SourceControlListRepositoriesSamples.java | 7 +- .../SourceControlsOperationCreateSamples.java | 2 +- .../SourceControlsOperationDeleteSamples.java | 7 +- .../SourceControlsOperationGetSamples.java | 7 +- .../SourceControlsOperationListSamples.java | 6 +- ...ntelligenceIndicatorAppendTagsSamples.java | 5 +- ...igenceIndicatorCreateIndicatorSamples.java | 5 +- ...eatIntelligenceIndicatorCreateSamples.java | 5 +- ...eatIntelligenceIndicatorDeleteSamples.java | 7 +- ...ThreatIntelligenceIndicatorGetSamples.java | 7 +- ...telligenceIndicatorMetricsListSamples.java | 8 +- ...igenceIndicatorQueryIndicatorsSamples.java | 7 +- ...telligenceIndicatorReplaceTagsSamples.java | 5 +- ...ligenceIndicatorsOperationListSamples.java | 6 +- ...edAnalyticsRuleRunOperationGetSamples.java | 24 + .../UpdateRecommendationSamples.java | 33 + .../WatchlistItemsCreateOrUpdateSamples.java | 2 +- .../WatchlistItemsDeleteSamples.java | 10 +- .../generated/WatchlistItemsGetSamples.java | 10 +- .../generated/WatchlistItemsListSamples.java | 6 +- .../WatchlistsCreateOrUpdateSamples.java | 4 +- .../generated/WatchlistsDeleteSamples.java | 8 +- .../generated/WatchlistsGetSamples.java | 6 +- .../generated/WatchlistsListSamples.java | 6 +- 829 files changed, 17410 insertions(+), 4563 deletions(-) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetsImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTaskImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java rename sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/{Constant88.java => Constant96.java} (67%) create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Content.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpDataConnectorDataTypesAlerts.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpFilteredProviders.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Priority.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java delete mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java create mode 100644 sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md b/sdk/securityinsights/azure-resourcemanager-securityinsights/CHANGELOG.md index 51d1f53d44663..ece5c31f8fc80 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-02-06) + +- Azure Resource Manager SecurityInsights client library for Java. This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2023-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..829fa0892d58f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SecurityInsights client library for Java. -This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2022-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for SecurityInsights Management SDK. API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider. Package tag package-preview-2023-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..d23d1fc16f343 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/SAMPLE.md @@ -8,6 +8,10 @@ - [Get](#actions_get) - [ListByAlertRule](#actions_listbyalertrule) +## AlertRuleOperation + +- [TriggerRuleRun](#alertruleoperation_triggerrulerun) + ## AlertRuleTemplates - [Get](#alertruletemplates_get) @@ -101,6 +105,18 @@ - [Get](#fileimports_get) - [List](#fileimports_list) +## Get + +- [SingleRecommendation](#get_singlerecommendation) + +## GetRecommendations + +- [List](#getrecommendations_list) + +## GetTriggeredAnalyticsRuleRuns + +- [List](#gettriggeredanalyticsruleruns_list) + ## IncidentComments - [CreateOrUpdate](#incidentcomments_createorupdate) @@ -115,6 +131,13 @@ - [Get](#incidentrelations_get) - [List](#incidentrelations_list) +## IncidentTasks + +- [CreateOrUpdate](#incidenttasks_createorupdate) +- [Delete](#incidenttasks_delete) +- [Get](#incidenttasks_get) +- [List](#incidenttasks_list) + ## Incidents - [CreateOrUpdate](#incidents_createorupdate) @@ -199,6 +222,14 @@ - [List](#threatintelligenceindicatorsoperation_list) +## TriggeredAnalyticsRuleRunOperation + +- [Get](#triggeredanalyticsrulerunoperation_get) + +## Update + +- [Recommendation](#update_recommendation) + ## WatchlistItems - [CreateOrUpdate](#watchlistitems_createorupdate) @@ -218,7 +249,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. @@ -244,12 +275,10 @@ public final class ActionsCreateOrUpdateSamples { ### Actions_Delete ```java -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -265,7 +294,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 +302,10 @@ public final class ActionsDeleteSamples { ### Actions_Get ```java -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -294,7 +321,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 +329,10 @@ public final class ActionsGetSamples { ### Actions_ListByAlertRule ```java -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -316,20 +341,50 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` -### AlertRuleTemplates_Get +### AlertRuleOperation_TriggerRuleRun ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.time.OffsetDateTime; + +/** Samples for AlertRuleOperation TriggerRuleRun. */ +public final class AlertRuleOperationTriggerRuleRunSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json + */ + /** + * Sample code: triggerRuleRun_Post. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggerRuleRunPost(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRuleOperations() + .triggerRuleRun( + "myRg", + "myWorkspace", + "65360bb0-8986-4ade-a89d-af3cf44d28aa", + new AnalyticsRuleRunTrigger().withExecutionTimeUtc(OffsetDateTime.parse("2022-12-22T15:37:03.074Z")), + com.azure.core.util.Context.NONE); + } +} +``` + +### AlertRuleTemplates_Get +```java /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -340,7 +395,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 +404,10 @@ public final class AlertRuleTemplatesGetSamples { ### AlertRuleTemplates_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -362,7 +416,7 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -370,9 +424,10 @@ public final class AlertRuleTemplatesListSamples { ### AlertRules_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; +import com.azure.resourcemanager.securityinsights.models.AlertProperty; +import com.azure.resourcemanager.securityinsights.models.AlertPropertyMapping; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -392,6 +447,7 @@ import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityIncide import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; import java.util.Arrays; @@ -401,7 +457,7 @@ import java.util.Map; /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -620,11 +676,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -644,11 +700,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -716,12 +772,26 @@ public final class AlertRulesCreateOrUpdateSamples { .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - Context.NONE); + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}") + .withAlertDynamicProperties( + Arrays + .asList( + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_COMPONENT_NAME) + .withValue("ProductComponentNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_NAME) + .withValue("ProductNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.ALERT_LINK) + .withValue("Link")))) + .withSentinelEntitiesMappings( + Arrays.asList(new SentinelEntityMapping().withColumnName("Entities"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json */ /** * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. @@ -940,11 +1010,11 @@ public final class AlertRulesCreateOrUpdateSamples { .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -985,7 +1055,7 @@ public final class AlertRulesCreateOrUpdateSamples { Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))) .withEventGroupingSettings( new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -1004,12 +1074,10 @@ public final class AlertRulesCreateOrUpdateSamples { ### AlertRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -1019,7 +1087,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 +1096,10 @@ public final class AlertRulesDeleteSamples { ### AlertRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -1043,11 +1110,12 @@ public final class AlertRulesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -1057,11 +1125,12 @@ public final class AlertRulesGetSamples { public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -1069,11 +1138,13 @@ public final class AlertRulesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -1084,7 +1155,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 +1167,10 @@ public final class AlertRulesGetSamples { ### AlertRules_List ```java -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -1105,7 +1178,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 +1193,7 @@ import java.util.List; /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. @@ -1145,12 +1218,10 @@ public final class AutomationRulesCreateOrUpdateSamples { ### AutomationRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -1161,7 +1232,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 +1241,10 @@ public final class AutomationRulesDeleteSamples { ### AutomationRules_Get ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -1184,7 +1254,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 +1263,10 @@ public final class AutomationRulesGetSamples { ### AutomationRules_List ```java -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -1205,7 +1274,7 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -1213,7 +1282,6 @@ public final class AutomationRulesListSamples { ### BookmarkOperation_Expand ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -1221,7 +1289,7 @@ import java.util.UUID; /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -1239,7 +1307,7 @@ public final class BookmarkOperationExpandSamples { .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1250,7 +1318,7 @@ public final class BookmarkOperationExpandSamples { /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. @@ -1273,12 +1341,10 @@ public final class BookmarkRelationsCreateOrUpdateSamples { ### BookmarkRelations_Delete ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -1294,7 +1360,7 @@ public final class BookmarkRelationsDeleteSamples { "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1302,12 +1368,10 @@ public final class BookmarkRelationsDeleteSamples { ### BookmarkRelations_Get ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -1323,7 +1387,7 @@ public final class BookmarkRelationsGetSamples { "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1331,12 +1395,10 @@ public final class BookmarkRelationsGetSamples { ### BookmarkRelations_List ```java -import com.azure.core.util.Context; - /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -1347,7 +1409,15 @@ public final class BookmarkRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "2216d0e1-91e3-4902-89fd-d2df8c535096", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -1366,7 +1436,7 @@ import java.util.UUID; /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. @@ -1410,12 +1480,10 @@ public final class BookmarksCreateOrUpdateSamples { ### Bookmarks_Delete ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -1425,7 +1493,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 +1502,10 @@ public final class BookmarksDeleteSamples { ### Bookmarks_Get ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -1448,7 +1515,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 +1524,10 @@ public final class BookmarksGetSamples { ### Bookmarks_List ```java -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -1469,7 +1535,7 @@ 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); } } ``` @@ -1478,7 +1544,6 @@ public final class BookmarksListSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; @@ -1488,7 +1553,7 @@ import java.util.Arrays; /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json */ /** * Sample code: Connect an APIPolling V2 logs data connector. @@ -1505,7 +1570,7 @@ public final class DataConnectorsConnectSamples { "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") .withOutputStream("Custom-MyTableRawData") @@ -1519,11 +1584,11 @@ public final class DataConnectorsConnectSamples { + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -1540,7 +1605,7 @@ public final class DataConnectorsConnectSamples { "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withRequestConfigUserInputValues( Arrays .asList( @@ -1551,7 +1616,7 @@ public final class DataConnectorsConnectSamples { + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1560,7 +1625,6 @@ public final class DataConnectorsConnectSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.Availability; import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; @@ -1583,6 +1647,15 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnecto import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesAlerts; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesIncidents; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; +import com.azure.resourcemanager.securityinsights.models.MtpProvider; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -1615,7 +1688,34 @@ import java.util.Arrays; /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MicrosoftPurviewInformationProtectionDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MicrosoftPurviewInformationProtectionConnectorDataTypes() + .withLogs( + new MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() + .withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -1639,11 +1739,40 @@ public final class DataConnectorsCreateOrUpdateSamples { new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateMicrosoftThreatProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates a MicrosoftThreatProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MtpDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MtpDataConnectorDataTypes() + .withIncidents(new MtpDataConnectorDataTypesIncidents().withState(DataTypeState.DISABLED)) + .withAlerts(new MtpDataConnectorDataTypesAlerts().withState(DataTypeState.ENABLED))) + .withFilteredProviders( + new MtpFilteredProviders() + .withAlerts(Arrays.asList(MtpProvider.MICROSOFT_DEFENDER_FOR_CLOUD_APPS))) + .withTenantId("178265c4-3136-4ff6-8ed1-b5b62b4cb5f5"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json */ /** * Sample code: Creates or updates an Office PowerBI data connector. @@ -1664,11 +1793,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new OfficePowerBIConnectorDataTypes() .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -1690,7 +1819,7 @@ public final class DataConnectorsCreateOrUpdateSamples { .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") .withCollectionId("135") .withUsername("--") - .withPassword("--") + .withPassword("fakeTokenPlaceholder") .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withPollingFrequency(PollingFrequency.ONCE_ADAY) .withDataTypes( @@ -1698,11 +1827,11 @@ public final class DataConnectorsCreateOrUpdateSamples { .withTaxiiClient( new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -1723,11 +1852,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new TIDataConnectorDataTypes() .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -1750,11 +1879,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() .withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -2070,11 +2199,11 @@ public final class DataConnectorsCreateOrUpdateSamples { + "> NOTE: If a longer timeout duration is required, consider" + " upgrading to an [App Service" + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json */ /** * Sample code: Creates or updates an Office365 Project data connector. @@ -2095,11 +2224,11 @@ public final class DataConnectorsCreateOrUpdateSamples { new Office365ProjectConnectorDataTypes() .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -2207,8 +2336,8 @@ public final class DataConnectorsCreateOrUpdateSamples { .withAuth( new CodelessConnectorPollingAuthProperties() .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) + .withApiKeyName("fakeTokenPlaceholder") + .withApiKeyIdentifier("fakeTokenPlaceholder")) .withRequest( new CodelessConnectorPollingRequestProperties() .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") @@ -2239,7 +2368,7 @@ public final class DataConnectorsCreateOrUpdateSamples { .withResponse( new CodelessConnectorPollingResponseProperties() .withEventsJsonPaths(Arrays.asList("$")))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2247,12 +2376,10 @@ public final class DataConnectorsCreateOrUpdateSamples { ### DataConnectors_Delete ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json */ /** * Sample code: Delete an Office365 Project data connector. @@ -2263,11 +2390,28 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Delete an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -2278,11 +2422,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -2293,11 +2438,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json */ /** * Sample code: Delete an Office PowerBI data connector. @@ -2308,11 +2454,12 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -2323,7 +2470,8 @@ public final class DataConnectorsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } ``` @@ -2331,12 +2479,10 @@ public final class DataConnectorsDeleteSamples { ### DataConnectors_Disconnect ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -2347,7 +2493,8 @@ public final class DataConnectorsDisconnectSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .disconnectWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } ``` @@ -2355,12 +2502,10 @@ public final class DataConnectorsDisconnectSamples { ### DataConnectors_Get ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json */ /** * Sample code: Get an Office365 Project data connector. @@ -2371,11 +2516,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -2386,11 +2532,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** * Sample code: Get an Office ATP data connector. @@ -2401,11 +2548,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetIoTById.json */ /** * Sample code: Get a IoT data connector. @@ -2416,11 +2564,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -2431,11 +2580,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -2446,11 +2596,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -2461,11 +2612,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -2476,11 +2628,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -2490,11 +2643,12 @@ public final class DataConnectorsGetSamples { public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -2505,11 +2659,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -2520,11 +2675,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -2535,11 +2691,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -2550,11 +2707,28 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftPurviewInformationProtectionDataConnetorById.json + */ + /** + * Sample code: Get a MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** * Sample code: Get an AATP data connector. @@ -2565,11 +2739,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** * Sample code: Get a APIPolling data connector. @@ -2580,11 +2755,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** * Sample code: Get an Office IRM data connector. @@ -2595,11 +2771,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -2610,11 +2787,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -2625,11 +2803,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -2640,11 +2819,12 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json */ /** * Sample code: Get an Office365 PowerBI data connector. @@ -2655,7 +2835,8 @@ public final class DataConnectorsGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -2663,12 +2844,10 @@ public final class DataConnectorsGetSamples { ### DataConnectors_List ```java -import com.azure.core.util.Context; - /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -2677,7 +2856,7 @@ public final class DataConnectorsListSamples { */ public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -2685,12 +2864,12 @@ public final class DataConnectorsListSamples { ### DataConnectorsCheckRequirementsOperation_Post ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; @@ -2703,7 +2882,7 @@ import com.azure.resourcemanager.securityinsights.models.TiTaxiiCheckRequirement /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -2714,11 +2893,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeAtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json */ /** * Sample code: Check requirements for Office365Project. @@ -2729,11 +2912,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Office365ProjectCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -2744,11 +2931,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -2759,11 +2950,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsIoT.json */ /** * Sample code: Check requirements for IoT. @@ -2778,11 +2973,11 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { "myRg", "myWorkspace", new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -2793,11 +2988,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -2808,11 +3007,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -2827,11 +3030,31 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { "myRg", "myWorkspace", new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftPurviewInformationProtection.json + */ + /** + * Sample code: Check requirements for MicrosoftPurviewInformationProtection. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForMicrosoftPurviewInformationProtection( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new MicrosoftPurviewInformationProtectionCheckRequirements() + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -2842,11 +3065,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -2857,11 +3084,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TiTaxiiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -2872,11 +3103,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeIrmCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -2887,11 +3122,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MstiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json */ /** * Sample code: Check requirements for OfficePowerBI. @@ -2902,11 +3141,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficePowerBICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -2917,11 +3160,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Dynamics365CheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -2932,11 +3179,15 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -2947,7 +3198,11 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } } ``` @@ -2955,12 +3210,10 @@ public final class DataConnectorsCheckRequirementsOperationPostSamples { ### DomainWhois_Get ```java -import com.azure.core.util.Context; - /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -2969,7 +3222,7 @@ public final class DomainWhoisGetSamples { */ public static void getWhoisInformationForASingleDomainName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); + manager.domainWhois().getWithResponse("myRg", "microsoft.com", com.azure.core.util.Context.NONE); } } ``` @@ -2977,7 +3230,6 @@ public final class DomainWhoisGetSamples { ### Entities_Expand ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -2985,7 +3237,7 @@ import java.util.UUID; /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -3003,7 +3255,7 @@ public final class EntitiesExpandSamples { .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3011,12 +3263,10 @@ public final class EntitiesExpandSamples { ### Entities_Get ```java -import com.azure.core.util.Context; - /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -3025,11 +3275,14 @@ public final class EntitiesGetSamples { */ public static void getASubmissionMailEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -3037,11 +3290,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -3049,11 +3305,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -3062,11 +3321,14 @@ public final class EntitiesGetSamples { */ public static void getAnIoTDeviceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -3075,11 +3337,14 @@ public final class EntitiesGetSamples { */ public static void getARegistryKeyEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -3087,11 +3352,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -3099,11 +3367,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -3112,11 +3383,14 @@ public final class EntitiesGetSamples { */ public static void getASecurityAlertEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -3124,11 +3398,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -3136,11 +3413,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -3149,11 +3429,14 @@ public final class EntitiesGetSamples { */ public static void getACloudApplicationEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -3161,11 +3444,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -3174,11 +3460,14 @@ public final class EntitiesGetSamples { */ public static void getARegistryValueEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -3186,11 +3475,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -3199,11 +3491,14 @@ public final class EntitiesGetSamples { */ public static void getAMailClusterEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -3212,11 +3507,14 @@ public final class EntitiesGetSamples { */ public static void getASecurityGroupEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -3225,11 +3523,14 @@ public final class EntitiesGetSamples { */ public static void getAMailMessageEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -3238,11 +3539,14 @@ public final class EntitiesGetSamples { */ public static void getAnAzureResourceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -3250,11 +3554,14 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -3262,7 +3569,10 @@ public final class EntitiesGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", com.azure.core.util.Context.NONE); } } ``` @@ -3270,7 +3580,6 @@ public final class EntitiesGetSamples { ### Entities_GetInsights ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import java.time.OffsetDateTime; import java.util.Arrays; @@ -3279,7 +3588,7 @@ import java.util.UUID; /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -3298,7 +3607,7 @@ public final class EntitiesGetInsightsSamples { .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withAddDefaultExtendedTimeRange(false) .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3306,12 +3615,10 @@ public final class EntitiesGetInsightsSamples { ### Entities_List ```java -import com.azure.core.util.Context; - /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -3319,7 +3626,7 @@ public final class EntitiesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); + manager.entities().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -3327,13 +3634,12 @@ public final class EntitiesListSamples { ### Entities_Queries ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -3348,7 +3654,7 @@ public final class EntitiesQueriesSamples { "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", EntityItemQueryKind.INSIGHT, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3356,14 +3662,13 @@ public final class EntitiesQueriesSamples { ### 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/preview/2023-02-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -3381,7 +3686,7 @@ public final class EntitiesGetTimelineListSamples { .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withNumberOfBucket(4), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3389,12 +3694,10 @@ public final class EntitiesGetTimelineListSamples { ### EntitiesRelations_List ```java -import com.azure.core.util.Context; - /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -3405,7 +3708,15 @@ public final class EntitiesRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3413,7 +3724,6 @@ public final class EntitiesRelationsListSamples { ### EntityQueries_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; @@ -3424,7 +3734,7 @@ import java.util.Map; /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -3494,7 +3804,7 @@ public final class EntityQueriesCreateOrUpdateSamples { Arrays.asList("Host_OMSAgentID"))) .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) .withEnabled(true), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -3513,12 +3823,10 @@ public final class EntityQueriesCreateOrUpdateSamples { ### EntityQueries_Delete ```java -import com.azure.core.util.Context; - /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -3528,7 +3836,8 @@ public final class EntityQueriesDeleteSamples { public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3536,12 +3845,10 @@ public final class EntityQueriesDeleteSamples { ### EntityQueries_Get ```java -import com.azure.core.util.Context; - /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -3552,11 +3859,12 @@ public final class EntityQueriesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -3567,7 +3875,8 @@ public final class EntityQueriesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3575,13 +3884,12 @@ public final class EntityQueriesGetSamples { ### EntityQueries_List ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -3589,7 +3897,9 @@ public final class EntityQueriesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); + manager + .entityQueries() + .list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, com.azure.core.util.Context.NONE); } } ``` @@ -3597,12 +3907,10 @@ public final class EntityQueriesListSamples { ### EntityQueryTemplates_Get ```java -import com.azure.core.util.Context; - /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -3613,7 +3921,8 @@ public final class EntityQueryTemplatesGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } ``` @@ -3621,13 +3930,12 @@ public final class EntityQueryTemplatesGetSamples { ### EntityQueryTemplates_List ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant96; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -3636,7 +3944,9 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); + manager + .entityQueryTemplates() + .list("myRg", "myWorkspace", Constant96.ACTIVITY, com.azure.core.util.Context.NONE); } } ``` @@ -3644,12 +3954,10 @@ public final class EntityQueryTemplatesListSamples { ### EntityRelations_GetRelation ```java -import com.azure.core.util.Context; - /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -3664,7 +3972,7 @@ public final class EntityRelationsGetRelationSamples { "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3680,7 +3988,7 @@ import com.azure.resourcemanager.securityinsights.models.IngestionMode; /** Samples for FileImports Create. */ public final class FileImportsCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/CreateFileImport.json */ /** * Sample code: Create a file import. @@ -3705,12 +4013,10 @@ public final class FileImportsCreateSamples { ### FileImports_Delete ```java -import com.azure.core.util.Context; - /** Samples for FileImports Delete. */ public final class FileImportsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/DeleteFileImport.json */ /** * Sample code: Delete a file import. @@ -3718,7 +4024,9 @@ public final class FileImportsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .fileImports() + .delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -3726,12 +4034,10 @@ public final class FileImportsDeleteSamples { ### FileImports_Get ```java -import com.azure.core.util.Context; - /** Samples for FileImports Get. */ public final class FileImportsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/GetFileImportById.json */ /** * Sample code: Get a file import. @@ -3741,7 +4047,8 @@ public final class FileImportsGetSamples { public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -3749,12 +4056,10 @@ public final class FileImportsGetSamples { ### FileImports_List ```java -import com.azure.core.util.Context; - /** Samples for FileImports List. */ public final class FileImportsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/GetFileImports.json */ /** * Sample code: Get all file imports. @@ -3764,7 +4069,81 @@ public final class FileImportsListSamples { public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Get_SingleRecommendation + +```java +import java.util.UUID; + +/** Samples for Get SingleRecommendation. */ +public final class GetSingleRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/GetRecommendation.json + */ + /** + * Sample code: Get a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getARecommendation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .gets() + .singleRecommendationWithResponse( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + com.azure.core.util.Context.NONE); + } +} +``` + +### GetRecommendations_List + +```java +/** Samples for GetRecommendations List. */ +public final class GetRecommendationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/GetRecommendations.json + */ + /** + * Sample code: Get Recommendations list. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getRecommendationsList( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getRecommendations().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### GetTriggeredAnalyticsRuleRuns_List + +```java +/** Samples for GetTriggeredAnalyticsRuleRuns List. */ +public final class GetTriggeredAnalyticsRuleRunsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRuns_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRuns_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunsGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getTriggeredAnalyticsRuleRuns().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -3775,14 +4154,14 @@ public final class FileImportsListSamples { /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident comment. + * Sample code: IncidentComments_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncidentComment( + public static void incidentCommentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -3797,19 +4176,17 @@ public final class IncidentCommentsCreateOrUpdateSamples { ### IncidentComments_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_Delete.json */ /** - * Sample code: Delete the incident comment. + * Sample code: IncidentComments_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteTheIncidentComment( + public static void incidentCommentsDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -3818,7 +4195,7 @@ public final class IncidentCommentsDeleteSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3826,20 +4203,17 @@ public final class IncidentCommentsDeleteSamples { ### IncidentComments_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_Get.json */ /** - * Sample code: Get an incident comment. + * Sample code: IncidentComments_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentCommentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() .getWithResponse( @@ -3847,7 +4221,7 @@ public final class IncidentCommentsGetSamples { "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3855,23 +4229,29 @@ public final class IncidentCommentsGetSamples { ### IncidentComments_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_List.json */ /** - * Sample code: Get all incident comments. + * Sample code: IncidentComments_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentComments( + public static void incidentCommentsList( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -3879,13 +4259,12 @@ public final class IncidentCommentsListSamples { ### IncidentRelations_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -3904,7 +4283,7 @@ public final class IncidentRelationsCreateOrUpdateSamples { new RelationInner() .withRelatedResourceId( "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3912,12 +4291,10 @@ public final class IncidentRelationsCreateOrUpdateSamples { ### IncidentRelations_Delete ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -3933,7 +4310,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 +4318,10 @@ public final class IncidentRelationsDeleteSamples { ### IncidentRelations_Get ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -3962,7 +4337,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 +4345,10 @@ public final class IncidentRelationsGetSamples { ### IncidentRelations_List ```java -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -3986,7 +4359,117 @@ public final class IncidentRelationsListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_CreateOrUpdate + +```java +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; + +/** Samples for IncidentTasks CreateOrUpdate. */ +public final class IncidentTasksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_CreateOrUpdate.json + */ + /** + * Sample code: IncidentTasks_CreateOrUpdate. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksCreateOrUpdate( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withTitle("Task title") + .withStatus(IncidentTaskStatus.NEW) + .withDescription("Task description") + .create(); + } +} +``` + +### IncidentTasks_Delete + +```java +/** Samples for IncidentTasks Delete. */ +public final class IncidentTasksDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Delete.json + */ + /** + * Sample code: IncidentTasks_Delete. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .deleteWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_Get + +```java +/** Samples for IncidentTasks Get. */ +public final class IncidentTasksGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Get.json + */ + /** + * Sample code: IncidentTasks_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .getWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} +``` + +### IncidentTasks_List + +```java +/** Samples for IncidentTasks List. */ +public final class IncidentTasksListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_List.json + */ + /** + * Sample code: IncidentTasks_List. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4005,30 +4488,30 @@ import java.util.UUID; /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident. + * Sample code: Incidents_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncident( + public static void incidentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTitle("My incident") + .withDescription("This is a demo incident") + .withSeverity(IncidentSeverity.HIGH) + .withStatus(IncidentStatus.CLOSED) .withClassification(IncidentClassification.FALSE_POSITIVE) + .withClassificationReason(IncidentClassificationReason.INACCURATE_DATA) .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") + .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") .create(); } } @@ -4037,29 +4520,27 @@ public final class IncidentsCreateOrUpdateSamples { ### Incidents_CreateTeam ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTeam/Incidents_CreateTeam.json */ /** - * Sample code: Creates incident teams group. + * Sample code: Incidents_CreateTeam. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsCreateTeam(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", + "myRg", + "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); + new TeamInformationInner(), + com.azure.core.util.Context.NONE); } } ``` @@ -4067,22 +4548,21 @@ public final class IncidentsCreateTeamSamples { ### Incidents_Delete ```java -import com.azure.core.util.Context; - /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_Delete.json */ /** - * Sample code: Delete an incident. + * Sample code: Incidents_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4090,22 +4570,21 @@ public final class IncidentsDeleteSamples { ### Incidents_Get ```java -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_Get.json */ /** - * Sample code: Get an incident. + * Sample code: Incidents_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } ``` @@ -4113,20 +4592,27 @@ public final class IncidentsGetSamples { ### Incidents_List ```java -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_List.json */ /** - * Sample code: Get all incidents. + * Sample code: Incidents_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + public static void incidentsList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -4134,23 +4620,21 @@ public final class IncidentsListSamples { ### Incidents_ListAlerts ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentAlerts/Incidents_ListAlerts.json */ /** - * Sample code: Get all incident alerts. + * Sample code: Incidents_ListAlerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsListAlerts(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4158,23 +4642,22 @@ public final class IncidentsListAlertsSamples { ### Incidents_ListBookmarks ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentBookmarks/Incidents_ListBookmarks.json */ /** - * Sample code: Get all incident bookmarks. + * Sample code: Incidents_ListBookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentBookmarks( + public static void incidentsListBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4182,23 +4665,22 @@ public final class IncidentsListBookmarksSamples { ### Incidents_ListEntities ```java -import com.azure.core.util.Context; - /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentEntities/Incidents_ListEntities.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Incidents_ListEntities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void incidentsListEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listEntitiesWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } ``` @@ -4206,12 +4688,10 @@ public final class IncidentsListEntitiesSamples { ### Incidents_RunPlaybook ```java -import com.azure.core.util.Context; - /** Samples for Incidents RunPlaybook. */ public final class IncidentsRunPlaybookSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json */ /** * Sample code: Incidents_RunPlaybook. @@ -4222,7 +4702,8 @@ public final class IncidentsRunPlaybookSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .runPlaybookWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, com.azure.core.util.Context.NONE); } } ``` @@ -4230,12 +4711,10 @@ public final class IncidentsRunPlaybookSamples { ### IpGeodata_Get ```java -import com.azure.core.util.Context; - /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -4244,7 +4723,7 @@ public final class IpGeodataGetSamples { */ public static void getGeodataForASingleIPAddress( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", com.azure.core.util.Context.NONE); } } ``` @@ -4267,7 +4746,7 @@ import java.util.Arrays; /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -4343,7 +4822,7 @@ public final class MetadataCreateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. @@ -4368,12 +4847,10 @@ public final class MetadataCreateSamples { ### Metadata_Delete ```java -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -4381,7 +4858,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 +4866,10 @@ public final class MetadataDeleteSamples { ### Metadata_Get ```java -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -4403,7 +4878,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 +4886,10 @@ public final class MetadataGetSamples { ### Metadata_List ```java -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -4424,11 +4897,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -4437,7 +4910,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 +4918,13 @@ public final class MetadataListSamples { ### Metadata_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -4461,7 +4933,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) @@ -4473,12 +4948,10 @@ public final class MetadataUpdateSamples { ### OfficeConsents_Delete ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -4489,7 +4962,8 @@ public final class OfficeConsentsDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } ``` @@ -4497,12 +4971,10 @@ public final class OfficeConsentsDeleteSamples { ### OfficeConsents_Get ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -4512,7 +4984,8 @@ public final class OfficeConsentsGetSamples { public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } ``` @@ -4520,12 +4993,10 @@ public final class OfficeConsentsGetSamples { ### OfficeConsents_List ```java -import com.azure.core.util.Context; - /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -4534,7 +5005,7 @@ public final class OfficeConsentsListSamples { */ public static void getAllOfficeConsents( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); + manager.officeConsents().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4542,12 +5013,10 @@ public final class OfficeConsentsListSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -4555,7 +5024,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); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -4563,12 +5032,10 @@ public final class OperationsListSamples { ### 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 + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -4577,7 +5044,7 @@ public final class ProductSettingsDeleteSamples { */ public static void deleteEyesOnSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } ``` @@ -4585,12 +5052,10 @@ public final class ProductSettingsDeleteSamples { ### ProductSettings_Get ```java -import com.azure.core.util.Context; - /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -4598,7 +5063,7 @@ public final class ProductSettingsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } ``` @@ -4606,12 +5071,10 @@ public final class ProductSettingsGetSamples { ### ProductSettings_List ```java -import com.azure.core.util.Context; - /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -4619,7 +5082,7 @@ public final class ProductSettingsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.productSettings().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4627,13 +5090,12 @@ public final class ProductSettingsListSamples { ### ProductSettings_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EyesOn; /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -4649,7 +5111,7 @@ public final class ProductSettingsUpdateSamples { "myWorkspace", "EyesOn", new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -4658,7 +5120,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 +5133,7 @@ import java.util.UUID; /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -4726,7 +5187,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 +5195,10 @@ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { ### SecurityMLAnalyticsSettings_Delete ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -4750,7 +5209,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 +5218,10 @@ public final class SecurityMLAnalyticsSettingsDeleteSamples { ### SecurityMLAnalyticsSettings_Get ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -4774,7 +5232,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 +5240,10 @@ public final class SecurityMLAnalyticsSettingsGetSamples { ### SecurityMLAnalyticsSettings_List ```java -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -4796,7 +5252,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 +5263,7 @@ public final class SecurityMLAnalyticsSettingsListSamples { /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. @@ -4829,12 +5285,10 @@ public final class SentinelOnboardingStatesCreateSamples { ### SentinelOnboardingStates_Delete ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -4843,7 +5297,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 +5307,10 @@ public final class SentinelOnboardingStatesDeleteSamples { ### SentinelOnboardingStates_Get ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -4865,7 +5319,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 +5329,10 @@ public final class SentinelOnboardingStatesGetSamples { ### SentinelOnboardingStates_List ```java -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -4887,7 +5341,7 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4895,13 +5349,12 @@ public final class SentinelOnboardingStatesListSamples { ### SourceControl_ListRepositories ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.RepoType; /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -4909,7 +5362,9 @@ public final class SourceControlListRepositoriesSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); + manager + .sourceControls() + .listRepositories("myRg", "myWorkspace", RepoType.GITHUB, com.azure.core.util.Context.NONE); } } ``` @@ -4926,7 +5381,7 @@ import java.util.Arrays; /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. @@ -4966,12 +5421,10 @@ public final class SourceControlsOperationCreateSamples { ### SourceControlsOperation_Delete ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -4982,7 +5435,8 @@ public final class SourceControlsOperationDeleteSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } ``` @@ -4990,12 +5444,10 @@ public final class SourceControlsOperationDeleteSamples { ### SourceControlsOperation_Get ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -5005,7 +5457,8 @@ public final class SourceControlsOperationGetSamples { public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } ``` @@ -5013,12 +5466,10 @@ public final class SourceControlsOperationGetSamples { ### SourceControlsOperation_List ```java -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -5027,7 +5478,7 @@ public final class SourceControlsOperationListSamples { */ public static void getAllSourceControls( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); + manager.sourceControlsOperations().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5035,14 +5486,13 @@ public final class SourceControlsOperationListSamples { ### ThreatIntelligenceIndicator_AppendTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -5058,7 +5508,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 +5516,13 @@ public final class ThreatIntelligenceIndicatorAppendTagsSamples { ### ThreatIntelligenceIndicator_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -5106,7 +5555,7 @@ public final class ThreatIntelligenceIndicatorCreateSamples { .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5114,14 +5563,13 @@ public final class ThreatIntelligenceIndicatorCreateSamples { ### ThreatIntelligenceIndicator_CreateIndicator ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -5153,7 +5601,7 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { .withValidFrom("2021-09-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5161,12 +5609,10 @@ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { ### ThreatIntelligenceIndicator_Delete ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -5177,7 +5623,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 +5632,10 @@ public final class ThreatIntelligenceIndicatorDeleteSamples { ### ThreatIntelligenceIndicator_Get ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -5201,7 +5646,8 @@ public final class ThreatIntelligenceIndicatorGetSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } ``` @@ -5209,7 +5655,6 @@ public final class ThreatIntelligenceIndicatorGetSamples { ### ThreatIntelligenceIndicator_QueryIndicators ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; @@ -5218,7 +5663,7 @@ import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -5242,10 +5687,10 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { Arrays .asList( new ThreatIntelligenceSortingCriteria() - .withItemKey("lastUpdatedTimeUtc") + .withItemKey("fakeTokenPlaceholder") .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -5253,14 +5698,13 @@ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { ### ThreatIntelligenceIndicator_ReplaceTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -5278,7 +5722,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 +5730,10 @@ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { ### ThreatIntelligenceIndicatorMetrics_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -5300,7 +5742,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 +5752,10 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { ### ThreatIntelligenceIndicatorsOperation_List ```java -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -5324,7 +5766,62 @@ public final class ThreatIntelligenceIndicatorsOperationListSamples { com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### TriggeredAnalyticsRuleRunOperation_Get + +```java +/** Samples for TriggeredAnalyticsRuleRunOperation Get. */ +public final class TriggeredAnalyticsRuleRunOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRun_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRun_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .triggeredAnalyticsRuleRunOperations() + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); + } +} +``` + +### Update_Recommendation + +```java +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.State; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for Update Recommendation. */ +public final class UpdateRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/PatchRecommendation.json + */ + /** + * Sample code: Creates a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsARecommendation( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .updates() + .recommendation( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + Arrays.asList(new RecommendationPatch().withState(State.ACTIVE)), + com.azure.core.util.Context.NONE); } } ``` @@ -5338,7 +5835,7 @@ import java.util.Map; /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. @@ -5385,12 +5882,10 @@ public final class WatchlistItemsCreateOrUpdateSamples { ### WatchlistItems_Delete ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -5402,7 +5897,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 +5909,10 @@ public final class WatchlistItemsDeleteSamples { ### WatchlistItems_Get ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -5426,7 +5923,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 +5935,10 @@ public final class WatchlistItemsGetSamples { ### WatchlistItems_List ```java -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -5448,7 +5947,7 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } ``` @@ -5461,7 +5960,7 @@ import com.azure.resourcemanager.securityinsights.models.SourceType; /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -5488,7 +5987,7 @@ public final class WatchlistsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. @@ -5516,12 +6015,10 @@ public final class WatchlistsCreateOrUpdateSamples { ### Watchlists_Delete ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -5529,7 +6026,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 +6036,10 @@ public final class WatchlistsDeleteSamples { ### Watchlists_Get ```java -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -5550,7 +6047,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 +6055,10 @@ public final class WatchlistsGetSamples { ### Watchlists_List ```java -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -5571,7 +6066,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 703a8943d5640..88ac4c7acd7aa 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-preview-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..8afbd59963901 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/SecurityInsightsManager.java @@ -25,6 +25,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.SecurityInsights; import com.azure.resourcemanager.securityinsights.implementation.ActionsImpl; +import com.azure.resourcemanager.securityinsights.implementation.AlertRuleOperationsImpl; import com.azure.resourcemanager.securityinsights.implementation.AlertRuleTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.AlertRulesImpl; import com.azure.resourcemanager.securityinsights.implementation.AutomationRulesImpl; @@ -41,8 +42,12 @@ import com.azure.resourcemanager.securityinsights.implementation.EntityQueryTemplatesImpl; import com.azure.resourcemanager.securityinsights.implementation.EntityRelationsImpl; import com.azure.resourcemanager.securityinsights.implementation.FileImportsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetRecommendationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetTriggeredAnalyticsRuleRunsImpl; +import com.azure.resourcemanager.securityinsights.implementation.GetsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentCommentsImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentRelationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.IncidentTasksImpl; import com.azure.resourcemanager.securityinsights.implementation.IncidentsImpl; import com.azure.resourcemanager.securityinsights.implementation.IpGeodatasImpl; import com.azure.resourcemanager.securityinsights.implementation.MetadatasImpl; @@ -57,9 +62,12 @@ import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorMetricsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsImpl; import com.azure.resourcemanager.securityinsights.implementation.ThreatIntelligenceIndicatorsOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.TriggeredAnalyticsRuleRunOperationsImpl; +import com.azure.resourcemanager.securityinsights.implementation.UpdatesImpl; import com.azure.resourcemanager.securityinsights.implementation.WatchlistItemsImpl; import com.azure.resourcemanager.securityinsights.implementation.WatchlistsImpl; import com.azure.resourcemanager.securityinsights.models.Actions; +import com.azure.resourcemanager.securityinsights.models.AlertRuleOperations; import com.azure.resourcemanager.securityinsights.models.AlertRuleTemplates; import com.azure.resourcemanager.securityinsights.models.AlertRules; import com.azure.resourcemanager.securityinsights.models.AutomationRules; @@ -76,8 +84,12 @@ import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; import com.azure.resourcemanager.securityinsights.models.EntityRelations; import com.azure.resourcemanager.securityinsights.models.FileImports; +import com.azure.resourcemanager.securityinsights.models.GetRecommendations; +import com.azure.resourcemanager.securityinsights.models.GetTriggeredAnalyticsRuleRuns; +import com.azure.resourcemanager.securityinsights.models.Gets; import com.azure.resourcemanager.securityinsights.models.IncidentComments; import com.azure.resourcemanager.securityinsights.models.IncidentRelations; +import com.azure.resourcemanager.securityinsights.models.IncidentTasks; import com.azure.resourcemanager.securityinsights.models.Incidents; import com.azure.resourcemanager.securityinsights.models.IpGeodatas; import com.azure.resourcemanager.securityinsights.models.Metadatas; @@ -91,6 +103,8 @@ import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorMetrics; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicators; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorsOperations; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRunOperations; +import com.azure.resourcemanager.securityinsights.models.Updates; import com.azure.resourcemanager.securityinsights.models.WatchlistItems; import com.azure.resourcemanager.securityinsights.models.Watchlists; import java.time.Duration; @@ -111,6 +125,12 @@ public final class SecurityInsightsManager { private AlertRuleTemplates alertRuleTemplates; + private TriggeredAnalyticsRuleRunOperations triggeredAnalyticsRuleRunOperations; + + private GetTriggeredAnalyticsRuleRuns getTriggeredAnalyticsRuleRuns; + + private AlertRuleOperations alertRuleOperations; + private AutomationRules automationRules; private Incidents incidents; @@ -143,12 +163,20 @@ public final class SecurityInsightsManager { private IncidentRelations incidentRelations; + private IncidentTasks incidentTasks; + private Metadatas metadatas; private OfficeConsents officeConsents; private SentinelOnboardingStates sentinelOnboardingStates; + private GetRecommendations getRecommendations; + + private Gets gets; + + private Updates updates; + private SecurityMLAnalyticsSettings securityMLAnalyticsSettings; private ProductSettings productSettings; @@ -338,7 +366,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(" (") @@ -431,6 +459,45 @@ public AlertRuleTemplates alertRuleTemplates() { return alertRuleTemplates; } + /** + * Gets the resource collection API of TriggeredAnalyticsRuleRunOperations. + * + * @return Resource collection API of TriggeredAnalyticsRuleRunOperations. + */ + public TriggeredAnalyticsRuleRunOperations triggeredAnalyticsRuleRunOperations() { + if (this.triggeredAnalyticsRuleRunOperations == null) { + this.triggeredAnalyticsRuleRunOperations = + new TriggeredAnalyticsRuleRunOperationsImpl( + clientObject.getTriggeredAnalyticsRuleRunOperations(), this); + } + return triggeredAnalyticsRuleRunOperations; + } + + /** + * Gets the resource collection API of GetTriggeredAnalyticsRuleRuns. + * + * @return Resource collection API of GetTriggeredAnalyticsRuleRuns. + */ + public GetTriggeredAnalyticsRuleRuns getTriggeredAnalyticsRuleRuns() { + if (this.getTriggeredAnalyticsRuleRuns == null) { + this.getTriggeredAnalyticsRuleRuns = + new GetTriggeredAnalyticsRuleRunsImpl(clientObject.getGetTriggeredAnalyticsRuleRuns(), this); + } + return getTriggeredAnalyticsRuleRuns; + } + + /** + * Gets the resource collection API of AlertRuleOperations. + * + * @return Resource collection API of AlertRuleOperations. + */ + public AlertRuleOperations alertRuleOperations() { + if (this.alertRuleOperations == null) { + this.alertRuleOperations = new AlertRuleOperationsImpl(clientObject.getAlertRuleOperations(), this); + } + return alertRuleOperations; + } + /** * Gets the resource collection API of AutomationRules. It manages AutomationRule. * @@ -623,6 +690,18 @@ public IncidentRelations incidentRelations() { return incidentRelations; } + /** + * Gets the resource collection API of IncidentTasks. It manages IncidentTask. + * + * @return Resource collection API of IncidentTasks. + */ + public IncidentTasks incidentTasks() { + if (this.incidentTasks == null) { + this.incidentTasks = new IncidentTasksImpl(clientObject.getIncidentTasks(), this); + } + return incidentTasks; + } + /** * Gets the resource collection API of Metadatas. It manages MetadataModel. * @@ -660,6 +739,42 @@ public SentinelOnboardingStates sentinelOnboardingStates() { return sentinelOnboardingStates; } + /** + * Gets the resource collection API of GetRecommendations. + * + * @return Resource collection API of GetRecommendations. + */ + public GetRecommendations getRecommendations() { + if (this.getRecommendations == null) { + this.getRecommendations = new GetRecommendationsImpl(clientObject.getGetRecommendations(), this); + } + return getRecommendations; + } + + /** + * Gets the resource collection API of Gets. + * + * @return Resource collection API of Gets. + */ + public Gets gets() { + if (this.gets == null) { + this.gets = new GetsImpl(clientObject.getGets(), this); + } + return gets; + } + + /** + * Gets the resource collection API of Updates. + * + * @return Resource collection API of Updates. + */ + public Updates updates() { + if (this.updates == null) { + this.updates = new UpdatesImpl(clientObject.getUpdates(), this); + } + return updates; + } + /** * Gets the resource collection API of SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java index 1679ca2138ad0..18cfd50a24315 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ActionsClient.java @@ -44,21 +44,6 @@ public interface ActionsClient { PagedIterable listByAlertRule( String resourceGroupName, String workspaceName, String ruleId, Context context); - /** - * Gets the action of alert rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param ruleId Alert rule ID. - * @param actionId Action ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); - /** * Gets the action of alert rule. * @@ -77,21 +62,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** - * Creates or updates the action of alert rule. + * Gets the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return action for alert rule. + * @return the action of alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActionResponseInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); + ActionResponseInner get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Creates or updates the action of alert rule. @@ -117,18 +100,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the action of alert rule. + * Creates or updates the action of alert rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param action The action. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return action for alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + ActionResponseInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, String actionId, ActionRequest action); /** * Delete the action of alert rule. @@ -146,4 +132,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + + /** + * Delete the action of alert rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param actionId Action ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java new file mode 100644 index 0000000000000..7cd2bdbeb6c94 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleOperationsClient.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; + +/** An instance of this class provides access to all the operations defined in AlertRuleOperationsClient. */ +public interface AlertRuleOperationsClient { + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java index c568ee0f23feb..1747732b0446d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRuleTemplatesClient.java @@ -46,13 +46,15 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -60,13 +62,11 @@ public interface AlertRuleTemplatesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplateInner get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java index d40ca296e5fc6..c77a3e9fa2fa2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AlertRulesClient.java @@ -46,13 +46,15 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -60,15 +62,13 @@ public interface AlertRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRuleInner get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AlertRuleInner createOrUpdate( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -93,15 +94,14 @@ AlertRuleInner createOrUpdate( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRuleInner createOrUpdate( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -109,12 +109,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -122,12 +124,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java index 8bdfc546a32d2..1e448c15a2037 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/AutomationRulesClient.java @@ -13,20 +13,6 @@ /** An instance of this class provides access to all the operations defined in AutomationRulesClient. */ public interface AutomationRulesClient { - /** - * Gets the automation rule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param automationRuleId Automation rule ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); - /** * Gets the automation rule. * @@ -44,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** - * Creates or updates the automation rule. + * Gets the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -52,10 +38,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the automation rule. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Creates or updates the automation rule. @@ -79,7 +65,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the automation rule. + * Creates or updates the automation rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -87,10 +73,10 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + AutomationRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -108,6 +94,20 @@ Response createOrUpdateWithResponse( Response deleteWithResponse( String resourceGroupName, String workspaceName, String automationRuleId, Context context); + /** + * Delete the automation rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param automationRuleId Automation rule ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + /** * Gets all automation rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java index 1d63a4251db12..036b2b83f4368 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkOperationsClient.java @@ -20,14 +20,19 @@ public interface BookmarkOperationsClient { * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); + Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context); /** * Expand an bookmark. @@ -36,17 +41,12 @@ BookmarkExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); + BookmarkExpandResponseInner expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java index e644d527b90a3..0b823c7fb706a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarkRelationsClient.java @@ -56,21 +56,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets a bookmark relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param bookmarkId Bookmark ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); - /** * Gets a bookmark relation. * @@ -89,21 +74,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** - * Creates the bookmark relation. + * Gets a bookmark relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return a bookmark relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); + RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Creates the bookmark relation. @@ -129,18 +112,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the bookmark relation. + * Creates the bookmark relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + RelationInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, RelationInner relation); /** * Delete the bookmark relation. @@ -158,4 +144,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + + /** + * Delete the bookmark relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param bookmarkId Bookmark ID. + * @param relationName Relation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java index 767fec60845b3..0e9d306ada842 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/BookmarksClient.java @@ -46,13 +46,15 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -60,15 +62,13 @@ public interface BookmarksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + BookmarkInner get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Creates or updates the bookmark. @@ -77,14 +77,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights. + * @return represents a bookmark in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - BookmarkInner createOrUpdate( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); /** * Creates or updates the bookmark. @@ -93,15 +94,14 @@ BookmarkInner createOrUpdate( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param bookmark The bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a bookmark in Azure Security Insights along with {@link Response}. + * @return represents a bookmark in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark, Context context); + BookmarkInner createOrUpdate( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkInner bookmark); /** * Delete the bookmark. @@ -109,12 +109,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -122,13 +125,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java index 146c3f4c17933..55a1fe985fac9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsCheckRequirementsOperationsClient.java @@ -22,16 +22,18 @@ public interface DataConnectorsCheckRequirementsOperationsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorRequirementsStateInner post( + Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context); /** * Get requirements state for a data connector type. @@ -39,16 +41,14 @@ DataConnectorRequirementsStateInner post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse( + DataConnectorRequirementsStateInner post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java index 78d1cc36c200c..4763778493a5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DataConnectorsClient.java @@ -41,20 +41,6 @@ public interface DataConnectorsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -72,20 +58,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataConnectorInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnectorInner get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -109,17 +93,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -138,19 +125,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Connects a data connector. @@ -174,17 +159,19 @@ Response connectWithResponse( Context context); /** - * Disconnect a data connector. + * Connects a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); + void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); /** * Disconnect a data connector. @@ -201,4 +188,17 @@ Response connectWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response disconnectWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + + /** + * Disconnect a data connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataConnectorId Connector ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java index e9ae9d9fcfedd..250fe4b189d44 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/DomainWhoisClient.java @@ -17,25 +17,25 @@ public interface DomainWhoisClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. + * @return whois information for a single domain name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); + Response getWithResponse(String resourceGroupName, String domain, Context context); /** * Get whois information for a single domain name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String domain, Context context); + EnrichmentDomainWhoisInner get(String resourceGroupName, String domain); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java index 28404013fdcbe..8094b91298f64 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesClient.java @@ -46,20 +46,6 @@ public interface EntitiesClient { @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. * @@ -77,20 +63,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityId, Context context); /** - * Expands an entity. + * Gets an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); + EntityInner get(String resourceGroupName, String workspaceName, String entityId); /** * Expands an entity. @@ -114,20 +98,20 @@ Response expandWithResponse( Context context); /** - * Get Insights and Activities for an entity. + * Expands an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param kind The Kind parameter for queries. + * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); + EntityExpandResponseInner expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); /** * Get Insights and Activities for an entity. @@ -147,20 +131,20 @@ Response queriesWithResponse( String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); /** - * Execute Insights for an entity. + * Get Insights and Activities for an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. + * @param kind The Kind parameter for queries. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return insights and Activities for an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); + GetQueriesResponseInner queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); /** * Execute Insights for an entity. @@ -182,4 +166,20 @@ Response getInsightsWithResponse( String entityId, EntityGetInsightsParameters parameters, Context context); + + /** + * Execute Insights for an entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityId entity ID. + * @param parameters The parameters required to execute insights on the given entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Get Insights result operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EntityGetInsightsResponseInner getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java index bfa335c3065ee..e5cb96dad5214 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntitiesGetTimelinesClient.java @@ -20,14 +20,19 @@ public interface EntitiesGetTimelinesClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); + Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context); /** * Timeline for an entity. @@ -36,17 +41,12 @@ EntityTimelineResponseInner list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); + EntityTimelineResponseInner list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java index 68ba3c6be0c38..82117433e1883 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueriesClient.java @@ -44,20 +44,6 @@ public interface EntityQueriesClient { PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); - /** * Gets an entity query. * @@ -75,20 +61,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); /** - * Creates or updates the entity query. + * Gets an entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); + EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId); /** * Creates or updates the entity query. @@ -112,17 +96,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the entity query. + * Creates or updates the entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String entityQueryId); + EntityQueryInner createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); /** * Delete the entity query. @@ -139,4 +126,17 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); + + /** + * Delete the entity query. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityQueryId entity query ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String entityQueryId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java index 96c60a276daef..dde2b8a3134a7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityQueryTemplatesClient.java @@ -10,7 +10,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant96; /** An instance of this class provides access to all the operations defined in EntityQueryTemplatesClient. */ public interface EntityQueryTemplatesClient { @@ -41,7 +41,7 @@ public interface EntityQueryTemplatesClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); + String resourceGroupName, String workspaceName, Constant96 kind, Context context); /** * Gets an entity query. @@ -49,13 +49,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); /** * Gets an entity query. @@ -63,13 +65,11 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); + EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java index 9f6c0165269d7..3e639cbd1f196 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/EntityRelationsClient.java @@ -19,13 +19,15 @@ public interface EntityRelationsClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); + Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); /** * Gets an entity relation. @@ -34,13 +36,11 @@ public interface EntityRelationsClient { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); + RelationInner getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java index 91450d050bdea..78fe1246fb250 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/FileImportsClient.java @@ -61,13 +61,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context); /** * Gets a file import. @@ -75,15 +77,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); + FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId); /** * Creates the file import. @@ -92,14 +92,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. + * @return represents a file import in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); + Response createWithResponse( + String resourceGroupName, + String workspaceName, + String fileImportId, + FileImportInner fileImport, + Context context); /** * Creates the file import. @@ -108,19 +113,14 @@ FileImportInner create( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. + * @return represents a file import in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context); + FileImportInner create( + String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport); /** * Delete the file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java new file mode 100644 index 0000000000000..033e2193ceb48 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetRecommendationsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; + +/** An instance of this class provides access to all the operations defined in GetRecommendationsClient. */ +public interface GetRecommendationsClient { + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationListInner list(String resourceGroupName, String workspaceName); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java new file mode 100644 index 0000000000000..8e65e0fbb1c32 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetTriggeredAnalyticsRuleRunsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; + +/** An instance of this class provides access to all the operations defined in GetTriggeredAnalyticsRuleRunsClient. */ +public interface GetTriggeredAnalyticsRuleRunsClient { + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java new file mode 100644 index 0000000000000..bebc957f54575 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/GetsClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import java.util.UUID; + +/** An instance of this class provides access to all the operations defined in GetsClient. */ +public interface GetsClient { + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context); + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner singleRecommendation(String resourceGroupName, String workspaceName, UUID recommendationId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java index c8f34adc35784..6d88b1dfaa7b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentCommentsClient.java @@ -63,14 +63,15 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner get( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Gets an incident comment. @@ -79,15 +80,14 @@ IncidentCommentInner get( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentCommentInner get( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Creates or updates the incident comment. @@ -97,18 +97,20 @@ Response getWithResponse( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment. + * @return represents an incident comment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentCommentInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment); + IncidentCommentInner incidentComment, + Context context); /** * Creates or updates the incident comment. @@ -118,20 +120,18 @@ IncidentCommentInner createOrUpdate( * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. * @param incidentComment The incident comment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident comment along with {@link Response}. + * @return represents an incident comment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + IncidentCommentInner createOrUpdate( String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, - IncidentCommentInner incidentComment, - Context context); + IncidentCommentInner incidentComment); /** * Delete the incident comment. @@ -140,12 +140,15 @@ Response createOrUpdateWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Delete the incident comment. @@ -154,13 +157,10 @@ Response createOrUpdateWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java index 8f2125a0506df..c3348eddef7de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentRelationsClient.java @@ -56,21 +56,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - /** * Gets an incident relation. * @@ -89,21 +74,19 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Gets an incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return an incident relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - RelationInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + RelationInner get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** * Creates or updates the incident relation. @@ -129,18 +112,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the incident relation. + * Creates or updates the incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + RelationInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); /** * Delete the incident relation. @@ -158,4 +144,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + + /** + * Delete the incident relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param relationName Relation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java new file mode 100644 index 0000000000000..176e702b25299 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentTasksClient.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; + +/** An instance of this class provides access to all the operations defined in IncidentTasksClient. */ +public interface IncidentTasksClient { + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentTaskInner get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask, + Context context); + + /** + * Creates or updates the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param incidentTask The incident task. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentTaskInner createOrUpdate( + String resourceGroupName, + String workspaceName, + String incidentId, + String incidentTaskId, + IncidentTaskInner incidentTask); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java index 12e0bda1f5e85..0205c001fdc3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IncidentsClient.java @@ -15,7 +15,6 @@ import com.azure.resourcemanager.securityinsights.fluent.models.IncidentInner; import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ public interface IncidentsClient { @@ -25,13 +24,20 @@ public interface IncidentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); /** * Triggers playbook on a specific incident. @@ -39,20 +45,13 @@ public interface IncidentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); /** * Gets all incidents. @@ -94,20 +93,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); - /** * Gets an incident. * @@ -125,20 +110,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates or updates the incident. + * Gets an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); + IncidentInner get(String resourceGroupName, String workspaceName, String incidentId); /** * Creates or updates the incident. @@ -151,24 +134,27 @@ IncidentInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context); /** - * Delete the incident. + * Creates or updates the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param incident The incident. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String incidentId); + IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident); /** * Delete the incident. @@ -187,20 +173,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Delete the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. @@ -220,22 +203,24 @@ Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context); /** - * Gets all incident alerts. + * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); + TeamInformationInner createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -254,7 +239,7 @@ Response listAlertsWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -262,10 +247,10 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all incident alerts. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); + IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident bookmarks. @@ -284,7 +269,7 @@ Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -292,10 +277,10 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all incident bookmarks. */ @ServiceMethod(returns = ReturnType.SINGLE) - IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); + IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident related entities. @@ -312,4 +297,18 @@ Response listBookmarksWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets all incident related entities. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident related entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IncidentEntitiesResponseInner listEntities(String resourceGroupName, String workspaceName, String incidentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java index 50c85d732cb84..7edc1995d469d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/IpGeodatasClient.java @@ -17,25 +17,25 @@ public interface IpGeodatasClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); + Response getWithResponse(String resourceGroupName, String ipAddress, Context context); /** * Get geodata for a single IP address. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); + EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java index a42eaa9112f18..c54168b52e0dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/MetadatasClient.java @@ -53,20 +53,6 @@ PagedIterable list( Integer skip, Context context); - /** - * Get a Metadata. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param metadataName The Metadata name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); - /** * Get a Metadata. * @@ -84,7 +70,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Delete a Metadata. + * Get a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -92,9 +78,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Metadata. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String metadataName); + MetadataModelInner get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -113,20 +100,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String metadataName, Context context); /** - * Create a Metadata. + * Delete a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner create( - String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Create a Metadata. @@ -150,20 +134,20 @@ Response createWithResponse( Context context); /** - * Update an existing Metadata. + * Create a Metadata. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param metadataPatch Partial metadata request. + * @param metadata Metadata resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MetadataModelInner update( - String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); + MetadataModelInner create( + String resourceGroupName, String workspaceName, String metadataName, MetadataModelInner metadata); /** * Update an existing Metadata. @@ -185,4 +169,20 @@ Response updateWithResponse( String metadataName, MetadataPatch metadataPatch, Context context); + + /** + * Update an existing Metadata. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param metadataName The Metadata name. + * @param metadataPatch Partial metadata request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metadata resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetadataModelInner update( + String resourceGroupName, String workspaceName, String metadataName, MetadataPatch metadataPatch); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java index 09ab2236789b7..2a7969042a81a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/OfficeConsentsClient.java @@ -46,13 +46,15 @@ public interface OfficeConsentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Gets an office365 consent. @@ -60,15 +62,13 @@ public interface OfficeConsentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId); /** * Delete the office365 consent. @@ -76,12 +76,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String consentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Delete the office365 consent. @@ -89,13 +92,10 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + void delete(String resourceGroupName, String workspaceName, String consentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java index ddb0f006d6b3c..3711cbf68a268 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ProductSettingsClient.java @@ -18,27 +18,27 @@ public interface ProductSettingsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. + * @return list of all the settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); /** * List of all the settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. + * @return list of all the settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + SettingListInner list(String resourceGroupName, String workspaceName); /** * Gets a setting. @@ -46,13 +46,15 @@ public interface ProductSettingsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. + * @return a setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context); /** * Gets a setting. @@ -60,15 +62,13 @@ public interface ProductSettingsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. + * @return a setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); + SettingsInner get(String resourceGroupName, String workspaceName, String settingsName); /** * Delete setting of the product. @@ -76,12 +76,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context); /** * Delete setting of the product. @@ -89,15 +92,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsName); /** * Updates setting. @@ -106,13 +106,15 @@ Response deleteWithResponse( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. + * @return the Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); + Response updateWithResponse( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); /** * Updates setting. @@ -121,13 +123,11 @@ Response deleteWithResponse( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. + * @return the Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); + SettingsInner update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityInsights.java index 4d9c0b816c820..066599d8ae541 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 @@ -65,6 +65,27 @@ public interface SecurityInsights { */ AlertRuleTemplatesClient getAlertRuleTemplates(); + /** + * Gets the TriggeredAnalyticsRuleRunOperationsClient object to access its operations. + * + * @return the TriggeredAnalyticsRuleRunOperationsClient object. + */ + TriggeredAnalyticsRuleRunOperationsClient getTriggeredAnalyticsRuleRunOperations(); + + /** + * Gets the GetTriggeredAnalyticsRuleRunsClient object to access its operations. + * + * @return the GetTriggeredAnalyticsRuleRunsClient object. + */ + GetTriggeredAnalyticsRuleRunsClient getGetTriggeredAnalyticsRuleRuns(); + + /** + * Gets the AlertRuleOperationsClient object to access its operations. + * + * @return the AlertRuleOperationsClient object. + */ + AlertRuleOperationsClient getAlertRuleOperations(); + /** * Gets the AutomationRulesClient object to access its operations. * @@ -177,6 +198,13 @@ public interface SecurityInsights { */ IncidentRelationsClient getIncidentRelations(); + /** + * Gets the IncidentTasksClient object to access its operations. + * + * @return the IncidentTasksClient object. + */ + IncidentTasksClient getIncidentTasks(); + /** * Gets the MetadatasClient object to access its operations. * @@ -198,6 +226,27 @@ public interface SecurityInsights { */ SentinelOnboardingStatesClient getSentinelOnboardingStates(); + /** + * Gets the GetRecommendationsClient object to access its operations. + * + * @return the GetRecommendationsClient object. + */ + GetRecommendationsClient getGetRecommendations(); + + /** + * Gets the GetsClient object to access its operations. + * + * @return the GetsClient object. + */ + GetsClient getGets(); + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + UpdatesClient getUpdates(); + /** * Gets the SecurityMLAnalyticsSettingsClient object to access its operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java index 421b464275887..4a2af29bc349b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SecurityMLAnalyticsSettingsClient.java @@ -47,13 +47,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -61,15 +63,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSettingInner get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -78,17 +78,19 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SecurityMLAnalyticsSettingInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -97,19 +99,17 @@ SecurityMLAnalyticsSettingInner createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSettingInner createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -117,12 +117,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -130,13 +133,10 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java index 10a75e9aee2e0..500eef1cdbded 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SentinelOnboardingStatesClient.java @@ -13,21 +13,6 @@ /** An instance of this class provides access to all the operations defined in SentinelOnboardingStatesClient. */ public interface SentinelOnboardingStatesClient { - /** - * Get Sentinel onboarding state. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner get( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); - /** * Get Sentinel onboarding state. * @@ -45,7 +30,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Create Sentinel onboarding state. + * Get Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -56,7 +41,7 @@ Response getWithResponse( * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStateInner create( + SentinelOnboardingStateInner get( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** @@ -81,7 +66,7 @@ Response createWithResponse( Context context); /** - * Delete Sentinel onboarding state. + * Create Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -89,9 +74,11 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sentinel onboarding state. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + SentinelOnboardingStateInner create( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -110,17 +97,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** - * Gets all Sentinel onboarding states. + * Delete Sentinel onboarding state. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. */ @ServiceMethod(returns = ReturnType.SINGLE) - SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. @@ -136,4 +123,17 @@ Response deleteWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Gets all Sentinel onboarding states. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all Sentinel onboarding states. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SentinelOnboardingStatesListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java index cbf7109c8ebbc..c5f05f4d7c0cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/SourceControlsOperationsClient.java @@ -40,20 +40,6 @@ public interface SourceControlsOperationsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a source control byt its identifier. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param sourceControlId Source control Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); - /** * Gets a source control byt its identifier. * @@ -71,7 +57,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** - * Delete a source control. + * Gets a source control byt its identifier. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -79,9 +65,10 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a source control byt its identifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String sourceControlId); + SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId); /** * Delete a source control. @@ -100,20 +87,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** - * Creates a source control. + * Delete a source control. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param sourceControl The SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); + void delete(String resourceGroupName, String workspaceName, String sourceControlId); /** * Creates a source control. @@ -135,4 +119,20 @@ Response createWithResponse( String sourceControlId, SourceControlInner sourceControl, Context context); + + /** + * Creates a source control. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param sourceControlId Source control Id. + * @param sourceControl The SourceControl. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a SourceControl in Azure Security Insights. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SourceControlInner create( + String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java index 326b9eedc2e1d..7c8b95c16111d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorMetricsClient.java @@ -19,27 +19,27 @@ public interface ThreatIntelligenceIndicatorMetricsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsListInner list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java index 1e34a2b75f055..b8bcc35455e34 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/ThreatIntelligenceIndicatorsClient.java @@ -16,21 +16,6 @@ /** An instance of this class provides access to all the operations defined in ThreatIntelligenceIndicatorsClient. */ public interface ThreatIntelligenceIndicatorsClient { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -51,18 +36,19 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -81,23 +67,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformationInner get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -121,17 +102,23 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformationInner create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -148,6 +135,19 @@ Response createWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -191,16 +191,19 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -209,19 +212,16 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -230,17 +230,19 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ThreatIntelligenceInformationInner replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -249,17 +251,15 @@ ThreatIntelligenceInformationInner replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response replaceTagsWithResponse( + ThreatIntelligenceInformationInner replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java new file mode 100644 index 0000000000000..8f00e32a20b41 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/TriggeredAnalyticsRuleRunOperationsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; + +/** + * An instance of this class provides access to all the operations defined in TriggeredAnalyticsRuleRunOperationsClient. + */ +public interface TriggeredAnalyticsRuleRunOperationsClient { + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context); + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredAnalyticsRuleRunInner get(String resourceGroupName, String workspaceName, String ruleRunId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java new file mode 100644 index 0000000000000..6eb19141c6ad6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/UpdatesClient.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import java.util.List; +import java.util.UUID; + +/** An instance of this class provides access to all the operations defined in UpdatesClient. */ +public interface UpdatesClient { + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java index 80ba49f0d3be4..122ba7a8ee9cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistItemsClient.java @@ -53,14 +53,15 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Gets a watchlist, without its watchlist items. @@ -69,15 +70,14 @@ WatchlistItemInner get( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. @@ -86,12 +86,15 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. @@ -100,15 +103,12 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Creates or updates a watchlist item. @@ -118,18 +118,20 @@ Response deleteWithResponse( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistItemInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem); + WatchlistItemInner watchlistItem, + Context context); /** * Creates or updates a watchlist item. @@ -139,18 +141,16 @@ WatchlistItemInner createOrUpdate( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context); + WatchlistItemInner watchlistItem); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java index 10b174e1207f9..682536c9ff543 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/WatchlistsClient.java @@ -52,13 +52,15 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Gets a watchlist, without its watchlist items. @@ -66,15 +68,13 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. @@ -82,12 +82,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. @@ -95,15 +98,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To @@ -116,14 +116,19 @@ WatchlistsDeleteResponse deleteWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); + WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context); /** * Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To @@ -136,17 +141,12 @@ WatchlistInner createOrUpdate( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context); + WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java index ca6a6d8e19e0c..204a2b0ca6b95 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** AAD (Azure Active Directory) requirements check properties. */ @Fluent public final class AadCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of AadCheckRequirementsProperties class. */ + public AadCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public AadCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AadDataConnectorProperties.java index be85a145cdd0a..9dd51c22c450e 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 @@ -18,6 +18,10 @@ public final class AadDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AadDataConnectorProperties class. */ + public AadDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java index ee6d93cd9141e..6c7b1aeb9e0c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** AATP (Azure Advanced Threat Protection) requirements check properties. */ @Fluent public final class AatpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of AatpCheckRequirementsProperties class. */ + public AatpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public AatpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java index 3a0bdc1ed428b..40f02df994d0b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AatpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AatpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of AatpDataConnectorProperties class. */ + public AatpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java index 22c53e70b3363..1563c755d3e16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AccountEntityProperties.java @@ -86,6 +86,10 @@ public final class AccountEntityProperties extends EntityCommonProperties { @JsonProperty(value = "dnsDomain", access = JsonProperty.Access.WRITE_ONLY) private String dnsDomain; + /** Creates an instance of AccountEntityProperties class. */ + public AccountEntityProperties() { + } + /** * Get the aadTenantId property: The Azure Active Directory tenant id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java index 412a0c40b92e1..67708914e0847 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionRequestProperties.java @@ -18,6 +18,10 @@ public final class ActionRequestProperties extends ActionPropertiesBase { @JsonProperty(value = "triggerUri", required = true) private String triggerUri; + /** Creates an instance of ActionRequestProperties class. */ + public ActionRequestProperties() { + } + /** * Get the triggerUri property: Logic App Callback URL for this specific workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java index 3122bbedd575f..59f6d9376c5cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseInner.java @@ -17,6 +17,10 @@ public final class ActionResponseInner extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionResponseProperties innerProperties; + /** Creates an instance of ActionResponseInner class. */ + public ActionResponseInner() { + } + /** * Get the innerProperties property: Action properties for get request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java index 0661a17d64444..785b119c87b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActionResponseProperties.java @@ -17,6 +17,10 @@ public final class ActionResponseProperties extends ActionPropertiesBase { @JsonProperty(value = "workflowId") private String workflowId; + /** Creates an instance of ActionResponseProperties class. */ + public ActionResponseProperties() { + } + /** * Get the workflowId property: The name of the logic app's workflow. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java index e3017231f55dc..799215801a2e6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueriesProperties.java @@ -83,6 +83,10 @@ public final class ActivityEntityQueriesProperties { @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedTimeUtc; + /** Creates an instance of ActivityEntityQueriesProperties class. */ + public ActivityEntityQueriesProperties() { + } + /** * Get the title property: The entity query title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java index f8483ae549dc3..e96290857c277 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ActivityEntityQueryTemplateProperties.java @@ -65,6 +65,10 @@ public final class ActivityEntityQueryTemplateProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> entitiesFilter; + /** Creates an instance of ActivityEntityQueryTemplateProperties class. */ + public ActivityEntityQueryTemplateProperties() { + } + /** * Get the title property: The entity query title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java index f3346f5f0a508..8f143205727b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleInner.java @@ -35,6 +35,10 @@ }) @Fluent public class AlertRuleInner extends ResourceWithEtag { + /** Creates an instance of AlertRuleInner class. */ + public AlertRuleInner() { + } + /** {@inheritDoc} */ @Override public AlertRuleInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java index a3b8dba668999..5c551acf76bb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AlertRuleTemplateInner.java @@ -43,6 +43,10 @@ public class AlertRuleTemplateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of AlertRuleTemplateInner class. */ + public AlertRuleTemplateInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java new file mode 100644 index 0000000000000..ceacd97517c3c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnalyticsRuleRunTriggerProperties.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The Analytics Rule Run Trigger properties. */ +@Fluent +public final class AnalyticsRuleRunTriggerProperties { + /* + * The executionTimeUtc property. + */ + @JsonProperty(value = "executionTimeUtc", required = true) + private OffsetDateTime executionTimeUtc; + + /** Creates an instance of AnalyticsRuleRunTriggerProperties class. */ + public AnalyticsRuleRunTriggerProperties() { + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.executionTimeUtc; + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the AnalyticsRuleRunTriggerProperties object itself. + */ + public AnalyticsRuleRunTriggerProperties withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (executionTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property executionTimeUtc in model AnalyticsRuleRunTriggerProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AnalyticsRuleRunTriggerProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java index 1dbd5f5a9d027..70189cf9a7830 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomaliesSettingsProperties.java @@ -16,6 +16,10 @@ public final class AnomaliesSettingsProperties { @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isEnabled; + /** Creates an instance of AnomaliesSettingsProperties class. */ + public AnomaliesSettingsProperties() { + } + /** * Get the isEnabled property: Determines whether the setting is enable or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java index 039d66c006749..f78270cddf6ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AnomalySecurityMLAnalyticsSettingsProperties.java @@ -103,6 +103,10 @@ public final class AnomalySecurityMLAnalyticsSettingsProperties { @JsonProperty(value = "settingsDefinitionId") private UUID settingsDefinitionId; + /** Creates an instance of AnomalySecurityMLAnalyticsSettingsProperties class. */ + public AnomalySecurityMLAnalyticsSettingsProperties() { + } + /** * Get the description property: The description of the SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java index 4e31c9709d7d4..3a37df572e0d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ApiPollingParameters.java @@ -24,6 +24,10 @@ public final class ApiPollingParameters { @JsonProperty(value = "pollingConfig") private CodelessConnectorPollingConfigProperties pollingConfig; + /** Creates an instance of ApiPollingParameters class. */ + public ApiPollingParameters() { + } + /** * Get the connectorUiConfig property: Config to describe the instructions blade. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java index c7755a357b32f..1e2d07858049d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscCheckRequirementsProperties.java @@ -16,6 +16,10 @@ public final class AscCheckRequirementsProperties { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscCheckRequirementsProperties class. */ + public AscCheckRequirementsProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java index 486d75131f913..51c71ec827fac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AscDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class AscDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AscDataConnectorProperties class. */ + public AscDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java index 1880bf1f167c8..0523e36cd73df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleInner.java @@ -23,6 +23,10 @@ public final class AutomationRuleInner extends ResourceWithEtag { @JsonProperty(value = "properties", required = true) private AutomationRuleProperties innerProperties = new AutomationRuleProperties(); + /** Creates an instance of AutomationRuleInner class. */ + public AutomationRuleInner() { + } + /** * Get the innerProperties property: Automation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java index 7208c57ed3b71..85363dedd3808 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AutomationRuleProperties.java @@ -64,6 +64,10 @@ public final class AutomationRuleProperties { @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo createdBy; + /** Creates an instance of AutomationRuleProperties class. */ + public AutomationRuleProperties() { + } + /** * Get the displayName property: The display name of the automation rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java index 49ef9cc2defa6..48fee1f98959c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsCloudTrailDataConnectorProperties.java @@ -24,6 +24,10 @@ public final class AwsCloudTrailDataConnectorProperties { @JsonProperty(value = "dataTypes", required = true) private AwsCloudTrailDataConnectorDataTypes dataTypes; + /** Creates an instance of AwsCloudTrailDataConnectorProperties class. */ + public AwsCloudTrailDataConnectorProperties() { + } + /** * Get the awsRoleArn property: The Aws Role Arn (with CloudTrailReadOnly policy) that is used to access the Aws * account. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java index fb81e27a84570..c5910740e8973 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AwsS3DataConnectorProperties.java @@ -37,6 +37,10 @@ public final class AwsS3DataConnectorProperties { @JsonProperty(value = "dataTypes", required = true) private AwsS3DataConnectorDataTypes dataTypes; + /** Creates an instance of AwsS3DataConnectorProperties class. */ + public AwsS3DataConnectorProperties() { + } + /** * Get the destinationTable property: The logs destination table name in LogAnalytics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java index e73dcc2482d49..6fe113c9c158e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/AzureResourceEntityProperties.java @@ -23,6 +23,10 @@ public final class AzureResourceEntityProperties extends EntityCommonProperties @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY) private String subscriptionId; + /** Creates an instance of AzureResourceEntityProperties class. */ + public AzureResourceEntityProperties() { + } + /** * Get the resourceId property: The azure resource id of the resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java index 24e6c6ae3a874..625cdd6aade5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkExpandResponseInner.java @@ -24,6 +24,10 @@ public final class BookmarkExpandResponseInner { @JsonProperty(value = "value") private BookmarkExpandResponseValue value; + /** Creates an instance of BookmarkExpandResponseInner class. */ + public BookmarkExpandResponseInner() { + } + /** * Get the metadata property: The metadata from the expansion operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java index 5d04c419ecc56..994355b88b8f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkInner.java @@ -23,6 +23,10 @@ public final class BookmarkInner extends ResourceWithEtag { @JsonProperty(value = "properties") private BookmarkProperties innerProperties; + /** Creates an instance of BookmarkInner class. */ + public BookmarkInner() { + } + /** * Get the innerProperties property: Bookmark properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java index 44be7d59238af..2436eecd63434 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/BookmarkProperties.java @@ -113,6 +113,10 @@ public final class BookmarkProperties { @JsonProperty(value = "techniques") private List techniques; + /** Creates an instance of BookmarkProperties class. */ + public BookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java index 3b8a4b7b7a4ee..0a73580c561b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CloudApplicationEntityProperties.java @@ -30,6 +30,10 @@ public final class CloudApplicationEntityProperties extends EntityCommonProperti @JsonProperty(value = "instanceName", access = JsonProperty.Access.WRITE_ONLY) private String instanceName; + /** Creates an instance of CloudApplicationEntityProperties class. */ + public CloudApplicationEntityProperties() { + } + /** * Get the appId property: The technical identifier of the application. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java index ec2fa5baa2728..2cf1829de01bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/CodelessParameters.java @@ -17,6 +17,10 @@ public final class CodelessParameters { @JsonProperty(value = "connectorUiConfig") private CodelessUiConnectorConfigProperties connectorUiConfig; + /** Creates an instance of CodelessParameters class. */ + public CodelessParameters() { + } + /** * Get the connectorUiConfig property: Config to describe the instructions blade. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java index cfec062d16099..d155b4a5e67cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorInner.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.securityinsights.models.IoTDataConnector; import com.azure.resourcemanager.securityinsights.models.McasDataConnector; import com.azure.resourcemanager.securityinsights.models.MdatpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; import com.azure.resourcemanager.securityinsights.models.MstiDataConnector; import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -48,6 +49,9 @@ @JsonSubTypes.Type(name = "MicrosoftCloudAppSecurity", value = McasDataConnector.class), @JsonSubTypes.Type(name = "Dynamics365", value = Dynamics365DataConnector.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpDataConnector.class), + @JsonSubTypes.Type( + name = "MicrosoftPurviewInformationProtection", + value = MicrosoftPurviewInformationProtectionDataConnector.class), @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectDataConnector.class), @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBIDataConnector.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmDataConnector.class), @@ -61,6 +65,10 @@ }) @Fluent public class DataConnectorInner extends ResourceWithEtag { + /** Creates an instance of DataConnectorInner class. */ + public DataConnectorInner() { + } + /** {@inheritDoc} */ @Override public DataConnectorInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java index 6fde14a69e47e..b99c5fd6bd29d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DataConnectorRequirementsStateInner.java @@ -24,6 +24,10 @@ public final class DataConnectorRequirementsStateInner { @JsonProperty(value = "licenseState") private DataConnectorLicenseState licenseState; + /** Creates an instance of DataConnectorRequirementsStateInner class. */ + public DataConnectorRequirementsStateInner() { + } + /** * Get the authorizationState property: Authorization state for this connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java index 5565c6456bf3b..b197548705d5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/DnsEntityProperties.java @@ -36,6 +36,10 @@ public final class DnsEntityProperties extends EntityCommonProperties { @JsonProperty(value = "ipAddressEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List ipAddressEntityIds; + /** Creates an instance of DnsEntityProperties class. */ + public DnsEntityProperties() { + } + /** * Get the dnsServerIpEntityId property: An ip entity id for the dns server resolving the request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java index e88e1fce95ed4..9e374b9155e94 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365CheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Dynamics365 requirements check properties. */ @Fluent public final class Dynamics365CheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of Dynamics365CheckRequirementsProperties class. */ + public Dynamics365CheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public Dynamics365CheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java index bde2773bc7c97..250a414e49c6e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Dynamics365DataConnectorProperties.java @@ -19,6 +19,10 @@ public final class Dynamics365DataConnectorProperties extends DataConnectorTenan @JsonProperty(value = "dataTypes", required = true) private Dynamics365DataConnectorDataTypes dataTypes; + /** Creates an instance of Dynamics365DataConnectorProperties class. */ + public Dynamics365DataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java index 17b9864df9bbb..7f9cebb082e42 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentDomainWhoisInner.java @@ -48,6 +48,10 @@ public final class EnrichmentDomainWhoisInner { @JsonProperty(value = "parsedWhois") private EnrichmentDomainWhoisDetails parsedWhois; + /** Creates an instance of EnrichmentDomainWhoisInner class. */ + public EnrichmentDomainWhoisInner() { + } + /** * Get the domain property: The domain for this whois record. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java index 8fc05f9c066a9..19bf540c2cc9c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EnrichmentIpGeodataInner.java @@ -112,6 +112,10 @@ public final class EnrichmentIpGeodataInner { @JsonProperty(value = "stateCode") private String stateCode; + /** Creates an instance of EnrichmentIpGeodataInner class. */ + public EnrichmentIpGeodataInner() { + } + /** * Get the asn property: The autonomous system number associated with this IP address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java index 286aa9d87ccc6..4b4404e2ce9cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityAnalyticsProperties.java @@ -18,6 +18,10 @@ public final class EntityAnalyticsProperties { @JsonProperty(value = "entityProviders") private List entityProviders; + /** Creates an instance of EntityAnalyticsProperties class. */ + public EntityAnalyticsProperties() { + } + /** * Get the entityProviders property: The relevant entity providers that are synced. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java index 1526fff102b44..29ad5815e1d4e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityExpandResponseInner.java @@ -24,6 +24,10 @@ public final class EntityExpandResponseInner { @JsonProperty(value = "value") private EntityExpandResponseValue value; + /** Creates an instance of EntityExpandResponseInner class. */ + public EntityExpandResponseInner() { + } + /** * Get the metadata property: The metadata from the expansion operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java index 0b2543093f8ee..01e887ab5e842 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityGetInsightsResponseInner.java @@ -25,6 +25,10 @@ public final class EntityGetInsightsResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of EntityGetInsightsResponseInner class. */ + public EntityGetInsightsResponseInner() { + } + /** * Get the metadata property: The metadata from the get insights operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java index f829a29d3b07d..e4e1cd75d704a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityInner.java @@ -73,6 +73,10 @@ public class EntityInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of EntityInner class. */ + public EntityInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java index f1bdc7049f0e0..7c1dd21af0808 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryInner.java @@ -25,6 +25,10 @@ }) @Fluent public class EntityQueryInner extends ResourceWithEtag { + /** Creates an instance of EntityQueryInner class. */ + public EntityQueryInner() { + } + /** {@inheritDoc} */ @Override public EntityQueryInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java index b0d7b460f1ae8..ffaa9e8e9c8b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityQueryTemplateInner.java @@ -29,6 +29,10 @@ public class EntityQueryTemplateInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of EntityQueryTemplateInner class. */ + public EntityQueryTemplateInner() { + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java index 14d25888dac98..49d0fde3c2c13 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EntityTimelineResponseInner.java @@ -25,6 +25,10 @@ public final class EntityTimelineResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of EntityTimelineResponseInner class. */ + public EntityTimelineResponseInner() { + } + /** * Get the metadata property: The metadata from the timeline operation results. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java index 5f1ff9e9d6f58..2aa172898641f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ExpansionEntityQueriesProperties.java @@ -48,6 +48,10 @@ public final class ExpansionEntityQueriesProperties { @JsonProperty(value = "queryTemplate") private String queryTemplate; + /** Creates an instance of ExpansionEntityQueriesProperties class. */ + public ExpansionEntityQueriesProperties() { + } + /** * Get the dataSources property: List of the data sources that are required to run the query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java index 90e3adfec3d77..9c2629cc652c2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/EyesOnSettingsProperties.java @@ -16,6 +16,10 @@ public final class EyesOnSettingsProperties { @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) private Boolean isEnabled; + /** Creates an instance of EyesOnSettingsProperties class. */ + public EyesOnSettingsProperties() { + } + /** * Get the isEnabled property: Determines whether the setting is enable or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java index 7588902fa6034..9fc1d12ab5d5c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileEntityProperties.java @@ -36,6 +36,10 @@ public final class FileEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hostEntityId", access = JsonProperty.Access.WRITE_ONLY) private String hostEntityId; + /** Creates an instance of FileEntityProperties class. */ + public FileEntityProperties() { + } + /** * Get the directory property: The full path to the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java index 8ebadc2878607..aeb52c51f490f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileHashEntityProperties.java @@ -24,6 +24,10 @@ public final class FileHashEntityProperties extends EntityCommonProperties { @JsonProperty(value = "hashValue", access = JsonProperty.Access.WRITE_ONLY) private String hashValue; + /** Creates an instance of FileHashEntityProperties class. */ + public FileHashEntityProperties() { + } + /** * Get the algorithm property: The hash algorithm type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java index fe47f14b590cb..f74e253ce149a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportInner.java @@ -31,6 +31,10 @@ public final class FileImportInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of FileImportInner class. */ + public FileImportInner() { + } + /** * Get the innerProperties property: File import properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java index 1ae17de2e4938..36ec96e9f4fc1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FileImportProperties.java @@ -96,6 +96,10 @@ public final class FileImportProperties { @JsonProperty(value = "importValidUntilTimeUTC", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime importValidUntilTimeUtc; + /** Creates an instance of FileImportProperties class. */ + public FileImportProperties() { + } + /** * Get the ingestionMode property: Describes how to ingest the records in the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java index 3ce589c95ac66..cb5aa5599a7ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleProperties.java @@ -77,6 +77,10 @@ public final class FusionAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of FusionAlertRuleProperties class. */ + public FusionAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java index 162717edb32f2..a6d980efc93ea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/FusionAlertRuleTemplateProperties.java @@ -83,6 +83,10 @@ public final class FusionAlertRuleTemplateProperties { @JsonProperty(value = "sourceSettings") private List sourceSettings; + /** Creates an instance of FusionAlertRuleTemplateProperties class. */ + public FusionAlertRuleTemplateProperties() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java index d001a56c976d5..24162b32c41b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/GetQueriesResponseInner.java @@ -18,6 +18,10 @@ public final class GetQueriesResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of GetQueriesResponseInner class. */ + public GetQueriesResponseInner() { + } + /** * Get the value property: The query result values. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java index 16f6768461088..7e8f10cbaac04 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HostEntityProperties.java @@ -67,6 +67,10 @@ public final class HostEntityProperties extends EntityCommonProperties { @JsonProperty(value = "osVersion", access = JsonProperty.Access.WRITE_ONLY) private String osVersion; + /** Creates an instance of HostEntityProperties class. */ + public HostEntityProperties() { + } + /** * Get the azureId property: The azure resource id of the VM. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java index 5be6c7dc4e9b8..52b6ecb245167 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/HuntingBookmarkProperties.java @@ -82,6 +82,10 @@ public final class HuntingBookmarkProperties extends EntityCommonProperties { @JsonProperty(value = "incidentInfo") private IncidentInfo incidentInfo; + /** Creates an instance of HuntingBookmarkProperties class. */ + public HuntingBookmarkProperties() { + } + /** * Get the created property: The time the bookmark was created. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java index 18459e1b4f138..c5e7f0834b7df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentAlertListInner.java @@ -19,6 +19,10 @@ public final class IncidentAlertListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentAlertListInner class. */ + public IncidentAlertListInner() { + } + /** * Get the value property: Array of incident alerts. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java index aa6aec92f5881..e313e259db7a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentBookmarkListInner.java @@ -19,6 +19,10 @@ public final class IncidentBookmarkListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentBookmarkListInner class. */ + public IncidentBookmarkListInner() { + } + /** * Get the value property: Array of incident bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java index 5bde60b473fa1..0f617183d8d18 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentInner.java @@ -19,6 +19,10 @@ public final class IncidentCommentInner extends ResourceWithEtag { @JsonProperty(value = "properties") private IncidentCommentProperties innerProperties; + /** Creates an instance of IncidentCommentInner class. */ + public IncidentCommentInner() { + } + /** * Get the innerProperties property: Incident comment properties. * @@ -35,24 +39,6 @@ public IncidentCommentInner withEtag(String etag) { return this; } - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); - } - /** * Get the message property: The comment message. * @@ -76,6 +62,24 @@ public IncidentCommentInner withMessage(String message) { return this; } + /** + * Get the createdTimeUtc property: The time the comment was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + } + + /** + * Get the lastModifiedTimeUtc property: The time the comment was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + /** * Get the author property: Describes the client that created the comment. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java index 6cc4d172a5e22..5f96cf5d770f3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentCommentProperties.java @@ -13,6 +13,12 @@ /** Incident comment property bag. */ @Fluent public final class IncidentCommentProperties { + /* + * The comment message + */ + @JsonProperty(value = "message", required = true) + private String message; + /* * The time the comment was created */ @@ -25,34 +31,14 @@ public final class IncidentCommentProperties { @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedTimeUtc; - /* - * The comment message - */ - @JsonProperty(value = "message", required = true) - private String message; - /* * Describes the client that created the comment */ @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) private ClientInfo author; - /** - * Get the createdTimeUtc property: The time the comment was created. - * - * @return the createdTimeUtc value. - */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; - } - - /** - * Get the lastModifiedTimeUtc property: The time the comment was updated. - * - * @return the lastModifiedTimeUtc value. - */ - public OffsetDateTime lastModifiedTimeUtc() { - return this.lastModifiedTimeUtc; + /** Creates an instance of IncidentCommentProperties class. */ + public IncidentCommentProperties() { } /** @@ -75,6 +61,24 @@ public IncidentCommentProperties withMessage(String message) { return this; } + /** + * Get the createdTimeUtc property: The time the comment was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the lastModifiedTimeUtc property: The time the comment was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + /** * Get the author property: Describes the client that created the comment. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java index 3f6dbe089b16e..60024736964d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentEntitiesResponseInner.java @@ -24,6 +24,10 @@ public final class IncidentEntitiesResponseInner { @JsonProperty(value = "metaData") private List metadata; + /** Creates an instance of IncidentEntitiesResponseInner class. */ + public IncidentEntitiesResponseInner() { + } + /** * Get the entities property: Array of the incident related entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java index 7f44360a2ebdf..60a887a60352b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java @@ -17,17 +17,21 @@ import java.time.OffsetDateTime; import java.util.List; -/** Represents an incident in Azure Security Insights. */ +/** The Incident model. */ @Fluent public final class IncidentInner extends ResourceWithEtag { /* - * Incident properties + * The properties property. */ @JsonProperty(value = "properties") private IncidentPropertiesInner innerProperties; + /** Creates an instance of IncidentInner class. */ + public IncidentInner() { + } + /** - * Get the innerProperties property: Incident properties. + * Get the innerProperties property: The properties property. * * @return the innerProperties value. */ @@ -43,222 +47,232 @@ public IncidentInner withEtag(String etag) { } /** - * Get the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - public IncidentAdditionalData additionalData() { - return this.innerProperties() == null ? null : this.innerProperties().additionalData(); - } - - /** - * Get the classification property: The reason the incident was closed. + * Get the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - public IncidentClassification classification() { - return this.innerProperties() == null ? null : this.innerProperties().classification(); + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); } /** - * Set the classification property: The reason the incident was closed. + * Set the title property: The title of the incident. * - * @param classification the classification value to set. + * @param title the title value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassification(IncidentClassification classification) { + public IncidentInner withTitle(String title) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassification(classification); + this.innerProperties().withTitle(title); return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - public String classificationComment() { - return this.innerProperties() == null ? null : this.innerProperties().classificationComment(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the description property: The description of the incident. * - * @param classificationComment the classificationComment value to set. + * @param description the description value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassificationComment(String classificationComment) { + public IncidentInner withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassificationComment(classificationComment); + this.innerProperties().withDescription(description); return this; } /** - * Get the classificationReason property: The classification reason the incident was closed with. + * Get the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - public IncidentClassificationReason classificationReason() { - return this.innerProperties() == null ? null : this.innerProperties().classificationReason(); + public IncidentSeverity severity() { + return this.innerProperties() == null ? null : this.innerProperties().severity(); } /** - * Set the classificationReason property: The classification reason the incident was closed with. + * Set the severity property: The severity of the incident. * - * @param classificationReason the classificationReason value to set. + * @param severity the severity value to set. * @return the IncidentInner object itself. */ - public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { + public IncidentInner withSeverity(IncidentSeverity severity) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withClassificationReason(classificationReason); + this.innerProperties().withSeverity(severity); return this; } /** - * Get the createdTimeUtc property: The time the incident was created. + * Get the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - public OffsetDateTime createdTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + public IncidentStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Get the description property: The description of the incident. + * Set the status property: The status of the incident. * - * @return the description value. + * @param status the status value to set. + * @return the IncidentInner object itself. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public IncidentInner withStatus(IncidentStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentPropertiesInner(); + } + this.innerProperties().withStatus(status); + return this; } /** - * Set the description property: The description of the incident. + * Get the classification property: The reason the incident was closed. * - * @param description the description value to set. + * @return the classification value. + */ + public IncidentClassification classification() { + return this.innerProperties() == null ? null : this.innerProperties().classification(); + } + + /** + * Set the classification property: The reason the incident was closed. + * + * @param classification the classification value to set. * @return the IncidentInner object itself. */ - public IncidentInner withDescription(String description) { + public IncidentInner withClassification(IncidentClassification classification) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withDescription(description); + this.innerProperties().withClassification(classification); return this; } /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. + * Get the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - public OffsetDateTime firstActivityTimeUtc() { - return this.innerProperties() == null ? null : this.innerProperties().firstActivityTimeUtc(); + public IncidentClassificationReason classificationReason() { + return this.innerProperties() == null ? null : this.innerProperties().classificationReason(); } /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. + * Set the classificationReason property: The classification reason the incident was closed with. * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. + * @param classificationReason the classificationReason value to set. * @return the IncidentInner object itself. */ - public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + public IncidentInner withClassificationReason(IncidentClassificationReason classificationReason) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); + this.innerProperties().withClassificationReason(classificationReason); return this; } /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - public String incidentUrl() { - return this.innerProperties() == null ? null : this.innerProperties().incidentUrl(); + public String classificationComment() { + return this.innerProperties() == null ? null : this.innerProperties().classificationComment(); } /** - * Get the incidentNumber property: A sequential number. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentNumber value. + * @param classificationComment the classificationComment value to set. + * @return the IncidentInner object itself. */ - public Integer incidentNumber() { - return this.innerProperties() == null ? null : this.innerProperties().incidentNumber(); + public IncidentInner withClassificationComment(String classificationComment) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentPropertiesInner(); + } + this.innerProperties().withClassificationComment(classificationComment); + return this; } /** - * Get the labels property: List of labels relevant to this incident. + * Get the owner property: Describes a user that the incident is assigned to. * - * @return the labels value. + * @return the owner value. */ - public List labels() { - return this.innerProperties() == null ? null : this.innerProperties().labels(); + public IncidentOwnerInfo owner() { + return this.innerProperties() == null ? null : this.innerProperties().owner(); } /** - * Set the labels property: List of labels relevant to this incident. + * Set the owner property: Describes a user that the incident is assigned to. * - * @param labels the labels value to set. + * @param owner the owner value to set. * @return the IncidentInner object itself. */ - public IncidentInner withLabels(List labels) { + public IncidentInner withOwner(IncidentOwnerInfo owner) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withLabels(labels); + this.innerProperties().withOwner(owner); return this; } /** - * Get the providerName property: The name of the source provider that generated the incident. + * Get the labels property: List of labels relevant to this incident. * - * @return the providerName value. + * @return the labels value. */ - public String providerName() { - return this.innerProperties() == null ? null : this.innerProperties().providerName(); + public List labels() { + return this.innerProperties() == null ? null : this.innerProperties().labels(); } /** - * Set the providerName property: The name of the source provider that generated the incident. + * Set the labels property: List of labels relevant to this incident. * - * @param providerName the providerName value to set. + * @param labels the labels value to set. * @return the IncidentInner object itself. */ - public IncidentInner withProviderName(String providerName) { + public IncidentInner withLabels(List labels) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withProviderName(providerName); + this.innerProperties().withLabels(labels); return this; } /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. + * Get the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - public String providerIncidentId() { - return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); + public OffsetDateTime firstActivityTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().firstActivityTimeUtc(); } /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. + * Set the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId the providerIncidentId value to set. + * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. * @return the IncidentInner object itself. */ - public IncidentInner withProviderIncidentId(String providerIncidentId) { + public IncidentInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withProviderIncidentId(providerIncidentId); + this.innerProperties().withFirstActivityTimeUtc(firstActivityTimeUtc); return this; } @@ -295,26 +309,30 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - public IncidentOwnerInfo owner() { - return this.innerProperties() == null ? null : this.innerProperties().owner(); + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Get the incidentNumber property: A sequential number. * - * @param owner the owner value to set. - * @return the IncidentInner object itself. + * @return the incidentNumber value. */ - public IncidentInner withOwner(IncidentOwnerInfo owner) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withOwner(owner); - return this; + public Integer incidentNumber() { + return this.innerProperties() == null ? null : this.innerProperties().incidentNumber(); + } + + /** + * Get the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + public IncidentAdditionalData additionalData() { + return this.innerProperties() == null ? null : this.innerProperties().additionalData(); } /** @@ -327,48 +345,57 @@ public List relatedAnalyticRuleIds() { } /** - * Get the severity property: The severity of the incident. + * Get the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - public IncidentSeverity severity() { - return this.innerProperties() == null ? null : this.innerProperties().severity(); + public String incidentUrl() { + return this.innerProperties() == null ? null : this.innerProperties().incidentUrl(); } /** - * Set the severity property: The severity of the incident. + * Get the providerName property: The name of the source provider that generated the incident. * - * @param severity the severity value to set. + * @return the 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 withSeverity(IncidentSeverity severity) { + public IncidentInner withProviderName(String providerName) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withSeverity(severity); + this.innerProperties().withProviderName(providerName); return this; } /** - * Get the status property: The status of the incident. + * Get the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the status value. + * @return the providerIncidentId value. */ - public IncidentStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + public String providerIncidentId() { + return this.innerProperties() == null ? null : this.innerProperties().providerIncidentId(); } /** - * Set the status property: The status of the incident. + * Set the providerIncidentId property: The incident ID assigned by the incident provider. * - * @param status the status value to set. + * @param providerIncidentId the providerIncidentId value to set. * @return the IncidentInner object itself. */ - public IncidentInner withStatus(IncidentStatus status) { + public IncidentInner withProviderIncidentId(String providerIncidentId) { if (this.innerProperties() == null) { this.innerProperties = new IncidentPropertiesInner(); } - this.innerProperties().withStatus(status); + this.innerProperties().withProviderIncidentId(providerIncidentId); return this; } @@ -395,29 +422,6 @@ public IncidentInner withTeamInformation(TeamInformationInner teamInformation) { return this; } - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentInner object itself. - */ - public IncidentInner withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new IncidentPropertiesInner(); - } - this.innerProperties().withTitle(title); - return this; - } - /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java index 5262e2c3ba589..f2048dd4265b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentPropertiesInner.java @@ -17,62 +17,56 @@ import java.time.OffsetDateTime; import java.util.List; -/** Describes incident properties. */ +/** The IncidentProperties model. */ @Fluent public final class IncidentPropertiesInner { /* - * Additional data on the incident - */ - @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) - private IncidentAdditionalData additionalData; - - /* - * The reason the incident was closed + * The title of the incident */ - @JsonProperty(value = "classification") - private IncidentClassification classification; + @JsonProperty(value = "title", required = true) + private String title; /* - * Describes the reason the incident was closed + * The description of the incident */ - @JsonProperty(value = "classificationComment") - private String classificationComment; + @JsonProperty(value = "description") + private String description; /* - * The classification reason the incident was closed with + * The severity of the incident */ - @JsonProperty(value = "classificationReason") - private IncidentClassificationReason classificationReason; + @JsonProperty(value = "severity", required = true) + private IncidentSeverity severity; /* - * The time the incident was created + * The status of the incident */ - @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTimeUtc; + @JsonProperty(value = "status", required = true) + private IncidentStatus status; /* - * The description of the incident + * The reason the incident was closed */ - @JsonProperty(value = "description") - private String description; + @JsonProperty(value = "classification") + private IncidentClassification classification; /* - * The time of the first activity in the incident + * The classification reason the incident was closed with */ - @JsonProperty(value = "firstActivityTimeUtc") - private OffsetDateTime firstActivityTimeUtc; + @JsonProperty(value = "classificationReason") + private IncidentClassificationReason classificationReason; /* - * The deep-link url to the incident in Azure portal + * Describes the reason the incident was closed */ - @JsonProperty(value = "incidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String incidentUrl; + @JsonProperty(value = "classificationComment") + private String classificationComment; /* - * A sequential number + * Describes a user that the incident is assigned to */ - @JsonProperty(value = "incidentNumber", access = JsonProperty.Access.WRITE_ONLY) - private Integer incidentNumber; + @JsonProperty(value = "owner") + private IncidentOwnerInfo owner; /* * List of labels relevant to this incident @@ -81,16 +75,10 @@ public final class IncidentPropertiesInner { private List labels; /* - * The name of the source provider that generated the incident - */ - @JsonProperty(value = "providerName") - private String providerName; - - /* - * The incident ID assigned by the incident provider + * The time of the first activity in the incident */ - @JsonProperty(value = "providerIncidentId") - private String providerIncidentId; + @JsonProperty(value = "firstActivityTimeUtc") + private OffsetDateTime firstActivityTimeUtc; /* * The time of the last activity in the incident @@ -105,10 +93,22 @@ public final class IncidentPropertiesInner { private OffsetDateTime lastModifiedTimeUtc; /* - * Describes a user that the incident is assigned to + * The time the incident was created */ - @JsonProperty(value = "owner") - private IncidentOwnerInfo owner; + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * A sequential number + */ + @JsonProperty(value = "incidentNumber", access = JsonProperty.Access.WRITE_ONLY) + private Integer incidentNumber; + + /* + * Additional data on the incident + */ + @JsonProperty(value = "additionalData", access = JsonProperty.Access.WRITE_ONLY) + private IncidentAdditionalData additionalData; /* * List of resource ids of Analytic rules related to the incident @@ -117,16 +117,22 @@ public final class IncidentPropertiesInner { private List relatedAnalyticRuleIds; /* - * The severity of the incident + * The deep-link url to the incident in Azure portal */ - @JsonProperty(value = "severity", required = true) - private IncidentSeverity severity; + @JsonProperty(value = "incidentUrl", access = JsonProperty.Access.WRITE_ONLY) + private String incidentUrl; /* - * The status of the incident + * The name of the source provider that generated the incident */ - @JsonProperty(value = "status", required = true) - private IncidentStatus status; + @JsonProperty(value = "providerName") + private String providerName; + + /* + * The incident ID assigned by the incident provider + */ + @JsonProperty(value = "providerIncidentId") + private String providerIncidentId; /* * Describes a team for the incident @@ -134,146 +140,168 @@ public final class IncidentPropertiesInner { @JsonProperty(value = "teamInformation") private TeamInformationInner teamInformation; - /* - * The title of the incident + /** Creates an instance of IncidentPropertiesInner class. */ + public IncidentPropertiesInner() { + } + + /** + * Get the title property: The title of the incident. + * + * @return the title value. */ - @JsonProperty(value = "title", required = true) - private String title; + public String title() { + return this.title; + } /** - * Get the additionalData property: Additional data on the incident. + * Set the title property: The title of the incident. * - * @return the additionalData value. + * @param title the title value to set. + * @return the IncidentPropertiesInner object itself. */ - public IncidentAdditionalData additionalData() { - return this.additionalData; + public IncidentPropertiesInner withTitle(String title) { + this.title = title; + return this; } /** - * Get the classification property: The reason the incident was closed. + * Get the description property: The description of the incident. * - * @return the classification value. + * @return the description value. */ - public IncidentClassification classification() { - return this.classification; + public String description() { + return this.description; } /** - * Set the classification property: The reason the incident was closed. + * Set the description property: The description of the incident. * - * @param classification the classification value to set. + * @param description the description value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassification(IncidentClassification classification) { - this.classification = classification; + public IncidentPropertiesInner withDescription(String description) { + this.description = description; return this; } /** - * Get the classificationComment property: Describes the reason the incident was closed. + * Get the severity property: The severity of the incident. * - * @return the classificationComment value. + * @return the severity value. */ - public String classificationComment() { - return this.classificationComment; + public IncidentSeverity severity() { + return this.severity; } /** - * Set the classificationComment property: Describes the reason the incident was closed. + * Set the severity property: The severity of the incident. * - * @param classificationComment the classificationComment value to set. + * @param severity the severity value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassificationComment(String classificationComment) { - this.classificationComment = classificationComment; + public IncidentPropertiesInner withSeverity(IncidentSeverity severity) { + this.severity = severity; return this; } /** - * Get the classificationReason property: The classification reason the incident was closed with. + * Get the status property: The status of the incident. * - * @return the classificationReason value. + * @return the status value. */ - public IncidentClassificationReason classificationReason() { - return this.classificationReason; + public IncidentStatus status() { + return this.status; } /** - * Set the classificationReason property: The classification reason the incident was closed with. + * Set the status property: The status of the incident. * - * @param classificationReason the classificationReason value to set. + * @param status the status value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { - this.classificationReason = classificationReason; + public IncidentPropertiesInner withStatus(IncidentStatus status) { + this.status = status; return this; } /** - * Get the createdTimeUtc property: The time the incident was created. + * Get the classification property: The reason the incident was closed. * - * @return the createdTimeUtc value. + * @return the classification value. */ - public OffsetDateTime createdTimeUtc() { - return this.createdTimeUtc; + public IncidentClassification classification() { + return this.classification; } /** - * Get the description property: The description of the incident. + * Set the classification property: The reason the incident was closed. * - * @return the description value. + * @param classification the classification value to set. + * @return the IncidentPropertiesInner object itself. */ - public String description() { - return this.description; + public IncidentPropertiesInner withClassification(IncidentClassification classification) { + this.classification = classification; + return this; } /** - * Set the description property: The description of the incident. + * Get the classificationReason property: The classification reason the incident was closed with. * - * @param description the description value to set. + * @return the classificationReason value. + */ + public IncidentClassificationReason classificationReason() { + return this.classificationReason; + } + + /** + * Set the classificationReason property: The classification reason the incident was closed with. + * + * @param classificationReason the classificationReason value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withDescription(String description) { - this.description = description; + public IncidentPropertiesInner withClassificationReason(IncidentClassificationReason classificationReason) { + this.classificationReason = classificationReason; return this; } /** - * Get the firstActivityTimeUtc property: The time of the first activity in the incident. + * Get the classificationComment property: Describes the reason the incident was closed. * - * @return the firstActivityTimeUtc value. + * @return the classificationComment value. */ - public OffsetDateTime firstActivityTimeUtc() { - return this.firstActivityTimeUtc; + public String classificationComment() { + return this.classificationComment; } /** - * Set the firstActivityTimeUtc property: The time of the first activity in the incident. + * Set the classificationComment property: Describes the reason the incident was closed. * - * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. + * @param classificationComment the classificationComment value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { - this.firstActivityTimeUtc = firstActivityTimeUtc; + public IncidentPropertiesInner withClassificationComment(String classificationComment) { + this.classificationComment = classificationComment; return this; } /** - * Get the incidentUrl property: The deep-link url to the incident in Azure portal. + * Get the owner property: Describes a user that the incident is assigned to. * - * @return the incidentUrl value. + * @return the owner value. */ - public String incidentUrl() { - return this.incidentUrl; + public IncidentOwnerInfo owner() { + return this.owner; } /** - * Get the incidentNumber property: A sequential number. + * Set the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @param owner the owner value to set. + * @return the IncidentPropertiesInner object itself. */ - public Integer incidentNumber() { - return this.incidentNumber; + public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { + this.owner = owner; + return this; } /** @@ -297,42 +325,22 @@ public IncidentPropertiesInner withLabels(List labels) { } /** - * Get the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: The name of the source provider that generated the incident. - * - * @param providerName the providerName value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the providerIncidentId property: The incident ID assigned by the incident provider. + * Get the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - public String providerIncidentId() { - return this.providerIncidentId; + public OffsetDateTime firstActivityTimeUtc() { + return this.firstActivityTimeUtc; } /** - * Set the providerIncidentId property: The incident ID assigned by the incident provider. + * Set the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId the providerIncidentId value to set. + * @param firstActivityTimeUtc the firstActivityTimeUtc value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withProviderIncidentId(String providerIncidentId) { - this.providerIncidentId = providerIncidentId; + public IncidentPropertiesInner withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc) { + this.firstActivityTimeUtc = firstActivityTimeUtc; return this; } @@ -366,23 +374,30 @@ public OffsetDateTime lastModifiedTimeUtc() { } /** - * Get the owner property: Describes a user that the incident is assigned to. + * Get the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - public IncidentOwnerInfo owner() { - return this.owner; + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; } /** - * Set the owner property: Describes a user that the incident is assigned to. + * Get the incidentNumber property: A sequential number. * - * @param owner the owner value to set. - * @return the IncidentPropertiesInner object itself. + * @return the incidentNumber value. */ - public IncidentPropertiesInner withOwner(IncidentOwnerInfo owner) { - this.owner = owner; - return this; + public Integer incidentNumber() { + return this.incidentNumber; + } + + /** + * Get the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + public IncidentAdditionalData additionalData() { + return this.additionalData; } /** @@ -395,42 +410,51 @@ public List relatedAnalyticRuleIds() { } /** - * Get the severity property: The severity of the incident. + * Get the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - public IncidentSeverity severity() { - return this.severity; + public String incidentUrl() { + return this.incidentUrl; } /** - * Set the severity property: The severity of the incident. + * Get the providerName property: The name of the source provider that generated the incident. * - * @param severity the severity value to set. + * @return the 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 withSeverity(IncidentSeverity severity) { - this.severity = severity; + public IncidentPropertiesInner withProviderName(String providerName) { + this.providerName = providerName; return this; } /** - * Get the status property: The status of the incident. + * Get the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the status value. + * @return the providerIncidentId value. */ - public IncidentStatus status() { - return this.status; + public String providerIncidentId() { + return this.providerIncidentId; } /** - * Set the status property: The status of the incident. + * Set the providerIncidentId property: The incident ID assigned by the incident provider. * - * @param status the status value to set. + * @param providerIncidentId the providerIncidentId value to set. * @return the IncidentPropertiesInner object itself. */ - public IncidentPropertiesInner withStatus(IncidentStatus status) { - this.status = status; + public IncidentPropertiesInner withProviderIncidentId(String providerIncidentId) { + this.providerIncidentId = providerIncidentId; return this; } @@ -454,40 +478,16 @@ public IncidentPropertiesInner withTeamInformation(TeamInformationInner teamInfo return this; } - /** - * Get the title property: The title of the incident. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The title of the incident. - * - * @param title the title value to set. - * @return the IncidentPropertiesInner object itself. - */ - public IncidentPropertiesInner withTitle(String title) { - this.title = title; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (additionalData() != null) { - additionalData().validate(); - } - if (labels() != null) { - labels().forEach(e -> e.validate()); - } - if (owner() != null) { - owner().validate(); + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); } if (severity() == null) { throw LOGGER @@ -500,14 +500,18 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property status in model IncidentPropertiesInner")); } + if (owner() != null) { + owner().validate(); + } + if (labels() != null) { + labels().forEach(e -> e.validate()); + } + if (additionalData() != null) { + additionalData().validate(); + } if (teamInformation() != null) { teamInformation().validate(); } - if (title() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property title in model IncidentPropertiesInner")); - } } private static final ClientLogger LOGGER = new ClientLogger(IncidentPropertiesInner.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java new file mode 100644 index 0000000000000..d3326ded49d10 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskInner.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ClientInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The IncidentTask model. */ +@Fluent +public final class IncidentTaskInner extends ResourceWithEtag { + /* + * The properties property. + */ + @JsonProperty(value = "properties", required = true) + private IncidentTaskProperties innerProperties = new IncidentTaskProperties(); + + /** Creates an instance of IncidentTaskInner class. */ + public IncidentTaskInner() { + } + + /** + * Get the innerProperties property: The properties property. + * + * @return the innerProperties value. + */ + private IncidentTaskProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IncidentTaskInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withTitle(String title) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withTitle(title); + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public IncidentTaskStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withStatus(IncidentTaskStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + } + + /** + * Get the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + } + + /** + * Set the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy the createdBy value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withCreatedBy(ClientInfo createdBy) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withCreatedBy(createdBy); + return this; + } + + /** + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + public ClientInfo lastModifiedBy() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedBy(); + } + + /** + * Set the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @param lastModifiedBy the lastModifiedBy value to set. + * @return the IncidentTaskInner object itself. + */ + public IncidentTaskInner withLastModifiedBy(ClientInfo lastModifiedBy) { + if (this.innerProperties() == null) { + this.innerProperties = new IncidentTaskProperties(); + } + this.innerProperties().withLastModifiedBy(lastModifiedBy); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model IncidentTaskInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentTaskInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java new file mode 100644 index 0000000000000..414bb17bd8162 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentTaskProperties.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ClientInfo; +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The IncidentTaskProperties model. */ +@Fluent +public final class IncidentTaskProperties { + /* + * The title of the task + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * The description of the task + */ + @JsonProperty(value = "description") + private String description; + + /* + * The status property. + */ + @JsonProperty(value = "status", required = true) + private IncidentTaskStatus status; + + /* + * The time the task was created + */ + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * The last time the task was updated + */ + @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedTimeUtc; + + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "createdBy") + private ClientInfo createdBy; + + /* + * Information on the client (user or application) that made some action + */ + @JsonProperty(value = "lastModifiedBy") + private ClientInfo lastModifiedBy; + + /** Creates an instance of IncidentTaskProperties class. */ + public IncidentTaskProperties() { + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public IncidentTaskStatus status() { + return this.status; + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withStatus(IncidentTaskStatus status) { + this.status = status; + return this; + } + + /** + * Get the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + public ClientInfo createdBy() { + return this.createdBy; + } + + /** + * Set the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy the createdBy value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withCreatedBy(ClientInfo createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Get the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + public ClientInfo lastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * Set the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @param lastModifiedBy the lastModifiedBy value to set. + * @return the IncidentTaskProperties object itself. + */ + public IncidentTaskProperties withLastModifiedBy(ClientInfo lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model IncidentTaskProperties")); + } + if (status() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property status in model IncidentTaskProperties")); + } + if (createdBy() != null) { + createdBy().validate(); + } + if (lastModifiedBy() != null) { + lastModifiedBy().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IncidentTaskProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java index 63643c5077a2a..6a51d0a15ac73 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTCheckRequirementsProperties.java @@ -16,6 +16,10 @@ public final class IoTCheckRequirementsProperties { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of IoTCheckRequirementsProperties class. */ + public IoTCheckRequirementsProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java index 1917add910f9e..8eba9f642ee3b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class IoTDataConnectorProperties extends DataConnectorWithAlertsPro @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of IoTDataConnectorProperties class. */ + public IoTDataConnectorProperties() { + } + /** * Get the subscriptionId property: The subscription id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java index 971f9f13da46d..8318c4f857b17 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IoTDeviceEntityProperties.java @@ -183,6 +183,10 @@ public final class IoTDeviceEntityProperties extends EntityCommonProperties { @JsonProperty(value = "isScanner", access = JsonProperty.Access.WRITE_ONLY) private Boolean isScanner; + /** Creates an instance of IoTDeviceEntityProperties class. */ + public IoTDeviceEntityProperties() { + } + /** * Get the deviceId property: The ID of the IoT Device in the IoT Hub. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java index fa6b07dd783f8..0a9b814b6a3c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IpEntityProperties.java @@ -32,6 +32,10 @@ public final class IpEntityProperties extends EntityCommonProperties { @JsonProperty(value = "threatIntelligence", access = JsonProperty.Access.WRITE_ONLY) private List threatIntelligence; + /** Creates an instance of IpEntityProperties class. */ + public IpEntityProperties() { + } + /** * Get the address property: The IP address as string, e.g. 127.0.0.1 (either in Ipv4 or Ipv6). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java index 423fdf2974b65..6e93e2edaaee0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleProperties.java @@ -63,6 +63,10 @@ public final class MLBehaviorAnalyticsAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleProperties class. */ + public MLBehaviorAnalyticsAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java index c048baca30533..f9703e6e8eb96 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MLBehaviorAnalyticsAlertRuleTemplateProperties.java @@ -23,6 +23,10 @@ public final class MLBehaviorAnalyticsAlertRuleTemplateProperties extends AlertR @JsonProperty(value = "severity", required = true) private AlertSeverity severity; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleTemplateProperties class. */ + public MLBehaviorAnalyticsAlertRuleTemplateProperties() { + } + /** * Get the severity property: The severity for alerts created by this alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java index 62c3cc3aec6a2..b523b9c536eb4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailClusterEntityProperties.java @@ -103,6 +103,10 @@ public final class MailClusterEntityProperties extends EntityCommonProperties { @JsonProperty(value = "clusterGroup", access = JsonProperty.Access.WRITE_ONLY) private String clusterGroup; + /** Creates an instance of MailClusterEntityProperties class. */ + public MailClusterEntityProperties() { + } + /** * Get the networkMessageIds property: The mail message IDs that are part of the mail cluster. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java index e2d92d2606a64..9d3fb6ad8c86f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailMessageEntityProperties.java @@ -168,6 +168,10 @@ public final class MailMessageEntityProperties extends EntityCommonProperties { @JsonProperty(value = "deliveryLocation") private DeliveryLocation deliveryLocation; + /** Creates an instance of MailMessageEntityProperties class. */ + public MailMessageEntityProperties() { + } + /** * Get the fileEntityIds property: The File entity ids of this mail message's attachments. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java index c0ec6c6fdaee8..efc2be76821be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MailboxEntityProperties.java @@ -37,6 +37,10 @@ public final class MailboxEntityProperties extends EntityCommonProperties { @JsonProperty(value = "externalDirectoryObjectId", access = JsonProperty.Access.WRITE_ONLY) private UUID externalDirectoryObjectId; + /** Creates an instance of MailboxEntityProperties class. */ + public MailboxEntityProperties() { + } + /** * Get the mailboxPrimaryAddress property: The mailbox's primary address. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java index ded00f33417f7..847174346dd7e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MalwareEntityProperties.java @@ -36,6 +36,10 @@ public final class MalwareEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processEntityIds", access = JsonProperty.Access.WRITE_ONLY) private List processEntityIds; + /** Creates an instance of MalwareEntityProperties class. */ + public MalwareEntityProperties() { + } + /** * Get the category property: The malware category by the vendor, e.g. Trojan. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java index 529764ae709a0..9e35ce58e22c7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MCAS (Microsoft Cloud App Security) requirements check properties. */ @Fluent public final class McasCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of McasCheckRequirementsProperties class. */ + public McasCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public McasCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java index 38068dd107827..c33416cc576c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/McasDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class McasDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private McasDataConnectorDataTypes dataTypes; + /** Creates an instance of McasDataConnectorProperties class. */ + public McasDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java index 789441efbf971..ed965d8ada06b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MDATP (Microsoft Defender Advanced Threat Protection) requirements check properties. */ @Fluent public final class MdatpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MdatpCheckRequirementsProperties class. */ + public MdatpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MdatpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java index a1466e451fb02..20d29e00d16ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MdatpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class MdatpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of MdatpDataConnectorProperties class. */ + public MdatpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MetadataModelInner.java index 25c3b51662426..4b0e1ecc59d31 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 @@ -25,6 +25,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. * 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..e36fcc5997b84 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 @@ -138,6 +138,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 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..3b76ce19bdaa8 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 @@ -137,6 +137,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 diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java new file mode 100644 index 0000000000000..64f4267b3b83d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionCheckRequirementsProperties.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; + +/** MicrosoftPurviewInformationProtection requirements check properties. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MicrosoftPurviewInformationProtectionCheckRequirementsProperties class. */ + public MicrosoftPurviewInformationProtectionCheckRequirementsProperties() { + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionCheckRequirementsProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java new file mode 100644 index 0000000000000..5b7f040e3a58c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftPurviewInformationProtectionDataConnectorProperties.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Microsoft Purview Information Protection data connector properties. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionDataConnectorProperties extends DataConnectorTenantId { + /* + * The available data types for the connector. + */ + @JsonProperty(value = "dataTypes", required = true) + private MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes; + + /** Creates an instance of MicrosoftPurviewInformationProtectionDataConnectorProperties class. */ + public MicrosoftPurviewInformationProtectionDataConnectorProperties() { + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes() { + return this.dataTypes; + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnectorProperties object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnectorProperties withDataTypes( + MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes) { + this.dataTypes = dataTypes; + return this; + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionDataConnectorProperties withTenantId(String tenantId) { + super.withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dataTypes() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property dataTypes in model" + + " MicrosoftPurviewInformationProtectionDataConnectorProperties")); + } else { + dataTypes().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftPurviewInformationProtectionDataConnectorProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java index 6c482ad3565a9..70a8a6b6897e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleProperties.java @@ -47,6 +47,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleProperties @JsonProperty(value = "lastModifiedUtc", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastModifiedUtc; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java index d5732a0625a07..5809693c8da9e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties.java @@ -41,6 +41,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java index 6688b38be2fb1..c02f86f98592b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Microsoft Threat Intelligence requirements check properties. */ @Fluent public final class MstiCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MstiCheckRequirementsProperties class. */ + public MstiCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MstiCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java index 7bef9230fe38e..2aa5c866d40b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MstiDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class MstiDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private MstiDataConnectorDataTypes dataTypes; + /** Creates an instance of MstiDataConnectorProperties class. */ + public MstiDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java index 68d2ff985a208..ae34070ce30f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** MTP (Microsoft Threat Protection) requirements check properties. */ @Fluent public final class MtpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of MtpCheckRequirementsProperties class. */ + public MtpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public MtpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java index 2399f7dba1651..2a41315cbc1c3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/MtpDataConnectorProperties.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.models.DataConnectorTenantId; import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; import com.fasterxml.jackson.annotation.JsonProperty; /** MTP (Microsoft Threat Protection) data connector properties. */ @@ -19,6 +20,16 @@ public final class MtpDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private MtpDataConnectorDataTypes dataTypes; + /* + * The available filtered providers for the connector. + */ + @JsonProperty(value = "filteredProviders") + private MtpFilteredProviders filteredProviders; + + /** Creates an instance of MtpDataConnectorProperties class. */ + public MtpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * @@ -39,6 +50,26 @@ public MtpDataConnectorProperties withDataTypes(MtpDataConnectorDataTypes dataTy return this; } + /** + * Get the filteredProviders property: The available filtered providers for the connector. + * + * @return the filteredProviders value. + */ + public MtpFilteredProviders filteredProviders() { + return this.filteredProviders; + } + + /** + * Set the filteredProviders property: The available filtered providers for the connector. + * + * @param filteredProviders the filteredProviders value to set. + * @return the MtpDataConnectorProperties object itself. + */ + public MtpDataConnectorProperties withFilteredProviders(MtpFilteredProviders filteredProviders) { + this.filteredProviders = filteredProviders; + return this; + } + /** {@inheritDoc} */ @Override public MtpDataConnectorProperties withTenantId(String tenantId) { @@ -62,6 +93,9 @@ public void validate() { } else { dataTypes().validate(); } + if (filteredProviders() != null) { + filteredProviders().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(MtpDataConnectorProperties.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java index 810e29f8c3400..b5a36f2601a93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NicEntityProperties.java @@ -30,6 +30,10 @@ public final class NicEntityProperties extends EntityCommonProperties { @JsonProperty(value = "vlans", access = JsonProperty.Access.WRITE_ONLY) private List vlans; + /** Creates an instance of NicEntityProperties class. */ + public NicEntityProperties() { + } + /** * Get the macAddress property: The MAC address of this network interface. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java index 2d2b3f5d67917..1b8d5b450610a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -126,6 +127,16 @@ public final class NrtAlertRuleProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of NrtAlertRuleProperties class. */ + public NrtAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -463,6 +474,26 @@ public NrtAlertRuleProperties withEventGroupingSettings(EventGroupingSettings ev return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleProperties object itself. + */ + public NrtAlertRuleProperties withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -503,6 +534,9 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(NrtAlertRuleProperties.class); diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java index 97788b8fd862c..2efd4e7f66ad9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/NrtAlertRuleTemplateProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -64,6 +65,16 @@ public final class NrtAlertRuleTemplateProperties extends AlertRuleTemplateWithM @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of NrtAlertRuleTemplateProperties class. */ + public NrtAlertRuleTemplateProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -206,6 +217,27 @@ public NrtAlertRuleTemplateProperties withEventGroupingSettings(EventGroupingSet return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleTemplateProperties object itself. + */ + public NrtAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** {@inheritDoc} */ @Override public NrtAlertRuleTemplateProperties withTactics(List tactics) { @@ -274,5 +306,8 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java index e79cb5b7768f8..23caeff4c79a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Office365 Project requirements check properties. */ @Fluent public final class Office365ProjectCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of Office365ProjectCheckRequirementsProperties class. */ + public Office365ProjectCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public Office365ProjectCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java index 86464533c6a1a..9e5927a477b9c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/Office365ProjectDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class Office365ProjectDataConnectorProperties extends DataConnector @JsonProperty(value = "dataTypes", required = true) private Office365ProjectConnectorDataTypes dataTypes; + /** Creates an instance of Office365ProjectDataConnectorProperties class. */ + public Office365ProjectDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java index 7e6a246d93cb2..58a9e26868024 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** OfficeATP (Office 365 Advanced Threat Protection) requirements check properties. */ @Fluent public final class OfficeAtpCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficeAtpCheckRequirementsProperties class. */ + public OfficeAtpCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficeAtpCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java index 9a64b134a987e..09263147ababb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeAtpDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class OfficeAtpDataConnectorProperties extends DataConnectorTenantI @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of OfficeAtpDataConnectorProperties class. */ + public OfficeAtpDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java index e1ef2000626cc..193fab161e3d4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentInner.java @@ -24,6 +24,10 @@ public final class OfficeConsentInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of OfficeConsentInner class. */ + public OfficeConsentInner() { + } + /** * Get the innerProperties property: Office consent properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java index ef163ee8eda7d..8ee64090f57d1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeConsentProperties.java @@ -22,6 +22,10 @@ public final class OfficeConsentProperties { @JsonProperty(value = "consentId") private String consentId; + /** Creates an instance of OfficeConsentProperties class. */ + public OfficeConsentProperties() { + } + /** * Get the tenantId property: The tenantId of the Office365 with the consent. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java index 4b02a823625c2..096c8e30c8b60 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class OfficeDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private OfficeDataConnectorDataTypes dataTypes; + /** Creates an instance of OfficeDataConnectorProperties class. */ + public OfficeDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java index 5ae6bc4079354..d7b6ff64086e0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** OfficeIRM (Microsoft Insider Risk Management) requirements check properties. */ @Fluent public final class OfficeIrmCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficeIrmCheckRequirementsProperties class. */ + public OfficeIrmCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficeIrmCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java index c3e618acc5a32..c8a3b73c57e1f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficeIrmDataConnectorProperties.java @@ -18,6 +18,10 @@ public final class OfficeIrmDataConnectorProperties extends DataConnectorTenantI @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of OfficeIrmDataConnectorProperties class. */ + public OfficeIrmDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java index b64db3bd6270e..5208736cff324 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBICheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Office PowerBI requirements check properties. */ @Fluent public final class OfficePowerBICheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of OfficePowerBICheckRequirementsProperties class. */ + public OfficePowerBICheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public OfficePowerBICheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java index 4f19d046961e7..b62914d15bbc2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OfficePowerBIDataConnectorProperties.java @@ -19,6 +19,10 @@ public final class OfficePowerBIDataConnectorProperties extends DataConnectorTen @JsonProperty(value = "dataTypes", required = true) private OfficePowerBIConnectorDataTypes dataTypes; + /** Creates an instance of OfficePowerBIDataConnectorProperties class. */ + public OfficePowerBIDataConnectorProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java index ec5a4d2872bb9..b7fba78deacdc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/OperationInner.java @@ -35,6 +35,10 @@ public final class OperationInner { @JsonProperty(value = "isDataAction") private Boolean isDataAction; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the display property: Properties of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java index b1dde67379389..655e1522bcbce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ProcessEntityProperties.java @@ -67,6 +67,10 @@ public final class ProcessEntityProperties extends EntityCommonProperties { @JsonProperty(value = "processId", access = JsonProperty.Access.WRITE_ONLY) private String processId; + /** Creates an instance of ProcessEntityProperties class. */ + public ProcessEntityProperties() { + } + /** * Get the accountEntityId property: The account entity id running the processes. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java new file mode 100644 index 0000000000000..0ff84a612a49c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationInner.java @@ -0,0 +1,612 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.Category; +import com.azure.resourcemanager.securityinsights.models.Content; +import com.azure.resourcemanager.securityinsights.models.Context; +import com.azure.resourcemanager.securityinsights.models.Instructions; +import com.azure.resourcemanager.securityinsights.models.Priority; +import com.azure.resourcemanager.securityinsights.models.RecommendedAction; +import com.azure.resourcemanager.securityinsights.models.State; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** Recommendation object. */ +@Fluent +public final class RecommendationInner { + /* + * id of recommendation. + */ + @JsonProperty(value = "id", required = true) + private UUID id; + + /* + * Instructions of the recommendation. + */ + @JsonProperty(value = "instructions", required = true) + private Instructions instructions; + + /* + * Content of the recommendation. + */ + @JsonProperty(value = "content") + private Content content; + + /* + * Id of the resource this recommendation refers to. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Collection of additional properties for the recommendation. + */ + @JsonProperty(value = "additionalProperties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map additionalProperties; + + /* + * Title of the recommendation. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * Description of the recommendation. + */ + @JsonProperty(value = "description", required = true) + private String description; + + /* + * Title of the recommendation type. + */ + @JsonProperty(value = "recommendationTypeTitle", required = true) + private String recommendationTypeTitle; + + /* + * Id of the recommendation type. + */ + @JsonProperty(value = "recommendationTypeId", required = true) + private String recommendationTypeId; + + /* + * Category of the recommendation. + */ + @JsonProperty(value = "category", required = true) + private Category category; + + /* + * Context of the recommendation. + */ + @JsonProperty(value = "context", required = true) + private Context context; + + /* + * Id of the workspace this recommendation refers to. + */ + @JsonProperty(value = "workspaceId", required = true) + private UUID workspaceId; + + /* + * List of actions to take for this recommendation. + */ + @JsonProperty(value = "actions", required = true) + private List actions; + + /* + * State of the recommendation. + */ + @JsonProperty(value = "state", required = true) + private State state; + + /* + * Priority of the recommendation. + */ + @JsonProperty(value = "priority", required = true) + private Priority priority; + + /* + * The time stamp (UTC) when the recommendation was last evaluated. + */ + @JsonProperty(value = "lastEvaluatedTimeUtc", required = true) + private OffsetDateTime lastEvaluatedTimeUtc; + + /* + * The time stamp (UTC) when the recommendation should be displayed again. + */ + @JsonProperty(value = "hideUntilTimeUtc") + private OffsetDateTime hideUntilTimeUtc; + + /* + * The timestamp (UTC) after which the recommendation should not be displayed anymore. + */ + @JsonProperty(value = "displayUntilTimeUtc") + private OffsetDateTime displayUntilTimeUtc; + + /* + * Value indicating if the recommendation should be displayed or not. + */ + @JsonProperty(value = "visible") + private Boolean visible; + + /** Creates an instance of RecommendationInner class. */ + public RecommendationInner() { + } + + /** + * Get the id property: id of recommendation. + * + * @return the id value. + */ + public UUID id() { + return this.id; + } + + /** + * Set the id property: id of recommendation. + * + * @param id the id value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withId(UUID id) { + this.id = id; + return this; + } + + /** + * Get the instructions property: Instructions of the recommendation. + * + * @return the instructions value. + */ + public Instructions instructions() { + return this.instructions; + } + + /** + * Set the instructions property: Instructions of the recommendation. + * + * @param instructions the instructions value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withInstructions(Instructions instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get the content property: Content of the recommendation. + * + * @return the content value. + */ + public Content content() { + return this.content; + } + + /** + * Set the content property: Content of the recommendation. + * + * @param content the content value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withContent(Content content) { + this.content = content; + return this; + } + + /** + * Get the resourceId property: Id of the resource this recommendation refers to. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Id of the resource this recommendation refers to. + * + * @param resourceId the resourceId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the additionalProperties property: Collection of additional properties for the recommendation. + * + * @return the additionalProperties value. + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Collection of additional properties for the recommendation. + * + * @param additionalProperties the additionalProperties value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get the title property: Title of the recommendation. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Title of the recommendation. + * + * @param title the title value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: Description of the recommendation. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the recommendation. + * + * @param description the description value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the recommendationTypeTitle property: Title of the recommendation type. + * + * @return the recommendationTypeTitle value. + */ + public String recommendationTypeTitle() { + return this.recommendationTypeTitle; + } + + /** + * Set the recommendationTypeTitle property: Title of the recommendation type. + * + * @param recommendationTypeTitle the recommendationTypeTitle value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationTypeTitle(String recommendationTypeTitle) { + this.recommendationTypeTitle = recommendationTypeTitle; + return this; + } + + /** + * Get the recommendationTypeId property: Id of the recommendation type. + * + * @return the recommendationTypeId value. + */ + public String recommendationTypeId() { + return this.recommendationTypeId; + } + + /** + * Set the recommendationTypeId property: Id of the recommendation type. + * + * @param recommendationTypeId the recommendationTypeId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationTypeId(String recommendationTypeId) { + this.recommendationTypeId = recommendationTypeId; + return this; + } + + /** + * Get the category property: Category of the recommendation. + * + * @return the category value. + */ + public Category category() { + return this.category; + } + + /** + * Set the category property: Category of the recommendation. + * + * @param category the category value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withCategory(Category category) { + this.category = category; + return this; + } + + /** + * Get the context property: Context of the recommendation. + * + * @return the context value. + */ + public Context context() { + return this.context; + } + + /** + * Set the context property: Context of the recommendation. + * + * @param context the context value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withContext(Context context) { + this.context = context; + return this; + } + + /** + * Get the workspaceId property: Id of the workspace this recommendation refers to. + * + * @return the workspaceId value. + */ + public UUID workspaceId() { + return this.workspaceId; + } + + /** + * Set the workspaceId property: Id of the workspace this recommendation refers to. + * + * @param workspaceId the workspaceId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withWorkspaceId(UUID workspaceId) { + this.workspaceId = workspaceId; + return this; + } + + /** + * Get the actions property: List of actions to take for this recommendation. + * + * @return the actions value. + */ + public List actions() { + return this.actions; + } + + /** + * Set the actions property: List of actions to take for this recommendation. + * + * @param actions the actions value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withActions(List actions) { + this.actions = actions; + return this; + } + + /** + * Get the state property: State of the recommendation. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Set the state property: State of the recommendation. + * + * @param state the state value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withState(State state) { + this.state = state; + return this; + } + + /** + * Get the priority property: Priority of the recommendation. + * + * @return the priority value. + */ + public Priority priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of the recommendation. + * + * @param priority the priority value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withPriority(Priority priority) { + this.priority = priority; + return this; + } + + /** + * Get the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @return the lastEvaluatedTimeUtc value. + */ + public OffsetDateTime lastEvaluatedTimeUtc() { + return this.lastEvaluatedTimeUtc; + } + + /** + * Set the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @param lastEvaluatedTimeUtc the lastEvaluatedTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withLastEvaluatedTimeUtc(OffsetDateTime lastEvaluatedTimeUtc) { + this.lastEvaluatedTimeUtc = lastEvaluatedTimeUtc; + return this; + } + + /** + * Get the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + public OffsetDateTime hideUntilTimeUtc() { + return this.hideUntilTimeUtc; + } + + /** + * Set the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @param hideUntilTimeUtc the hideUntilTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withHideUntilTimeUtc(OffsetDateTime hideUntilTimeUtc) { + this.hideUntilTimeUtc = hideUntilTimeUtc; + return this; + } + + /** + * Get the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @return the displayUntilTimeUtc value. + */ + public OffsetDateTime displayUntilTimeUtc() { + return this.displayUntilTimeUtc; + } + + /** + * Set the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @param displayUntilTimeUtc the displayUntilTimeUtc value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDisplayUntilTimeUtc(OffsetDateTime displayUntilTimeUtc) { + this.displayUntilTimeUtc = displayUntilTimeUtc; + return this; + } + + /** + * Get the visible property: Value indicating if the recommendation should be displayed or not. + * + * @return the visible value. + */ + public Boolean visible() { + return this.visible; + } + + /** + * Set the visible property: Value indicating if the recommendation should be displayed or not. + * + * @param visible the visible value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withVisible(Boolean visible) { + this.visible = visible; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model RecommendationInner")); + } + if (instructions() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property instructions in model RecommendationInner")); + } else { + instructions().validate(); + } + if (content() != null) { + content().validate(); + } + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model RecommendationInner")); + } + if (description() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property description in model RecommendationInner")); + } + if (recommendationTypeTitle() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationTypeTitle in model RecommendationInner")); + } + if (recommendationTypeId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationTypeId in model RecommendationInner")); + } + if (category() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property category in model RecommendationInner")); + } + if (context() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property context in model RecommendationInner")); + } + if (workspaceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property workspaceId in model RecommendationInner")); + } + if (actions() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property actions in model RecommendationInner")); + } else { + actions().forEach(e -> e.validate()); + } + if (state() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property state in model RecommendationInner")); + } + if (priority() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property priority in model RecommendationInner")); + } + if (lastEvaluatedTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property lastEvaluatedTimeUtc in model RecommendationInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecommendationInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java new file mode 100644 index 0000000000000..fbd82bfff885d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RecommendationListInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of recommendations. */ +@Fluent +public final class RecommendationListInner { + /* + * An list of recommendations + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of RecommendationListInner class. */ + public RecommendationListInner() { + } + + /** + * Get the value property: An list of recommendations. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An list of recommendations. + * + * @param value the value value to set. + * @return the RecommendationListInner object itself. + */ + public RecommendationListInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java index 405ab6789eafd..c8ab8e0f600c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryKeyEntityProperties.java @@ -24,6 +24,10 @@ public final class RegistryKeyEntityProperties extends EntityCommonProperties { @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) private String key; + /** Creates an instance of RegistryKeyEntityProperties class. */ + public RegistryKeyEntityProperties() { + } + /** * Get the hive property: the hive that holds the registry key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java index a15af888fb1bd..a1db6026f23ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RegistryValueEntityProperties.java @@ -37,6 +37,10 @@ public final class RegistryValueEntityProperties extends EntityCommonProperties @JsonProperty(value = "valueType", access = JsonProperty.Access.WRITE_ONLY) private RegistryValueKind valueType; + /** Creates an instance of RegistryValueEntityProperties class. */ + public RegistryValueEntityProperties() { + } + /** * Get the keyEntityId property: The registry key entity id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java index 40a02c226353c..407ab2618c47f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationInner.java @@ -17,6 +17,10 @@ public final class RelationInner extends ResourceWithEtag { @JsonProperty(value = "properties") private RelationProperties innerProperties; + /** Creates an instance of RelationInner class. */ + public RelationInner() { + } + /** * Get the innerProperties property: Relation properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java index 99e3df52c8c14..d02e2734c093e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RelationProperties.java @@ -35,6 +35,10 @@ public final class RelationProperties { @JsonProperty(value = "relatedResourceKind", access = JsonProperty.Access.WRITE_ONLY) private String relatedResourceKind; + /** Creates an instance of RelationProperties class. */ + public RelationProperties() { + } + /** * Get the relatedResourceId property: The resource ID of the related resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java index dff64861cae53..877ea93a45107 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/RepoInner.java @@ -29,6 +29,10 @@ public final class RepoInner { @JsonProperty(value = "branches") private List branches; + /** Creates an instance of RepoInner class. */ + public RepoInner() { + } + /** * Get the url property: The url to access the repository. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java index 98738e4e20290..ea3d05c03f25d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleProperties.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; import com.azure.resourcemanager.securityinsights.models.IncidentConfiguration; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRuleCommonProperties; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; @@ -90,6 +91,10 @@ public final class ScheduledAlertRuleProperties extends ScheduledAlertRuleCommon @JsonProperty(value = "incidentConfiguration") private IncidentConfiguration incidentConfiguration; + /** Creates an instance of ScheduledAlertRuleProperties class. */ + public ScheduledAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * @@ -377,6 +382,14 @@ public ScheduledAlertRuleProperties withAlertDetailsOverride(AlertDetailsOverrid return this; } + /** {@inheritDoc} */ + @Override + public ScheduledAlertRuleProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + super.withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java index 42be477852893..c8289dc020baa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ScheduledAlertRuleTemplateProperties.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; import com.azure.resourcemanager.securityinsights.models.EventGroupingSettings; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TemplateStatus; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import com.fasterxml.jackson.annotation.JsonInclude; @@ -144,6 +145,16 @@ public final class ScheduledAlertRuleTemplateProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of ScheduledAlertRuleTemplateProperties class. */ + public ScheduledAlertRuleTemplateProperties() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * @@ -526,6 +537,27 @@ public ScheduledAlertRuleTemplateProperties withAlertDetailsOverride(AlertDetail return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleTemplateProperties object itself. + */ + public ScheduledAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -544,5 +576,8 @@ public void validate() { if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java index 21db1aca93e58..b1ec169a23da3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityAlertProperties.java @@ -171,6 +171,10 @@ public final class SecurityAlertProperties extends EntityCommonProperties { @JsonProperty(value = "resourceIdentifiers", access = JsonProperty.Access.WRITE_ONLY) private List resourceIdentifiers; + /** Creates an instance of SecurityAlertProperties class. */ + public SecurityAlertProperties() { + } + /** * Get the alertDisplayName property: The display name of the alert. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java index e6bf9c697c0ab..c7704c108f5cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityGroupEntityProperties.java @@ -30,6 +30,10 @@ public final class SecurityGroupEntityProperties extends EntityCommonProperties @JsonProperty(value = "sid", access = JsonProperty.Access.WRITE_ONLY) private String sid; + /** Creates an instance of SecurityGroupEntityProperties class. */ + public SecurityGroupEntityProperties() { + } + /** * Get the distinguishedName property: The group distinguished name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java index 8bf08cc6714d7..c6f751dfa6aa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SecurityMLAnalyticsSettingInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Anomaly", value = AnomalySecurityMLAnalyticsSettings.class)}) @Fluent public class SecurityMLAnalyticsSettingInner extends ResourceWithEtag { + /** Creates an instance of SecurityMLAnalyticsSettingInner class. */ + public SecurityMLAnalyticsSettingInner() { + } + /** {@inheritDoc} */ @Override public SecurityMLAnalyticsSettingInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java index e46fd29c170a9..368b6dbbd3408 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateInner.java @@ -17,6 +17,10 @@ public final class SentinelOnboardingStateInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SentinelOnboardingStateProperties innerProperties; + /** Creates an instance of SentinelOnboardingStateInner class. */ + public SentinelOnboardingStateInner() { + } + /** * Get the innerProperties property: The Sentinel onboarding state object. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java index d1067a68a26d6..881aae69ba588 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStateProperties.java @@ -16,6 +16,10 @@ public final class SentinelOnboardingStateProperties { @JsonProperty(value = "customerManagedKey") private Boolean customerManagedKey; + /** Creates an instance of SentinelOnboardingStateProperties class. */ + public SentinelOnboardingStateProperties() { + } + /** * Get the customerManagedKey property: Flag that indicates the status of the CMK setting. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java index 420eae2ca8575..aeef11eb5f718 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SentinelOnboardingStatesListInner.java @@ -18,6 +18,10 @@ public final class SentinelOnboardingStatesListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SentinelOnboardingStatesListInner class. */ + public SentinelOnboardingStatesListInner() { + } + /** * Get the value property: Array of Sentinel onboarding states. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java index bc77b021a5b58..8845126988477 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingListInner.java @@ -18,6 +18,10 @@ public final class SettingListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SettingListInner class. */ + public SettingListInner() { + } + /** * Get the value property: Array of settings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java index fe11570beafcd..139df92031e0c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SettingsInner.java @@ -29,6 +29,10 @@ }) @Fluent public class SettingsInner extends ResourceWithEtag { + /** Creates an instance of SettingsInner class. */ + public SettingsInner() { + } + /** {@inheritDoc} */ @Override public SettingsInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java index 3d9c0096e645c..ffb10634c8f27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlInner.java @@ -24,6 +24,10 @@ public final class SourceControlInner extends ResourceWithEtag { @JsonProperty(value = "properties") private SourceControlProperties innerProperties; + /** Creates an instance of SourceControlInner class. */ + public SourceControlInner() { + } + /** * Get the innerProperties property: source control properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java index c7b2417c0cdc4..eeff41d6f706d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SourceControlProperties.java @@ -72,6 +72,10 @@ public final class SourceControlProperties { @JsonProperty(value = "lastDeploymentInfo") private DeploymentInfo lastDeploymentInfo; + /** Creates an instance of SourceControlProperties class. */ + public SourceControlProperties() { + } + /** * Get the id property: The id (a Guid) of the source control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java index b676b6b710614..3aa288796faa6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/SubmissionMailEntityProperties.java @@ -73,6 +73,10 @@ public final class SubmissionMailEntityProperties extends EntityCommonProperties @JsonProperty(value = "reportType", access = JsonProperty.Access.WRITE_ONLY) private String reportType; + /** Creates an instance of SubmissionMailEntityProperties class. */ + public SubmissionMailEntityProperties() { + } + /** * Get the networkMessageId property: The network message id of email to which submission belongs. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java index defd84d018052..ff64044d5b37b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TICheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Threat Intelligence Platforms data connector required properties. */ @Fluent public final class TICheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of TICheckRequirementsProperties class. */ + public TICheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public TICheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java index 62d09af2a1b64..1b2535acb3e77 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TIDataConnectorProperties.java @@ -26,6 +26,10 @@ public final class TIDataConnectorProperties extends DataConnectorTenantId { @JsonProperty(value = "dataTypes", required = true) private TIDataConnectorDataTypes dataTypes; + /** Creates an instance of TIDataConnectorProperties class. */ + public TIDataConnectorProperties() { + } + /** * Get the tipLookbackPeriod property: The lookback period for the feed to be imported. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java index 9054e9c2939ed..1a536481b443e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TeamInformationInner.java @@ -41,6 +41,10 @@ public final class TeamInformationInner { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of TeamInformationInner class. */ + public TeamInformationInner() { + } + /** * Get the teamId property: Team ID. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java index 3118a288a38b0..70f785959f8e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleProperties.java @@ -63,6 +63,10 @@ public final class ThreatIntelligenceAlertRuleProperties { @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /** Creates an instance of ThreatIntelligenceAlertRuleProperties class. */ + public ThreatIntelligenceAlertRuleProperties() { + } + /** * Get the alertRuleTemplateName property: The Name of the alert rule template used to create this rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java index 2cabad3ea7655..18b8059b20019 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceAlertRuleTemplateProperties.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceAlertRuleTemplateProperties extends AlertRu @JsonProperty(value = "severity", required = true) private AlertSeverity severity; + /** Creates an instance of ThreatIntelligenceAlertRuleTemplateProperties class. */ + public ThreatIntelligenceAlertRuleTemplateProperties() { + } + /** * Get the severity property: The severity for alerts created by this alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java index 94e3ad449679e..a0475d7a80671 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceIndicatorProperties.java @@ -187,6 +187,10 @@ public final class ThreatIntelligenceIndicatorProperties extends EntityCommonPro @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extensions; + /** Creates an instance of ThreatIntelligenceIndicatorProperties class. */ + public ThreatIntelligenceIndicatorProperties() { + } + /** * Get the threatIntelligenceTags property: List of tags. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java index 66c6f53009c56..5930206a39554 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceInformationInner.java @@ -21,6 +21,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "indicator", value = ThreatIntelligenceIndicatorModel.class)}) @Fluent public class ThreatIntelligenceInformationInner extends ResourceWithEtag { + /** Creates an instance of ThreatIntelligenceInformationInner class. */ + public ThreatIntelligenceInformationInner() { + } + /** {@inheritDoc} */ @Override public ThreatIntelligenceInformationInner withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java index fccc6810b44c3..94a545978b2e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/ThreatIntelligenceMetricsListInner.java @@ -19,6 +19,10 @@ public final class ThreatIntelligenceMetricsListInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceMetricsListInner class. */ + public ThreatIntelligenceMetricsListInner() { + } + /** * Get the value property: Array of threat intelligence metric fields (type/threat type/source). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java index e65e280aade23..f7ded23fff1a6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiCheckRequirementsProperties.java @@ -10,6 +10,10 @@ /** Threat Intelligence TAXII data connector required properties. */ @Fluent public final class TiTaxiiCheckRequirementsProperties extends DataConnectorTenantId { + /** Creates an instance of TiTaxiiCheckRequirementsProperties class. */ + public TiTaxiiCheckRequirementsProperties() { + } + /** {@inheritDoc} */ @Override public TiTaxiiCheckRequirementsProperties withTenantId(String tenantId) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java index 2faf94e2db69c..8687745a97129 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TiTaxiiDataConnectorProperties.java @@ -69,6 +69,10 @@ public final class TiTaxiiDataConnectorProperties extends DataConnectorTenantId @JsonProperty(value = "dataTypes", required = true) private TiTaxiiDataConnectorDataTypes dataTypes; + /** Creates an instance of TiTaxiiDataConnectorProperties class. */ + public TiTaxiiDataConnectorProperties() { + } + /** * Get the workspaceId property: The workspace id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java new file mode 100644 index 0000000000000..756e23f6caa1c --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunInner.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The triggered analytics rule run. */ +@Fluent +public final class TriggeredAnalyticsRuleRunInner extends ResourceWithEtag { + /* + * The triggered analytics rule run Properties + */ + @JsonProperty(value = "properties", required = true) + private TriggeredAnalyticsRuleRunProperties innerProperties = new TriggeredAnalyticsRuleRunProperties(); + + /** Creates an instance of TriggeredAnalyticsRuleRunInner class. */ + public TriggeredAnalyticsRuleRunInner() { + } + + /** + * Get the innerProperties property: The triggered analytics rule run Properties. + * + * @return the innerProperties value. + */ + private TriggeredAnalyticsRuleRunProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TriggeredAnalyticsRuleRunInner withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().executionTimeUtc(); + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withExecutionTimeUtc(executionTimeUtc); + return this; + } + + /** + * Get the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.innerProperties() == null ? null : this.innerProperties().ruleId(); + } + + /** + * Set the ruleId property: The ruleId property. + * + * @param ruleId the ruleId value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withRuleId(String ruleId) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withRuleId(ruleId); + return this; + } + + /** + * Get the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + public String triggeredAnalyticsRuleRunId() { + return this.innerProperties() == null ? null : this.innerProperties().triggeredAnalyticsRuleRunId(); + } + + /** + * Set the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @param triggeredAnalyticsRuleRunId the triggeredAnalyticsRuleRunId value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withTriggeredAnalyticsRuleRunId(String triggeredAnalyticsRuleRunId) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withTriggeredAnalyticsRuleRunId(triggeredAnalyticsRuleRunId); + return this; + } + + /** + * Get the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: The triggered analytics rule run provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withProvisioningState(ProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Get the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + public Map ruleRunAdditionalData() { + return this.innerProperties() == null ? null : this.innerProperties().ruleRunAdditionalData(); + } + + /** + * Set the ruleRunAdditionalData property: Dictionary of <any>. + * + * @param ruleRunAdditionalData the ruleRunAdditionalData value to set. + * @return the TriggeredAnalyticsRuleRunInner object itself. + */ + public TriggeredAnalyticsRuleRunInner withRuleRunAdditionalData(Map ruleRunAdditionalData) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredAnalyticsRuleRunProperties(); + } + this.innerProperties().withRuleRunAdditionalData(ruleRunAdditionalData); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model TriggeredAnalyticsRuleRunInner")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunInner.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java new file mode 100644 index 0000000000000..d572346519bcf --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/TriggeredAnalyticsRuleRunProperties.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The triggered analytics rule run Properties. */ +@Fluent +public final class TriggeredAnalyticsRuleRunProperties { + /* + * The executionTimeUtc property. + */ + @JsonProperty(value = "executionTimeUtc", required = true) + private OffsetDateTime executionTimeUtc; + + /* + * The ruleId property. + */ + @JsonProperty(value = "ruleId", required = true) + private String ruleId; + + /* + * The triggeredAnalyticsRuleRunId property. + */ + @JsonProperty(value = "triggeredAnalyticsRuleRunId", required = true) + private String triggeredAnalyticsRuleRunId; + + /* + * The triggered analytics rule run provisioning state + */ + @JsonProperty(value = "provisioningState", required = true) + private ProvisioningState provisioningState; + + /* + * Dictionary of + */ + @JsonProperty(value = "ruleRunAdditionalData") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map ruleRunAdditionalData; + + /** Creates an instance of TriggeredAnalyticsRuleRunProperties class. */ + public TriggeredAnalyticsRuleRunProperties() { + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.executionTimeUtc; + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + this.executionTimeUtc = executionTimeUtc; + return this; + } + + /** + * Get the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + public String ruleId() { + return this.ruleId; + } + + /** + * Set the ruleId property: The ruleId property. + * + * @param ruleId the ruleId value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withRuleId(String ruleId) { + this.ruleId = ruleId; + return this; + } + + /** + * Get the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + public String triggeredAnalyticsRuleRunId() { + return this.triggeredAnalyticsRuleRunId; + } + + /** + * Set the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @param triggeredAnalyticsRuleRunId the triggeredAnalyticsRuleRunId value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withTriggeredAnalyticsRuleRunId(String triggeredAnalyticsRuleRunId) { + this.triggeredAnalyticsRuleRunId = triggeredAnalyticsRuleRunId; + return this; + } + + /** + * Get the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The triggered analytics rule run provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withProvisioningState(ProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + public Map ruleRunAdditionalData() { + return this.ruleRunAdditionalData; + } + + /** + * Set the ruleRunAdditionalData property: Dictionary of <any>. + * + * @param ruleRunAdditionalData the ruleRunAdditionalData value to set. + * @return the TriggeredAnalyticsRuleRunProperties object itself. + */ + public TriggeredAnalyticsRuleRunProperties withRuleRunAdditionalData(Map ruleRunAdditionalData) { + this.ruleRunAdditionalData = ruleRunAdditionalData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (executionTimeUtc() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property executionTimeUtc in model TriggeredAnalyticsRuleRunProperties")); + } + if (ruleId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ruleId in model TriggeredAnalyticsRuleRunProperties")); + } + if (triggeredAnalyticsRuleRunId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property triggeredAnalyticsRuleRunId in model" + + " TriggeredAnalyticsRuleRunProperties")); + } + if (provisioningState() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property provisioningState in model TriggeredAnalyticsRuleRunProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java index 9a9c6252b3951..0d21abf128165 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UebaProperties.java @@ -18,6 +18,10 @@ public final class UebaProperties { @JsonProperty(value = "dataSources") private List dataSources; + /** Creates an instance of UebaProperties class. */ + public UebaProperties() { + } + /** * Get the dataSources property: The relevant data sources that enriched by ueba. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java index 833855a5cdd74..7ccc954ce3ddb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/UrlEntityProperties.java @@ -17,6 +17,10 @@ public final class UrlEntityProperties extends EntityCommonProperties { @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) private String url; + /** Creates an instance of UrlEntityProperties class. */ + public UrlEntityProperties() { + } + /** * Get the url property: A full URL the entity points to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java index 14c1ca299bc28..7f06069b0f5db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistInner.java @@ -22,6 +22,10 @@ public final class WatchlistInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistProperties innerProperties; + /** Creates an instance of WatchlistInner class. */ + public WatchlistInner() { + } + /** * Get the innerProperties property: Watchlist properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java index e7424ae995450..f298a0f775a1a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemInner.java @@ -20,6 +20,10 @@ public final class WatchlistItemInner extends ResourceWithEtag { @JsonProperty(value = "properties") private WatchlistItemProperties innerProperties; + /** Creates an instance of WatchlistItemInner class. */ + public WatchlistItemInner() { + } + /** * Get the innerProperties property: Watchlist Item properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java index b33026a9990e3..ba191468ef506 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistItemProperties.java @@ -77,6 +77,10 @@ public final class WatchlistItemProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map entityMapping; + /** Creates an instance of WatchlistItemProperties class. */ + public WatchlistItemProperties() { + } + /** * Get the watchlistItemType property: The type of the watchlist item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java index 97fa95571482c..8ba48690ce1f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java @@ -146,6 +146,10 @@ public final class WatchlistProperties { @JsonProperty(value = "uploadStatus") private String uploadStatus; + /** Creates an instance of WatchlistProperties class. */ + public WatchlistProperties() { + } + /** * Get the watchlistId property: The id (a Guid) of the watchlist. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/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/AlertRuleOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java new file mode 100644 index 0000000000000..f450192b4c71b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsClientImpl.java @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AlertRuleOperationsClient. */ +public final class AlertRuleOperationsClientImpl implements AlertRuleOperationsClient { + /** The proxy service used to perform REST calls. */ + private final AlertRuleOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of AlertRuleOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AlertRuleOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(AlertRuleOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsAlertRuleOperations to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsAler") + public interface AlertRuleOperationsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/triggerRuleRun") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> triggerRuleRun( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleId") String ruleId, + @BodyParam("application/json") AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRuleRunWithResponseAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + } + if (analyticsRuleRunTriggerParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter analyticsRuleRunTriggerParameter is required and cannot be null.")); + } else { + analyticsRuleRunTriggerParameter.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .triggerRuleRun( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleId, + analyticsRuleRunTriggerParameter, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerRuleRunWithResponseAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleId is required and cannot be null.")); + } + if (analyticsRuleRunTriggerParameter == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter analyticsRuleRunTriggerParameter is required and cannot be null.")); + } else { + analyticsRuleRunTriggerParameter.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .triggerRuleRun( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleId, + analyticsRuleRunTriggerParameter, + accept, + context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTriggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + Mono>> mono = + triggerRuleRunWithResponseAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTriggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + triggerRuleRunWithResponseAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + return this + .beginTriggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter) + .getSyncPoller(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTriggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + return this + .beginTriggerRuleRunAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .getSyncPoller(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + return beginTriggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerRuleRunAsync( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + return beginTriggerRuleRunAsync( + resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + triggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter).block(); + } + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + triggerRuleRunAsync(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context) + .block(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java new file mode 100644 index 0000000000000..012dc77049268 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleOperationsImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; +import com.azure.resourcemanager.securityinsights.models.AlertRuleOperations; +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; + +public final class AlertRuleOperationsImpl implements AlertRuleOperations { + private static final ClientLogger LOGGER = new ClientLogger(AlertRuleOperationsImpl.class); + + private final AlertRuleOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public AlertRuleOperationsImpl( + AlertRuleOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter) { + this.serviceClient().triggerRuleRun(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter); + } + + public void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context) { + this + .serviceClient() + .triggerRuleRun(resourceGroupName, workspaceName, ruleId, analyticsRuleRunTriggerParameter, context); + } + + private AlertRuleOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/AlertRuleTemplatesClientImpl.java index d017573675b91..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/BookmarkOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java index 0e1ed907707da..258d9ae2933c1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsClientImpl.java @@ -52,7 +52,7 @@ public final class BookmarkOperationsClientImpl implements BookmarkOperationsCli */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkOperationsService { + public interface BookmarkOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -221,15 +221,20 @@ private Mono expandAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BookmarkExpandResponseInner expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, bookmarkId, parameters).block(); + public Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context) { + return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); } /** @@ -239,19 +244,14 @@ public BookmarkExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, parameters, context).block(); + public BookmarkExpandResponseInner expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { + return expandWithResponse(resourceGroupName, workspaceName, bookmarkId, parameters, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java index 40b134363e7c8..ed23df352e998 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkOperationsImpl.java @@ -28,17 +28,6 @@ public BookmarkOperationsImpl( this.serviceManager = serviceManager; } - public BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { - BookmarkExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); - if (inner != null) { - return new BookmarkExpandResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response expandWithResponse( String resourceGroupName, String workspaceName, @@ -58,6 +47,17 @@ public Response expandWithResponse( } } + public BookmarkExpandResponse expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters) { + BookmarkExpandResponseInner inner = + this.serviceClient().expand(resourceGroupName, workspaceName, bookmarkId, parameters); + if (inner != null) { + return new BookmarkExpandResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private BookmarkOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java index f2f214d54a937..181080259877d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsClientImpl.java @@ -58,7 +58,7 @@ public final class BookmarkRelationsClientImpl implements BookmarkRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsBook") - private interface BookmarkRelationsService { + public interface BookmarkRelationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -581,14 +581,16 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. + * @return a bookmark relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - return getAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); } /** @@ -598,16 +600,14 @@ public RelationInner get(String resourceGroupName, String workspaceName, String * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. + * @return a bookmark relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); + public RelationInner get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + return getWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE).getValue(); } /** @@ -781,19 +781,23 @@ private Mono createOrUpdateAsync( * @param bookmarkId Bookmark ID. * @param relationName Relation Name. * @param relation The relation model. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return represents a relation between two resources along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, - RelationInner relation) { - return createOrUpdateAsync(resourceGroupName, workspaceName, bookmarkId, relationName, relation).block(); + RelationInner relation, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) + .block(); } /** @@ -804,23 +808,21 @@ public RelationInner createOrUpdate( * @param bookmarkId Bookmark ID. * @param relationName Relation Name. * @param relation The relation model. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources along with {@link Response}. + * @return represents a relation between two resources. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public RelationInner createOrUpdate( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, - RelationInner relation, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, bookmarkId, relationName, relation, context) - .block(); + RelationInner relation) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, bookmarkId, relationName, relation, Context.NONE) + .getValue(); } /** @@ -963,13 +965,16 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - deleteAsync(resourceGroupName, workspaceName, bookmarkId, relationName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); } /** @@ -979,16 +984,13 @@ public void delete(String resourceGroupName, String workspaceName, String bookma * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, bookmarkId, relationName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java index 0c90dbec02922..33419aa718106 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarkRelationsImpl.java @@ -49,15 +49,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new RelationImpl(inner1, this.manager())); } - public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context) { Response inner = @@ -73,8 +64,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { - this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); + public Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + RelationInner inner = this.serviceClient().get(resourceGroupName, workspaceName, bookmarkId, relationName); + if (inner != null) { + return new RelationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -84,6 +80,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, bookmarkId, relationName, context); } + public void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName) { + this.serviceClient().delete(resourceGroupName, workspaceName, bookmarkId, relationName); + } + public Relation getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/BookmarksClientImpl.java index 4dc36ed754b44..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/DataConnectorsCheckRequirementsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java index b19d22164e896..2d9e6fdfba69f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsClientImpl.java @@ -60,7 +60,7 @@ public final class DataConnectorsCheckRequirementsOperationsClientImpl */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsData") - private interface DataConnectorsCheckRequirementsOperationsService { + public interface DataConnectorsCheckRequirementsOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -225,17 +225,20 @@ private Mono postAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataConnectorRequirementsStateInner post( + public Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - return postAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements).block(); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context) { + return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) + .block(); } /** @@ -244,19 +247,17 @@ public DataConnectorRequirementsStateInner post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse( + public DataConnectorRequirementsStateInner post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context) { - return postWithResponseAsync(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, context) - .block(); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { + return postWithResponse(resourceGroupName, workspaceName, dataConnectorsCheckRequirements, Context.NONE) + .getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java index 1c97eca6aff9c..1fd098ffe948d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsCheckRequirementsOperationsImpl.java @@ -28,19 +28,6 @@ public DataConnectorsCheckRequirementsOperationsImpl( this.serviceManager = serviceManager; } - public DataConnectorRequirementsState post( - String resourceGroupName, - String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { - DataConnectorRequirementsStateInner inner = - this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); - if (inner != null) { - return new DataConnectorRequirementsStateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response postWithResponse( String resourceGroupName, String workspaceName, @@ -61,6 +48,19 @@ public Response postWithResponse( } } + public DataConnectorRequirementsState post( + String resourceGroupName, + String workspaceName, + DataConnectorsCheckRequirements dataConnectorsCheckRequirements) { + DataConnectorRequirementsStateInner inner = + this.serviceClient().post(resourceGroupName, workspaceName, dataConnectorsCheckRequirements); + if (inner != null) { + return new DataConnectorRequirementsStateImpl(inner, this.manager()); + } else { + return null; + } + } + private DataConnectorsCheckRequirementsOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java index 1a58d841aa80c..353fe88d7fd62 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsClientImpl.java @@ -60,7 +60,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" @@ -477,14 +477,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 +495,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 +655,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 +680,17 @@ public DataConnectorInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param dataConnector The data connector. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector along with {@link Response}. + * @return data connector. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorInner dataConnector, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, dataConnectorId, dataConnector, context) - .block(); + public DataConnectorInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, dataConnectorId, dataConnector, Context.NONE) + .getValue(); } /** @@ -820,13 +822,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - deleteAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -835,16 +840,13 @@ public void delete(String resourceGroupName, String workspaceName, String dataCo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE); } /** @@ -997,14 +999,21 @@ private Mono connectAsync( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param connectBody The data connector. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - connectAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody).block(); + public Response connectWithResponse( + String resourceGroupName, + String workspaceName, + String dataConnectorId, + DataConnectorConnectBody connectBody, + Context context) { + return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) + .block(); } /** @@ -1014,21 +1023,14 @@ public void connect( * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. * @param connectBody The data connector. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response connectWithResponse( - String resourceGroupName, - String workspaceName, - String dataConnectorId, - DataConnectorConnectBody connectBody, - Context context) { - return connectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, connectBody, context) - .block(); + public void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { + connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, Context.NONE); } /** @@ -1160,13 +1162,16 @@ private Mono disconnectAsync(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - disconnectAsync(resourceGroupName, workspaceName, dataConnectorId).block(); + public Response disconnectWithResponse( + String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { + return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); } /** @@ -1175,16 +1180,13 @@ public void disconnect(String resourceGroupName, String workspaceName, String da * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { - return disconnectWithResponseAsync(resourceGroupName, workspaceName, dataConnectorId, context).block(); + public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { + disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java index 33b8c30d12472..008475aab81fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DataConnectorsImpl.java @@ -39,15 +39,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new DataConnectorImpl(inner1, this.manager())); } - public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { - DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); - if (inner != null) { - return new DataConnectorImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context) { Response inner = @@ -63,10 +54,8 @@ public Response getWithResponse( } } - public DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { - DataConnectorInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + public DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId) { + DataConnectorInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataConnectorId); if (inner != null) { return new DataConnectorImpl(inner, this.manager()); } else { @@ -95,8 +84,15 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); + public DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector) { + DataConnectorInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, dataConnectorId, dataConnector); + if (inner != null) { + return new DataConnectorImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,9 +100,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); } - public void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { - this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); + public void delete(String resourceGroupName, String workspaceName, String dataConnectorId) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataConnectorId); } public Response connectWithResponse( @@ -120,8 +115,9 @@ public Response connectWithResponse( .connectWithResponse(resourceGroupName, workspaceName, dataConnectorId, connectBody, context); } - public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { - this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); + public void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody) { + this.serviceClient().connect(resourceGroupName, workspaceName, dataConnectorId, connectBody); } public Response disconnectWithResponse( @@ -129,6 +125,10 @@ public Response disconnectWithResponse( return this.serviceClient().disconnectWithResponse(resourceGroupName, workspaceName, dataConnectorId, context); } + public void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId) { + this.serviceClient().disconnect(resourceGroupName, workspaceName, dataConnectorId); + } + private DataConnectorsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java index 918c289e473c6..272a116d4f8c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisClientImpl.java @@ -50,7 +50,7 @@ public final class DomainWhoisClientImpl implements DomainWhoisClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsDoma") - private interface DomainWhoisService { + public interface DomainWhoisService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" @@ -182,14 +182,16 @@ private Mono getAsync(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name. + * @return whois information for a single domain name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { - return getAsync(resourceGroupName, domain).block(); + public Response getWithResponse( + String resourceGroupName, String domain, Context context) { + return getWithResponseAsync(resourceGroupName, domain, context).block(); } /** @@ -197,15 +199,13 @@ public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String domain, Context context) { - return getWithResponseAsync(resourceGroupName, domain, context).block(); + public EnrichmentDomainWhoisInner get(String resourceGroupName, String domain) { + return getWithResponse(resourceGroupName, domain, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java index be9939f6abc01..0dc778c7e8e61 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/DomainWhoisImpl.java @@ -27,15 +27,6 @@ public DomainWhoisImpl( this.serviceManager = serviceManager; } - public EnrichmentDomainWhois get(String resourceGroupName, String domain) { - EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); - if (inner != null) { - return new EnrichmentDomainWhoisImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String domain, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, domain, context); @@ -50,6 +41,15 @@ public Response getWithResponse(String resourceGroupName, } } + public EnrichmentDomainWhois get(String resourceGroupName, String domain) { + EnrichmentDomainWhoisInner inner = this.serviceClient().get(resourceGroupName, domain); + if (inner != null) { + return new EnrichmentDomainWhoisImpl(inner, this.manager()); + } else { + return null; + } + } + private DomainWhoisClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java index f9c1c922a5b44..cdb0de76097c8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesClientImpl.java @@ -62,7 +62,7 @@ public final class EntitiesClientImpl implements EntitiesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesService { + public interface EntitiesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -459,14 +459,16 @@ private Mono getAsync(String resourceGroupName, String workspaceNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity. + * @return an entity along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { - return getAsync(resourceGroupName, workspaceName, entityId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); } /** @@ -475,16 +477,14 @@ public EntityInner get(String resourceGroupName, String workspaceName, String en * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity along with {@link Response}. + * @return an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityId, context).block(); + public EntityInner get(String resourceGroupName, String workspaceName, String entityId) { + return getWithResponse(resourceGroupName, workspaceName, entityId, Context.NONE).getValue(); } /** @@ -637,15 +637,20 @@ private Mono expandAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an expand operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityExpandResponseInner expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - return expandAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityExpandParameters parameters, + Context context) { + return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -655,20 +660,15 @@ public EntityExpandResponseInner expand( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an expand operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityExpandParameters parameters, - Context context) { - return expandWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityExpandResponseInner expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { + return expandWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } /** @@ -813,15 +813,16 @@ private Mono queriesAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param kind The Kind parameter for queries. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. + * @return insights and Activities for an entity along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GetQueriesResponseInner queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - return queriesAsync(resourceGroupName, workspaceName, entityId, kind).block(); + public Response queriesWithResponse( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { + return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); } /** @@ -831,16 +832,15 @@ public GetQueriesResponseInner queries( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param kind The Kind parameter for queries. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity along with {@link Response}. + * @return insights and Activities for an entity. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response queriesWithResponse( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context) { - return queriesWithResponseAsync(resourceGroupName, workspaceName, entityId, kind, context).block(); + public GetQueriesResponseInner queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { + return queriesWithResponse(resourceGroupName, workspaceName, entityId, kind, Context.NONE).getValue(); } /** @@ -993,15 +993,20 @@ private Mono getInsightsAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute insights on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return the Get Insights result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityGetInsightsResponseInner getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - return getInsightsAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response getInsightsWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityGetInsightsParameters parameters, + Context context) { + return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -1011,20 +1016,15 @@ public EntityGetInsightsResponseInner getInsights( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute insights on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response along with {@link Response}. + * @return the Get Insights result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInsightsWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityGetInsightsParameters parameters, - Context context) { - return getInsightsWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityGetInsightsResponseInner getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { + return getInsightsWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java index f2cffddbe5666..bce77c5fc1468 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesClientImpl.java @@ -53,7 +53,7 @@ public final class EntitiesGetTimelinesClientImpl implements EntitiesGetTimeline */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesGetTimelinesService { + public interface EntitiesGetTimelinesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -222,15 +222,20 @@ private Mono listAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityTimelineResponseInner list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - return listAsync(resourceGroupName, workspaceName, entityId, parameters).block(); + public Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); } /** @@ -240,19 +245,14 @@ public EntityTimelineResponseInner list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, entityId, parameters, context).block(); + public EntityTimelineResponseInner list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { + return listWithResponse(resourceGroupName, workspaceName, entityId, parameters, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java index 79b119a109c9f..6105bb0e4cf56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesGetTimelinesImpl.java @@ -28,17 +28,6 @@ public EntitiesGetTimelinesImpl( this.serviceManager = serviceManager; } - public EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { - EntityTimelineResponseInner inner = - this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); - if (inner != null) { - return new EntityTimelineResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String workspaceName, @@ -58,6 +47,17 @@ public Response listWithResponse( } } + public EntityTimelineResponse list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters) { + EntityTimelineResponseInner inner = + this.serviceClient().list(resourceGroupName, workspaceName, entityId, parameters); + if (inner != null) { + return new EntityTimelineResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private EntitiesGetTimelinesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java index 6ce063fd52fef..68d9e730d10e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesImpl.java @@ -46,15 +46,6 @@ public PagedIterable list(String resourceGroupName, String workspaceName return Utils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager())); } - public Entity get(String resourceGroupName, String workspaceName, String entityId) { - EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); - if (inner != null) { - return new EntityImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityId, Context context) { Response inner = @@ -70,12 +61,10 @@ public Response getWithResponse( } } - public EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { - EntityExpandResponseInner inner = - this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); + public Entity get(String resourceGroupName, String workspaceName, String entityId) { + EntityInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityId); if (inner != null) { - return new EntityExpandResponseImpl(inner, this.manager()); + return new EntityImpl(inner, this.manager()); } else { return null; } @@ -100,11 +89,12 @@ public Response expandWithResponse( } } - public GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { - GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); + public EntityExpandResponse expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters) { + EntityExpandResponseInner inner = + this.serviceClient().expand(resourceGroupName, workspaceName, entityId, parameters); if (inner != null) { - return new GetQueriesResponseImpl(inner, this.manager()); + return new EntityExpandResponseImpl(inner, this.manager()); } else { return null; } @@ -125,12 +115,11 @@ public Response queriesWithResponse( } } - public EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { - EntityGetInsightsResponseInner inner = - this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); + public GetQueriesResponse queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind) { + GetQueriesResponseInner inner = this.serviceClient().queries(resourceGroupName, workspaceName, entityId, kind); if (inner != null) { - return new EntityGetInsightsResponseImpl(inner, this.manager()); + return new GetQueriesResponseImpl(inner, this.manager()); } else { return null; } @@ -157,6 +146,17 @@ public Response getInsightsWithResponse( } } + public EntityGetInsightsResponse getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters) { + EntityGetInsightsResponseInner inner = + this.serviceClient().getInsights(resourceGroupName, workspaceName, entityId, parameters); + if (inner != null) { + return new EntityGetInsightsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private EntitiesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java index d1fbb7073274d..df58afd0c1242 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java @@ -55,7 +55,7 @@ public final class EntitiesRelationsClientImpl implements EntitiesRelationsClien */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntitiesRelationsService { + public interface EntitiesRelationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java index cff5f927a8326..8d6418a05dea8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java @@ -60,7 +60,7 @@ public final class EntityQueriesClientImpl implements EntityQueriesClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueriesService { + public interface EntityQueriesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -471,14 +471,16 @@ private Mono getAsync(String resourceGroupName, String workspa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { - return getAsync(resourceGroupName, workspaceName, entityQueryId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); } /** @@ -487,16 +489,14 @@ public EntityQueryInner get(String resourceGroupName, String workspaceName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); + public EntityQueryInner get(String resourceGroupName, String workspaceName, String entityQueryId) { + return getWithResponse(resourceGroupName, workspaceName, entityQueryId, Context.NONE).getValue(); } /** @@ -647,15 +647,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. * @param entityQuery The entity query we want to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return specific entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryInner createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - return createOrUpdateAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String entityQueryId, + CustomEntityQuery entityQuery, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) + .block(); } /** @@ -665,21 +671,16 @@ public EntityQueryInner createOrUpdate( * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. * @param entityQuery The entity query we want to create or update. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query along with {@link Response}. + * @return specific entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String entityQueryId, - CustomEntityQuery entityQuery, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, entityQuery, context) - .block(); + public EntityQueryInner createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, entityQueryId, entityQuery, Context.NONE) + .getValue(); } /** @@ -809,13 +810,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - deleteAsync(resourceGroupName, workspaceName, entityQueryId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String entityQueryId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); } /** @@ -824,16 +828,13 @@ public void delete(String resourceGroupName, String workspaceName, String entity * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String entityQueryId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, entityQueryId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { + deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java index 66f6d4fb5322b..a321db1a93e5b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesImpl.java @@ -42,15 +42,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new EntityQueryImpl(inner1, this.manager())); } - public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { - EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); - if (inner != null) { - return new EntityQueryImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context) { Response inner = @@ -66,10 +57,8 @@ public Response getWithResponse( } } - public EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { - EntityQueryInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); + public EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId) { + EntityQueryInner inner = this.serviceClient().get(resourceGroupName, workspaceName, entityQueryId); if (inner != null) { return new EntityQueryImpl(inner, this.manager()); } else { @@ -98,8 +87,15 @@ public Response createOrUpdateWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { - this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); + public EntityQuery createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery) { + EntityQueryInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, entityQueryId, entityQuery); + if (inner != null) { + return new EntityQueryImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -107,6 +103,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, entityQueryId, context); } + public void delete(String resourceGroupName, String workspaceName, String entityQueryId) { + this.serviceClient().delete(resourceGroupName, workspaceName, entityQueryId); + } + private EntityQueriesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java index e60bfb3413bf6..9189eebca426c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant96; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplateList; import reactor.core.publisher.Mono; @@ -57,7 +57,7 @@ public final class EntityQueryTemplatesClientImpl implements EntityQueryTemplate */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityQueryTemplatesService { + public interface EntityQueryTemplatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -66,7 +66,7 @@ private interface EntityQueryTemplatesService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, - @QueryParam("kind") Constant88 kind, + @QueryParam("kind") Constant96 kind, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -115,7 +115,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { + String resourceGroupName, String workspaceName, Constant96 kind) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -175,7 +175,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant96 kind, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -231,7 +231,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind) { + String resourceGroupName, String workspaceName, Constant96 kind) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -249,7 +249,7 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; + final Constant96 kind = null; return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind), nextLink -> listNextSinglePageAsync(nextLink)); @@ -269,7 +269,7 @@ private PagedFlux listAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant96 kind, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, kind, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -287,7 +287,7 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - final Constant88 kind = null; + final Constant96 kind = null; return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind)); } @@ -305,7 +305,7 @@ public PagedIterable list(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant96 kind, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, kind, context)); } @@ -439,14 +439,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - return getAsync(resourceGroupName, workspaceName, entityQueryTemplateId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); } /** @@ -455,16 +457,14 @@ public EntityQueryTemplateInner get(String resourceGroupName, String workspaceNa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, entityQueryTemplateId, context).block(); + public EntityQueryTemplateInner get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { + return getWithResponse(resourceGroupName, workspaceName, entityQueryTemplateId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java index 040dcb3be9b11..28079c292b714 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueryTemplatesImpl.java @@ -11,7 +11,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryTemplateInner; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant96; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplate; import com.azure.resourcemanager.securityinsights.models.EntityQueryTemplates; @@ -35,22 +35,12 @@ public PagedIterable list(String resourceGroupName, String } public PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context) { + String resourceGroupName, String workspaceName, Constant96 kind, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, kind, context); return Utils.mapPage(inner, inner1 -> new EntityQueryTemplateImpl(inner1, this.manager())); } - public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { - EntityQueryTemplateInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); - if (inner != null) { - return new EntityQueryTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context) { Response inner = @@ -66,6 +56,16 @@ public Response getWithResponse( } } + public EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId) { + EntityQueryTemplateInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, entityQueryTemplateId); + if (inner != null) { + return new EntityQueryTemplateImpl(inner, this.manager()); + } else { + return null; + } + } + private EntityQueryTemplatesClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java index a30ef2467eab2..1d08472b95e8a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsClientImpl.java @@ -50,7 +50,7 @@ public final class EntityRelationsClientImpl implements EntityRelationsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsEnti") - private interface EntityRelationsService { + public interface EntityRelationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -210,15 +210,16 @@ private Mono getRelationAsync( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RelationInner getRelation( - String resourceGroupName, String workspaceName, String entityId, String relationName) { - return getRelationAsync(resourceGroupName, workspaceName, entityId, relationName).block(); + public Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { + return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); } /** @@ -228,15 +229,15 @@ public RelationInner getRelation( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { - return getRelationWithResponseAsync(resourceGroupName, workspaceName, entityId, relationName, context).block(); + public RelationInner getRelation( + String resourceGroupName, String workspaceName, String entityId, String relationName) { + return getRelationWithResponse(resourceGroupName, workspaceName, entityId, relationName, Context.NONE) + .getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java index 6521f11e7b259..b392b56e76b47 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityRelationsImpl.java @@ -27,16 +27,6 @@ public EntityRelationsImpl( this.serviceManager = serviceManager; } - public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { - RelationInner inner = - this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); - if (inner != null) { - return new RelationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getRelationWithResponse( String resourceGroupName, String workspaceName, String entityId, String relationName, Context context) { Response inner = @@ -54,6 +44,16 @@ public Response getRelationWithResponse( } } + public Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName) { + RelationInner inner = + this.serviceClient().getRelation(resourceGroupName, workspaceName, entityId, relationName); + if (inner != null) { + return new RelationImpl(inner, this.manager()); + } else { + return null; + } + } + private EntityRelationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java index 4b6a389586649..4764fa26a9f5e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsClientImpl.java @@ -63,7 +63,7 @@ public final class FileImportsClientImpl implements FileImportsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsFile") - private interface FileImportsService { + public interface FileImportsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -533,14 +533,16 @@ private Mono getAsync(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { - return getAsync(resourceGroupName, workspaceName, fileImportId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); } /** @@ -549,16 +551,14 @@ public FileImportInner get(String resourceGroupName, String workspaceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileImportId, context).block(); + public FileImportInner get(String resourceGroupName, String workspaceName, String fileImportId) { + return getWithResponse(resourceGroupName, workspaceName, fileImportId, Context.NONE).getValue(); } /** @@ -711,15 +711,20 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights. + * @return represents a file import in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FileImportInner create( - String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { - return createAsync(resourceGroupName, workspaceName, fileImportId, fileImport).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String fileImportId, + FileImportInner fileImport, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); } /** @@ -729,20 +734,15 @@ public FileImportInner create( * @param workspaceName The name of the workspace. * @param fileImportId File import ID. * @param fileImport The file import. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a file import in Azure Security Insights along with {@link Response}. + * @return represents a file import in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String fileImportId, - FileImportInner fileImport, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, fileImportId, fileImport, context).block(); + public FileImportInner create( + String resourceGroupName, String workspaceName, String fileImportId, FileImportInner fileImport) { + return createWithResponse(resourceGroupName, workspaceName, fileImportId, fileImport, Context.NONE).getValue(); } /** @@ -914,7 +914,7 @@ private PollerFlux, FileImportInner> beginDeleteAsyn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FileImportInner> beginDelete( String resourceGroupName, String workspaceName, String fileImportId) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, fileImportId).getSyncPoller(); } /** @@ -932,7 +932,7 @@ public SyncPoller, FileImportInner> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FileImportInner> beginDelete( String resourceGroupName, String workspaceName, String fileImportId, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, fileImportId, context).getSyncPoller(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java index 05175bc230d31..89cfb4e4061b5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/FileImportsImpl.java @@ -46,15 +46,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new FileImportImpl(inner1, this.manager())); } - public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { - FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); - if (inner != null) { - return new FileImportImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String fileImportId, Context context) { Response inner = @@ -70,6 +61,15 @@ public Response getWithResponse( } } + public FileImport get(String resourceGroupName, String workspaceName, String fileImportId) { + FileImportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileImportId); + if (inner != null) { + return new FileImportImpl(inner, this.manager()); + } else { + return null; + } + } + public FileImport delete(String resourceGroupName, String workspaceName, String fileImportId) { FileImportInner inner = this.serviceClient().delete(resourceGroupName, workspaceName, fileImportId); if (inner != null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java new file mode 100644 index 0000000000000..2819965698a97 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsClientImpl.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GetRecommendationsClient. */ +public final class GetRecommendationsClientImpl implements GetRecommendationsClient { + /** The proxy service used to perform REST calls. */ + private final GetRecommendationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of GetRecommendationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GetRecommendationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy.create(GetRecommendationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsGetRecommendations to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsGetR") + public interface GetRecommendationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String workspaceName) { + return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java new file mode 100644 index 0000000000000..771ab53563a35 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetRecommendationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import com.azure.resourcemanager.securityinsights.models.GetRecommendations; +import com.azure.resourcemanager.securityinsights.models.RecommendationList; + +public final class GetRecommendationsImpl implements GetRecommendations { + private static final ClientLogger LOGGER = new ClientLogger(GetRecommendationsImpl.class); + + private final GetRecommendationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public GetRecommendationsImpl( + GetRecommendationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RecommendationListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RecommendationList list(String resourceGroupName, String workspaceName) { + RecommendationListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return new RecommendationListImpl(inner, this.manager()); + } else { + return null; + } + } + + private GetRecommendationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java new file mode 100644 index 0000000000000..8d14e69fe47fd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/GetTriggeredAnalyticsRuleRunsClientImpl.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.GetTriggeredAnalyticsRuleRunsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRuns; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GetTriggeredAnalyticsRuleRunsClient. */ +public final class GetTriggeredAnalyticsRuleRunsClientImpl implements GetTriggeredAnalyticsRuleRunsClient { + /** The proxy service used to perform REST calls. */ + private final GetTriggeredAnalyticsRuleRunsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of GetTriggeredAnalyticsRuleRunsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GetTriggeredAnalyticsRuleRunsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + GetTriggeredAnalyticsRuleRunsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsGetTriggeredAnalyticsRuleRuns to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsGetT") + public interface GetTriggeredAnalyticsRuleRunsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

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

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java new file mode 100644 index 0000000000000..4206f7e4f7fa8 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentTasksImpl.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.IncidentTasksClient; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.azure.resourcemanager.securityinsights.models.IncidentTask; +import com.azure.resourcemanager.securityinsights.models.IncidentTasks; + +public final class IncidentTasksImpl implements IncidentTasks { + private static final ClientLogger LOGGER = new ClientLogger(IncidentTasksImpl.class); + + private final IncidentTasksClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public IncidentTasksImpl( + IncidentTasksClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String incidentId) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, incidentId); + return Utils.mapPage(inner, inner1 -> new IncidentTaskImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, incidentId, context); + return Utils.mapPage(inner, inner1 -> new IncidentTaskImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IncidentTaskImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public IncidentTask get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + IncidentTaskInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, incidentId, incidentTaskId); + if (inner != null) { + return new IncidentTaskImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + public void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId, incidentTaskId); + } + + public IncidentTask getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String incidentId = Utils.getValueFromIdByName(id, "incidents"); + if (incidentId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'incidents'.", id))); + } + String incidentTaskId = Utils.getValueFromIdByName(id, "tasks"); + if (incidentTaskId == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tasks'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, incidentId, incidentTaskId, context); + } + + private IncidentTasksClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } + + public IncidentTaskImpl define(String name) { + return new IncidentTaskImpl(name, this.manager()); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java index a07638efa7789..c2872de797b89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsClientImpl.java @@ -37,7 +37,6 @@ import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; import com.azure.resourcemanager.securityinsights.models.IncidentList; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in IncidentsClient. */ @@ -65,7 +64,7 @@ public final class IncidentsClientImpl implements IncidentsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsInci") - private interface IncidentsService { + public interface IncidentsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -165,7 +164,7 @@ Mono> createTeam( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("incidentId") String incidentId, - @BodyParam("application/json") TeamProperties teamProperties, + @BodyParam("application/json") TeamInformationInner teamProperties, @HeaderParam("Accept") String accept, Context context); @@ -357,18 +356,14 @@ private Mono> runPlaybookWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return any object on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody) { + private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { + final ManualTriggerRequestBody requestBody = null; return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -379,16 +374,22 @@ private Mono runPlaybookAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. + * @return any object along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runPlaybookAsync(String resourceGroupName, String workspaceName, String incidentIdentifier) { - final ManualTriggerRequestBody requestBody = null; - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context) { + return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) + .block(); } /** @@ -405,31 +406,8 @@ private Mono runPlaybookAsync(String resourceGroupName, String workspace @ServiceMethod(returns = ReturnType.SINGLE) public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { final ManualTriggerRequestBody requestBody = null; - return runPlaybookAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody).block(); - } - - /** - * Triggers playbook on a specific incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context) { - return runPlaybookWithResponseAsync(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context) - .block(); + return runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, Context.NONE) + .getValue(); } /** @@ -822,14 +800,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. + * @return an incident along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { - return getAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -838,16 +818,14 @@ public IncidentInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident along with {@link Response}. + * @return an incident. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentInner get(String resourceGroupName, String workspaceName, String incidentId) { + return getWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -860,8 +838,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -922,8 +899,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -980,7 +956,7 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -996,15 +972,16 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentInner createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { - return createOrUpdateAsync(resourceGroupName, workspaceName, incidentId, incident).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); } /** @@ -1014,16 +991,16 @@ public IncidentInner createOrUpdate( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incident The incident. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents an incident in Azure Security Insights along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, incidentId, incident, context).block(); + public IncidentInner createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, IncidentInner incident) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, incidentId, incident, Context.NONE) + .getValue(); } /** @@ -1152,13 +1129,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - deleteAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1167,16 +1147,13 @@ public void delete(String resourceGroupName, String workspaceName, String incide * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + deleteWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE); } /** @@ -1193,7 +1170,7 @@ public Response deleteWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createTeamWithResponseAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1257,7 +1234,7 @@ private Mono> createTeamWithResponseAsync( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1315,7 +1292,7 @@ private Mono> createTeamWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createTeamAsync( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1327,15 +1304,21 @@ private Mono createTeamAsync( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param teamProperties Team properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. + * @return describes team information along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TeamInformationInner createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - return createTeamAsync(resourceGroupName, workspaceName, incidentId, teamProperties).block(); + public Response createTeamWithResponse( + String resourceGroupName, + String workspaceName, + String incidentId, + TeamInformationInner teamProperties, + Context context) { + return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) + .block(); } /** @@ -1345,21 +1328,16 @@ public TeamInformationInner createTeam( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param teamProperties Team properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. + * @return describes team information. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createTeamWithResponse( - String resourceGroupName, - String workspaceName, - String incidentId, - TeamProperties teamProperties, - Context context) { - return createTeamWithResponseAsync(resourceGroupName, workspaceName, incidentId, teamProperties, context) - .block(); + public TeamInformationInner createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { + return createTeamWithResponse(resourceGroupName, workspaceName, incidentId, teamProperties, Context.NONE) + .getValue(); } /** @@ -1490,14 +1468,16 @@ private Mono listAlertsAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return all incident alerts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - return listAlertsAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listAlertsWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1506,16 +1486,14 @@ public IncidentAlertListInner listAlerts(String resourceGroupName, String worksp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts along with {@link Response}. + * @return all incident alerts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAlertsWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listAlertsWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentAlertListInner listAlerts(String resourceGroupName, String workspaceName, String incidentId) { + return listAlertsWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -1646,14 +1624,16 @@ private Mono listBookmarksAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all incident bookmarks along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - return listBookmarksAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listBookmarksWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1662,16 +1642,14 @@ public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks along with {@link Response}. + * @return all incident bookmarks. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBookmarksWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listBookmarksWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentBookmarkListInner listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { + return listBookmarksWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** @@ -1802,15 +1780,16 @@ private Mono listEntitiesAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all incident related entities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IncidentEntitiesResponseInner listEntities( - String resourceGroupName, String workspaceName, String incidentId) { - return listEntitiesAsync(resourceGroupName, workspaceName, incidentId).block(); + public Response listEntitiesWithResponse( + String resourceGroupName, String workspaceName, String incidentId, Context context) { + return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); } /** @@ -1819,16 +1798,15 @@ public IncidentEntitiesResponseInner listEntities( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities along with {@link Response}. + * @return all incident related entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listEntitiesWithResponse( - String resourceGroupName, String workspaceName, String incidentId, Context context) { - return listEntitiesWithResponseAsync(resourceGroupName, workspaceName, incidentId, context).block(); + public IncidentEntitiesResponseInner listEntities( + String resourceGroupName, String workspaceName, String incidentId) { + return listEntitiesWithResponse(resourceGroupName, workspaceName, incidentId, Context.NONE).getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java index a49e1a802a76c..d932926aa3e88 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IncidentsImpl.java @@ -22,7 +22,6 @@ import com.azure.resourcemanager.securityinsights.models.Incidents; import com.azure.resourcemanager.securityinsights.models.ManualTriggerRequestBody; import com.azure.resourcemanager.securityinsights.models.TeamInformation; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; public final class IncidentsImpl implements Incidents { private static final ClientLogger LOGGER = new ClientLogger(IncidentsImpl.class); @@ -38,10 +37,6 @@ public IncidentsImpl( this.serviceManager = serviceManager; } - public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { - return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); - } - public Response runPlaybookWithResponse( String resourceGroupName, String workspaceName, @@ -53,6 +48,10 @@ public Response runPlaybookWithResponse( .runPlaybookWithResponse(resourceGroupName, workspaceName, incidentIdentifier, requestBody, context); } + public Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier) { + return this.serviceClient().runPlaybook(resourceGroupName, workspaceName, incidentIdentifier); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); @@ -71,15 +70,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new IncidentImpl(inner1, this.manager())); } - public Incident get(String resourceGroupName, String workspaceName, String incidentId) { - IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); - if (inner != null) { - return new IncidentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context) { Response inner = @@ -95,8 +85,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String incidentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); + public Incident get(String resourceGroupName, String workspaceName, String incidentId) { + IncidentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, incidentId); + if (inner != null) { + return new IncidentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,22 +99,15 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, incidentId, context); } - public TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties) { - TeamInformationInner inner = - this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); - if (inner != null) { - return new TeamInformationImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String incidentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, incidentId); } public Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context) { Response inner = this @@ -136,10 +124,12 @@ public Response createTeamWithResponse( } } - public IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId) { - IncidentAlertListInner inner = this.serviceClient().listAlerts(resourceGroupName, workspaceName, incidentId); + public TeamInformation createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties) { + TeamInformationInner inner = + this.serviceClient().createTeam(resourceGroupName, workspaceName, incidentId, teamProperties); if (inner != null) { - return new IncidentAlertListImpl(inner, this.manager()); + return new TeamInformationImpl(inner, this.manager()); } else { return null; } @@ -160,11 +150,10 @@ public Response listAlertsWithResponse( } } - public IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { - IncidentBookmarkListInner inner = - this.serviceClient().listBookmarks(resourceGroupName, workspaceName, incidentId); + public IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId) { + IncidentAlertListInner inner = this.serviceClient().listAlerts(resourceGroupName, workspaceName, incidentId); if (inner != null) { - return new IncidentBookmarkListImpl(inner, this.manager()); + return new IncidentAlertListImpl(inner, this.manager()); } else { return null; } @@ -185,11 +174,11 @@ public Response listBookmarksWithResponse( } } - public IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId) { - IncidentEntitiesResponseInner inner = - this.serviceClient().listEntities(resourceGroupName, workspaceName, incidentId); + public IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId) { + IncidentBookmarkListInner inner = + this.serviceClient().listBookmarks(resourceGroupName, workspaceName, incidentId); if (inner != null) { - return new IncidentEntitiesResponseImpl(inner, this.manager()); + return new IncidentBookmarkListImpl(inner, this.manager()); } else { return null; } @@ -210,6 +199,16 @@ public Response listEntitiesWithResponse( } } + public IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId) { + IncidentEntitiesResponseInner inner = + this.serviceClient().listEntities(resourceGroupName, workspaceName, incidentId); + if (inner != null) { + return new IncidentEntitiesResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Incident getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java index cfcbc8e039f65..ed9685d5ab08e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasClientImpl.java @@ -50,7 +50,7 @@ public final class IpGeodatasClientImpl implements IpGeodatasClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsIpGe") - private interface IpGeodatasService { + public interface IpGeodatasService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights" @@ -180,14 +180,16 @@ private Mono getAsync(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { - return getAsync(resourceGroupName, ipAddress).block(); + public Response getWithResponse( + String resourceGroupName, String ipAddress, Context context) { + return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); } /** @@ -195,15 +197,13 @@ public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String ipAddress, Context context) { - return getWithResponseAsync(resourceGroupName, ipAddress, context).block(); + public EnrichmentIpGeodataInner get(String resourceGroupName, String ipAddress) { + return getWithResponse(resourceGroupName, ipAddress, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java index 7afbd00545ef2..0a8c91b333606 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/IpGeodatasImpl.java @@ -27,15 +27,6 @@ public IpGeodatasImpl( this.serviceManager = serviceManager; } - public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { - EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); - if (inner != null) { - return new EnrichmentIpGeodataImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceGroupName, String ipAddress, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, ipAddress, context); @@ -50,6 +41,15 @@ public Response getWithResponse(String resourceGroupName, S } } + public EnrichmentIpGeodata get(String resourceGroupName, String ipAddress) { + EnrichmentIpGeodataInner inner = this.serviceClient().get(resourceGroupName, ipAddress); + if (inner != null) { + return new EnrichmentIpGeodataImpl(inner, this.manager()); + } else { + return null; + } + } + private IpGeodatasClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/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/OfficeConsentsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java index fd9d8a21ca81d..69fe9d6acf1c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsClientImpl.java @@ -56,7 +56,7 @@ public final class OfficeConsentsClientImpl implements OfficeConsentsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsOffi") - private interface OfficeConsentsService { + public interface OfficeConsentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -419,14 +419,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { - return getAsync(resourceGroupName, workspaceName, consentId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); } /** @@ -435,16 +437,14 @@ public OfficeConsentInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); + public OfficeConsentInner get(String resourceGroupName, String workspaceName, String consentId) { + return getWithResponse(resourceGroupName, workspaceName, consentId, Context.NONE).getValue(); } /** @@ -573,13 +573,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String consentId) { - deleteAsync(resourceGroupName, workspaceName, consentId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); } /** @@ -588,16 +591,13 @@ public void delete(String resourceGroupName, String workspaceName, String consen * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, consentId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String consentId) { + deleteWithResponse(resourceGroupName, workspaceName, consentId, Context.NONE); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java index 3f6213360a58d..7bc64bd42e962 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OfficeConsentsImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new OfficeConsentImpl(inner1, this.manager())); } - public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { - OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); - if (inner != null) { - return new OfficeConsentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String consentId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String consentId) { - this.serviceClient().delete(resourceGroupName, workspaceName, consentId); + public OfficeConsent get(String resourceGroupName, String workspaceName, String consentId) { + OfficeConsentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, consentId); + if (inner != null) { + return new OfficeConsentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, consentId, context); } + public void delete(String resourceGroupName, String workspaceName, String consentId) { + this.serviceClient().delete(resourceGroupName, workspaceName, consentId); + } + private OfficeConsentsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java index 42c9980bb42d5..bb5c8b75a44d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsOper") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.SecurityInsights/operations") @ExpectedResponses({200}) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java index 5a8f6c3d0f229..8e2bd16d0bb53 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsClientImpl.java @@ -54,7 +54,7 @@ public final class ProductSettingsClientImpl implements ProductSettingsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsProd") - private interface ProductSettingsService { + public interface ProductSettingsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -233,14 +233,16 @@ private Mono listAsync(String resourceGroupName, String worksp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. + * @return list of all the settings along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingListInner list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -248,16 +250,14 @@ public SettingListInner list(String resourceGroupName, String workspaceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings along with {@link Response}. + * @return list of all the settings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SettingListInner list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -387,14 +387,16 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. + * @return a setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { - return getAsync(resourceGroupName, workspaceName, settingsName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); } /** @@ -403,16 +405,14 @@ public SettingsInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting along with {@link Response}. + * @return a setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); + public SettingsInner get(String resourceGroupName, String workspaceName, String settingsName) { + return getWithResponse(resourceGroupName, workspaceName, settingsName, Context.NONE).getValue(); } /** @@ -541,13 +541,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - deleteAsync(resourceGroupName, workspaceName, settingsName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); } /** @@ -556,16 +559,13 @@ public void delete(String resourceGroupName, String workspaceName, String settin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, settingsName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String settingsName) { + deleteWithResponse(resourceGroupName, workspaceName, settingsName, Context.NONE); } /** @@ -712,15 +712,16 @@ private Mono updateAsync( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. + * @return the Setting along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SettingsInner update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - return updateAsync(resourceGroupName, workspaceName, settingsName, settings).block(); + public Response updateWithResponse( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); } /** @@ -730,15 +731,14 @@ public SettingsInner update( * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @param settings The setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting along with {@link Response}. + * @return the Setting. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, settingsName, settings, context).block(); + public SettingsInner update( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { + return updateWithResponse(resourceGroupName, workspaceName, settingsName, settings, Context.NONE).getValue(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java index 5596bd0f4aa9a..7f8993cab1380 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/ProductSettingsImpl.java @@ -29,15 +29,6 @@ public ProductSettingsImpl( this.serviceManager = serviceManager; } - public SettingList list(String resourceGroupName, String workspaceName) { - SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new SettingListImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse(String resourceGroupName, String workspaceName, Context context) { Response inner = this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); @@ -52,10 +43,10 @@ public Response listWithResponse(String resourceGroupName, String w } } - public Settings get(String resourceGroupName, String workspaceName, String settingsName) { - SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); + public SettingList list(String resourceGroupName, String workspaceName) { + SettingListInner inner = this.serviceClient().list(resourceGroupName, workspaceName); if (inner != null) { - return new SettingsImpl(inner, this.manager()); + return new SettingListImpl(inner, this.manager()); } else { return null; } @@ -76,8 +67,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String settingsName) { - this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); + public Settings get(String resourceGroupName, String workspaceName, String settingsName) { + SettingsInner inner = this.serviceClient().get(resourceGroupName, workspaceName, settingsName); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -85,14 +81,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, settingsName, context); } - public Settings update( - String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { - SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); - if (inner != null) { - return new SettingsImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String settingsName) { + this.serviceClient().delete(resourceGroupName, workspaceName, settingsName); } public Response updateWithResponse( @@ -110,6 +100,16 @@ public Response updateWithResponse( } } + public Settings update( + String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings) { + SettingsInner inner = this.serviceClient().update(resourceGroupName, workspaceName, settingsName, settings); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } + } + private ProductSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java new file mode 100644 index 0000000000000..ec7e368239e02 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.Category; +import com.azure.resourcemanager.securityinsights.models.Content; +import com.azure.resourcemanager.securityinsights.models.Context; +import com.azure.resourcemanager.securityinsights.models.Instructions; +import com.azure.resourcemanager.securityinsights.models.Priority; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendedAction; +import com.azure.resourcemanager.securityinsights.models.State; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public final class RecommendationImpl implements Recommendation { + private RecommendationInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + RecommendationImpl( + RecommendationInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public UUID id() { + return this.innerModel().id(); + } + + public Instructions instructions() { + return this.innerModel().instructions(); + } + + public Content content() { + return this.innerModel().content(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public Map additionalProperties() { + Map inner = this.innerModel().additionalProperties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String title() { + return this.innerModel().title(); + } + + public String description() { + return this.innerModel().description(); + } + + public String recommendationTypeTitle() { + return this.innerModel().recommendationTypeTitle(); + } + + public String recommendationTypeId() { + return this.innerModel().recommendationTypeId(); + } + + public Category category() { + return this.innerModel().category(); + } + + public Context context() { + return this.innerModel().context(); + } + + public UUID workspaceId() { + return this.innerModel().workspaceId(); + } + + public List actions() { + List inner = this.innerModel().actions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public State state() { + return this.innerModel().state(); + } + + public Priority priority() { + return this.innerModel().priority(); + } + + public OffsetDateTime lastEvaluatedTimeUtc() { + return this.innerModel().lastEvaluatedTimeUtc(); + } + + public OffsetDateTime hideUntilTimeUtc() { + return this.innerModel().hideUntilTimeUtc(); + } + + public OffsetDateTime displayUntilTimeUtc() { + return this.innerModel().displayUntilTimeUtc(); + } + + public Boolean visible() { + return this.innerModel().visible(); + } + + public RecommendationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java new file mode 100644 index 0000000000000..cb87d379992fb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/RecommendationListImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendationList; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class RecommendationListImpl implements RecommendationList { + private RecommendationListInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + RecommendationListImpl( + RecommendationListInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new RecommendationImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public RecommendationListInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java index 86963e3bc62a9..505c3e7c6a9ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SecurityInsightsImpl.java @@ -23,6 +23,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.fluent.ActionsClient; +import com.azure.resourcemanager.securityinsights.fluent.AlertRuleOperationsClient; import com.azure.resourcemanager.securityinsights.fluent.AlertRuleTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.AlertRulesClient; import com.azure.resourcemanager.securityinsights.fluent.AutomationRulesClient; @@ -39,8 +40,12 @@ import com.azure.resourcemanager.securityinsights.fluent.EntityQueryTemplatesClient; import com.azure.resourcemanager.securityinsights.fluent.EntityRelationsClient; import com.azure.resourcemanager.securityinsights.fluent.FileImportsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetRecommendationsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetTriggeredAnalyticsRuleRunsClient; +import com.azure.resourcemanager.securityinsights.fluent.GetsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentCommentsClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentRelationsClient; +import com.azure.resourcemanager.securityinsights.fluent.IncidentTasksClient; import com.azure.resourcemanager.securityinsights.fluent.IncidentsClient; import com.azure.resourcemanager.securityinsights.fluent.IpGeodatasClient; import com.azure.resourcemanager.securityinsights.fluent.MetadatasClient; @@ -55,6 +60,8 @@ import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorMetricsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsClient; import com.azure.resourcemanager.securityinsights.fluent.ThreatIntelligenceIndicatorsOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; import com.azure.resourcemanager.securityinsights.fluent.WatchlistItemsClient; import com.azure.resourcemanager.securityinsights.fluent.WatchlistsClient; import java.io.IOException; @@ -177,6 +184,42 @@ public AlertRuleTemplatesClient getAlertRuleTemplates() { return this.alertRuleTemplates; } + /** The TriggeredAnalyticsRuleRunOperationsClient object to access its operations. */ + private final TriggeredAnalyticsRuleRunOperationsClient triggeredAnalyticsRuleRunOperations; + + /** + * Gets the TriggeredAnalyticsRuleRunOperationsClient object to access its operations. + * + * @return the TriggeredAnalyticsRuleRunOperationsClient object. + */ + public TriggeredAnalyticsRuleRunOperationsClient getTriggeredAnalyticsRuleRunOperations() { + return this.triggeredAnalyticsRuleRunOperations; + } + + /** The GetTriggeredAnalyticsRuleRunsClient object to access its operations. */ + private final GetTriggeredAnalyticsRuleRunsClient getTriggeredAnalyticsRuleRuns; + + /** + * Gets the GetTriggeredAnalyticsRuleRunsClient object to access its operations. + * + * @return the GetTriggeredAnalyticsRuleRunsClient object. + */ + public GetTriggeredAnalyticsRuleRunsClient getGetTriggeredAnalyticsRuleRuns() { + return this.getTriggeredAnalyticsRuleRuns; + } + + /** The AlertRuleOperationsClient object to access its operations. */ + private final AlertRuleOperationsClient alertRuleOperations; + + /** + * Gets the AlertRuleOperationsClient object to access its operations. + * + * @return the AlertRuleOperationsClient object. + */ + public AlertRuleOperationsClient getAlertRuleOperations() { + return this.alertRuleOperations; + } + /** The AutomationRulesClient object to access its operations. */ private final AutomationRulesClient automationRules; @@ -369,6 +412,18 @@ public IncidentRelationsClient getIncidentRelations() { return this.incidentRelations; } + /** The IncidentTasksClient object to access its operations. */ + private final IncidentTasksClient incidentTasks; + + /** + * Gets the IncidentTasksClient object to access its operations. + * + * @return the IncidentTasksClient object. + */ + public IncidentTasksClient getIncidentTasks() { + return this.incidentTasks; + } + /** The MetadatasClient object to access its operations. */ private final MetadatasClient metadatas; @@ -405,6 +460,42 @@ public SentinelOnboardingStatesClient getSentinelOnboardingStates() { return this.sentinelOnboardingStates; } + /** The GetRecommendationsClient object to access its operations. */ + private final GetRecommendationsClient getRecommendations; + + /** + * Gets the GetRecommendationsClient object to access its operations. + * + * @return the GetRecommendationsClient object. + */ + public GetRecommendationsClient getGetRecommendations() { + return this.getRecommendations; + } + + /** The GetsClient object to access its operations. */ + private final GetsClient gets; + + /** + * Gets the GetsClient object to access its operations. + * + * @return the GetsClient object. + */ + public GetsClient getGets() { + return this.gets; + } + + /** The UpdatesClient object to access its operations. */ + private final UpdatesClient updates; + + /** + * Gets the UpdatesClient object to access its operations. + * + * @return the UpdatesClient object. + */ + public UpdatesClient getUpdates() { + return this.updates; + } + /** The SecurityMLAnalyticsSettingsClient object to access its operations. */ private final SecurityMLAnalyticsSettingsClient securityMLAnalyticsSettings; @@ -571,10 +662,13 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; + this.apiVersion = "2023-02-01-preview"; this.alertRules = new AlertRulesClientImpl(this); this.actions = new ActionsClientImpl(this); this.alertRuleTemplates = new AlertRuleTemplatesClientImpl(this); + this.triggeredAnalyticsRuleRunOperations = new TriggeredAnalyticsRuleRunOperationsClientImpl(this); + this.getTriggeredAnalyticsRuleRuns = new GetTriggeredAnalyticsRuleRunsClientImpl(this); + this.alertRuleOperations = new AlertRuleOperationsClientImpl(this); this.automationRules = new AutomationRulesClientImpl(this); this.incidents = new IncidentsClientImpl(this); this.bookmarks = new BookmarksClientImpl(this); @@ -591,9 +685,13 @@ public OperationsClient getOperations() { this.fileImports = new FileImportsClientImpl(this); this.incidentComments = new IncidentCommentsClientImpl(this); this.incidentRelations = new IncidentRelationsClientImpl(this); + this.incidentTasks = new IncidentTasksClientImpl(this); this.metadatas = new MetadatasClientImpl(this); this.officeConsents = new OfficeConsentsClientImpl(this); this.sentinelOnboardingStates = new SentinelOnboardingStatesClientImpl(this); + this.getRecommendations = new GetRecommendationsClientImpl(this); + this.gets = new GetsClientImpl(this); + this.updates = new UpdatesClientImpl(this); this.securityMLAnalyticsSettings = new SecurityMLAnalyticsSettingsClientImpl(this); this.productSettings = new ProductSettingsClientImpl(this); this.sourceControls = new SourceControlsClientImpl(this); 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/SourceControlsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java index 7d0d20b95466e..34439907c48e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsClientImpl.java @@ -58,7 +58,7 @@ public final class SourceControlsClientImpl implements SourceControlsClient { */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsService { + public interface SourceControlsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java index 154c48e0138ad..6b8140a6293cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsClientImpl.java @@ -59,7 +59,7 @@ public final class SourceControlsOperationsClientImpl implements SourceControlsO */ @Host("{$host}") @ServiceInterface(name = "SecurityInsightsSour") - private interface SourceControlsOperationsService { + public interface SourceControlsOperationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -443,14 +443,16 @@ private Mono getAsync(String resourceGroupName, String works * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. + * @return a source control byt its identifier along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { - return getAsync(resourceGroupName, workspaceName, sourceControlId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); } /** @@ -459,16 +461,14 @@ public SourceControlInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. + * @return a source control byt its identifier. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); + public SourceControlInner get(String resourceGroupName, String workspaceName, String sourceControlId) { + return getWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE).getValue(); } /** @@ -600,13 +600,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - deleteAsync(resourceGroupName, workspaceName, sourceControlId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); } /** @@ -615,16 +618,13 @@ public void delete(String resourceGroupName, String workspaceName, String source * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { + deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, Context.NONE); } /** @@ -779,15 +779,21 @@ private Mono createAsync( * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. * @param sourceControl The SourceControl. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights. + * @return represents a SourceControl in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner create( - String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { - return createAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl).block(); + public Response createWithResponse( + String resourceGroupName, + String workspaceName, + String sourceControlId, + SourceControlInner sourceControl, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) + .block(); } /** @@ -797,21 +803,16 @@ public SourceControlInner create( * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. * @param sourceControl The SourceControl. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a SourceControl in Azure Security Insights along with {@link Response}. + * @return represents a SourceControl in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String sourceControlId, - SourceControlInner sourceControl, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, sourceControlId, sourceControl, context) - .block(); + public SourceControlInner create( + String resourceGroupName, String workspaceName, String sourceControlId, SourceControlInner sourceControl) { + return createWithResponse(resourceGroupName, workspaceName, sourceControlId, sourceControl, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java index 467e637cf289d..0e8b7d4b94c98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/SourceControlsOperationsImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String worksp return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); } - public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String sourceControlId, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { - this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); + public SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId) { + SourceControlInner inner = this.serviceClient().get(resourceGroupName, workspaceName, sourceControlId); + if (inner != null) { + return new SourceControlImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, sourceControlId, context); } + public void delete(String resourceGroupName, String workspaceName, String sourceControlId) { + this.serviceClient().delete(resourceGroupName, workspaceName, sourceControlId); + } + public SourceControl getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/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..d682853439466 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" diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java new file mode 100644 index 0000000000000..dccff35bd5079 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.ProvisioningState; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRun; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class TriggeredAnalyticsRuleRunImpl implements TriggeredAnalyticsRuleRun { + private TriggeredAnalyticsRuleRunInner innerObject; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + TriggeredAnalyticsRuleRunImpl( + TriggeredAnalyticsRuleRunInner innerObject, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public OffsetDateTime executionTimeUtc() { + return this.innerModel().executionTimeUtc(); + } + + public String ruleId() { + return this.innerModel().ruleId(); + } + + public String triggeredAnalyticsRuleRunId() { + return this.innerModel().triggeredAnalyticsRuleRunId(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Map ruleRunAdditionalData() { + Map inner = this.innerModel().ruleRunAdditionalData(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public TriggeredAnalyticsRuleRunInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java new file mode 100644 index 0000000000000..978e67a570919 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsClientImpl.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in TriggeredAnalyticsRuleRunOperationsClient. + */ +public final class TriggeredAnalyticsRuleRunOperationsClientImpl implements TriggeredAnalyticsRuleRunOperationsClient { + /** The proxy service used to perform REST calls. */ + private final TriggeredAnalyticsRuleRunOperationsService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of TriggeredAnalyticsRuleRunOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TriggeredAnalyticsRuleRunOperationsClientImpl(SecurityInsightsImpl client) { + this.service = + RestProxy + .create( + TriggeredAnalyticsRuleRunOperationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsTriggeredAnalyticsRuleRunOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsTrig") + public interface TriggeredAnalyticsRuleRunOperationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns" + + "/{ruleRunId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("ruleRunId") String ruleRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleRunId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleRunId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleRunId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleRunId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (ruleRunId == null) { + return Mono.error(new IllegalArgumentException("Parameter ruleRunId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + ruleRunId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String workspaceName, String ruleRunId) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleRunId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleRunId, context).block(); + } + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredAnalyticsRuleRunInner get(String resourceGroupName, String workspaceName, String ruleRunId) { + return getWithResponse(resourceGroupName, workspaceName, ruleRunId, Context.NONE).getValue(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java new file mode 100644 index 0000000000000..5787d08093375 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/TriggeredAnalyticsRuleRunOperationsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.TriggeredAnalyticsRuleRunOperationsClient; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRun; +import com.azure.resourcemanager.securityinsights.models.TriggeredAnalyticsRuleRunOperations; + +public final class TriggeredAnalyticsRuleRunOperationsImpl implements TriggeredAnalyticsRuleRunOperations { + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRunOperationsImpl.class); + + private final TriggeredAnalyticsRuleRunOperationsClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public TriggeredAnalyticsRuleRunOperationsImpl( + TriggeredAnalyticsRuleRunOperationsClient innerClient, + com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleRunId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredAnalyticsRuleRunImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TriggeredAnalyticsRuleRun get(String resourceGroupName, String workspaceName, String ruleRunId) { + TriggeredAnalyticsRuleRunInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleRunId); + if (inner != null) { + return new TriggeredAnalyticsRuleRunImpl(inner, this.manager()); + } else { + return null; + } + } + + private TriggeredAnalyticsRuleRunOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java new file mode 100644 index 0000000000000..69bf88ed2fa24 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesClientImpl.java @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import java.nio.ByteBuffer; +import java.util.List; +import java.util.UUID; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in UpdatesClient. */ +public final class UpdatesClientImpl implements UpdatesClient { + /** The proxy service used to perform REST calls. */ + private final UpdatesService service; + + /** The service client containing this operation class. */ + private final SecurityInsightsImpl client; + + /** + * Initializes an instance of UpdatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UpdatesClientImpl(SecurityInsightsImpl client) { + this.service = RestProxy.create(UpdatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SecurityInsightsUpdates to be used by the proxy service to perform + * REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SecurityInsightsUpda") + public interface UpdatesService { + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations/{recommendationId}") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> recommendation( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("recommendationId") UUID recommendationId, + @BodyParam("application/json") List recommendationPatch, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> recommendationWithResponseAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + if (recommendationPatch == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationPatch is required and cannot be null.")); + } else { + recommendationPatch.forEach(e -> e.validate()); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .recommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + recommendationPatch, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> recommendationWithResponseAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (recommendationId == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationId is required and cannot be null.")); + } + if (recommendationPatch == null) { + return Mono + .error(new IllegalArgumentException("Parameter recommendationPatch is required and cannot be null.")); + } else { + recommendationPatch.forEach(e -> e.validate()); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .recommendation( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + recommendationId, + recommendationPatch, + accept, + context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RecommendationInner> beginRecommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + Mono>> mono = + recommendationWithResponseAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + RecommendationInner.class, + RecommendationInner.class, + this.client.getContext()); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RecommendationInner> beginRecommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + recommendationWithResponseAsync( + resourceGroupName, workspaceName, recommendationId, recommendationPatch, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), RecommendationInner.class, RecommendationInner.class, context); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return this + .beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch) + .getSyncPoller(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of recommendation object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RecommendationInner> beginRecommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return this + .beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .getSyncPoller(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return beginRecommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recommendationAsync( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return beginRecommendationAsync( + resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + return recommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch).block(); + } + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationInner recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + return recommendationAsync(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context) + .block(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java new file mode 100644 index 0000000000000..c15ee75975029 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/UpdatesImpl.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.UpdatesClient; +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import com.azure.resourcemanager.securityinsights.models.Recommendation; +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.Updates; +import java.util.List; +import java.util.UUID; + +public final class UpdatesImpl implements Updates { + private static final ClientLogger LOGGER = new ClientLogger(UpdatesImpl.class); + + private final UpdatesClient innerClient; + + private final com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager; + + public UpdatesImpl( + UpdatesClient innerClient, com.azure.resourcemanager.securityinsights.SecurityInsightsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch) { + RecommendationInner inner = + this + .serviceClient() + .recommendation(resourceGroupName, workspaceName, recommendationId, recommendationPatch); + if (inner != null) { + return new RecommendationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context) { + RecommendationInner inner = + this + .serviceClient() + .recommendation(resourceGroupName, workspaceName, recommendationId, recommendationPatch, context); + if (inner != null) { + return new RecommendationImpl(inner, this.manager()); + } else { + return null; + } + } + + private UpdatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsClientImpl.java index 0257b61bfb203..297db480e4ce3 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" @@ -525,15 +525,20 @@ private Mono getAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response getWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); } /** @@ -543,20 +548,16 @@ public WatchlistItemInner get( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context).block(); + public WatchlistItemInner get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE) + .getValue(); } /** @@ -705,13 +706,21 @@ private Mono deleteAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId).block(); + public Response deleteWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + String watchlistItemId, + Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) + .block(); } /** @@ -721,21 +730,13 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - String watchlistItemId, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context) - .block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, Context.NONE); } /** @@ -912,19 +913,22 @@ private Mono createOrUpdateAsync( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights. + * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistItemInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem) + WatchlistItemInner watchlistItem, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) .block(); } @@ -936,23 +940,21 @@ public WatchlistItemInner createOrUpdate( * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). * @param watchlistItem The watchlist item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Watchlist item in Azure Security Insights along with {@link Response}. + * @return represents a Watchlist item in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public WatchlistItemInner createOrUpdate( String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, - WatchlistItemInner watchlistItem, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, context) - .block(); + WatchlistItemInner watchlistItem) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, watchlistItem, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java index fc1cb65f09173..68ce318460108 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistItemsImpl.java @@ -41,17 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistItemImpl(inner1, this.manager())); } - public WatchlistItem get( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - WatchlistItemInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); - if (inner != null) { - return new WatchlistItemImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, @@ -73,8 +62,15 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + public WatchlistItem get( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + WatchlistItemInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + if (inner != null) { + return new WatchlistItemImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -88,6 +84,10 @@ public Response deleteWithResponse( .deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias, watchlistItemId); + } + public WatchlistItem getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java index 56e2704b12520..1030252a48708 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsClientImpl.java @@ -60,7 +60,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" @@ -484,14 +484,16 @@ private Mono getAsync(String resourceGroupName, String workspace * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { - return getAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** @@ -500,16 +502,14 @@ public WatchlistInner get(String resourceGroupName, String workspaceName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public WatchlistInner get(String resourceGroupName, String workspaceName, String watchlistAlias) { + return getWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE).getValue(); } /** @@ -639,13 +639,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - deleteAsync(resourceGroupName, workspaceName, watchlistAlias).block(); + public WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); } /** @@ -654,16 +657,13 @@ public void delete(String resourceGroupName, String workspaceName, String watchl * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, context).block(); + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, Context.NONE); } /** @@ -830,15 +830,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistInner createOrUpdate( - String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { - return createOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist).block(); + public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String watchlistAlias, + WatchlistInner watchlist, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) + .block(); } /** @@ -852,21 +858,16 @@ public WatchlistInner createOrUpdate( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlist The watchlist. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a Watchlist in Azure Security Insights. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WatchlistsCreateOrUpdateResponse createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String watchlistAlias, - WatchlistInner watchlist, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, context) - .block(); + public WatchlistInner createOrUpdate( + String resourceGroupName, String workspaceName, String watchlistAlias, WatchlistInner watchlist) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, watchlistAlias, watchlist, Context.NONE) + .getValue(); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java index 139a0477f33ff..abfae871fc716 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/WatchlistsImpl.java @@ -41,15 +41,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new WatchlistImpl(inner1, this.manager())); } - public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { - WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); - if (inner != null) { - return new WatchlistImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String watchlistAlias, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { - this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + public Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias) { + WatchlistInner inner = this.serviceClient().get(resourceGroupName, workspaceName, watchlistAlias); + if (inner != null) { + return new WatchlistImpl(inner, this.manager()); + } else { + return null; + } } public WatchlistsDeleteResponse deleteWithResponse( @@ -74,6 +70,10 @@ public WatchlistsDeleteResponse deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, watchlistAlias, context); } + public void delete(String resourceGroupName, String workspaceName, String watchlistAlias) { + this.serviceClient().delete(resourceGroupName, workspaceName, watchlistAlias); + } + public Watchlist getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java index bf95fed22e284..aab2e19a4c15c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadCheckRequirements.java @@ -21,6 +21,10 @@ public final class AadCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private AadCheckRequirementsProperties innerProperties; + /** Creates an instance of AadCheckRequirements class. */ + public AadCheckRequirements() { + } + /** * Get the innerProperties property: AAD (Azure Active Directory) requirements check properties. * @@ -30,6 +34,29 @@ private AadCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the AadCheckRequirements object itself. + */ + public AadCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new AadCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AadDataConnector.java index 2c2d4b0f24aae..1ae6ffbfd613d 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. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java index 45cdb56dc88a0..ca68fdbd135cd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpCheckRequirements.java @@ -21,6 +21,10 @@ public final class AatpCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private AatpCheckRequirementsProperties innerProperties; + /** Creates an instance of AatpCheckRequirements class. */ + public AatpCheckRequirements() { + } + /** * Get the innerProperties property: AATP (Azure Advanced Threat Protection) requirements check properties. * @@ -30,6 +34,29 @@ private AatpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the AatpCheckRequirements object itself. + */ + public AatpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new AatpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java index 25261e2030c44..4f8ff9e2cac3e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AatpDataConnector.java @@ -22,6 +22,10 @@ public final class AatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AatpDataConnectorProperties innerProperties; + /** Creates an instance of AatpDataConnector class. */ + public AatpDataConnector() { + } + /** * Get the innerProperties property: AATP (Azure Advanced Threat Protection) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java index d662cdb888ec1..16a379b3ba68e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AccountEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.AccountEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an account entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Account") -@Fluent +@Immutable public final class AccountEntity extends EntityInner { /* * Account entity properties @@ -24,6 +24,10 @@ public final class AccountEntity extends EntityInner { @JsonProperty(value = "properties") private AccountEntityProperties innerProperties; + /** Creates an instance of AccountEntity class. */ + public AccountEntity() { + } + /** * Get the innerProperties property: Account entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java index 385e767940bd0..17fc2338ded89 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionPropertiesBase.java @@ -18,6 +18,10 @@ public class ActionPropertiesBase { @JsonProperty(value = "logicAppResourceId", required = true) private String logicAppResourceId; + /** Creates an instance of ActionPropertiesBase class. */ + public ActionPropertiesBase() { + } + /** * Get the logicAppResourceId property: Logic App Resource Id, * /subscriptions/{my-subscription}/resourceGroups/{my-resource-group}/providers/Microsoft.Logic/workflows/{my-workflow-id}. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java index ccc8692cff412..036949c4ad3cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionRequest.java @@ -17,6 +17,10 @@ public final class ActionRequest extends ResourceWithEtag { @JsonProperty(value = "properties") private ActionRequestProperties innerProperties; + /** Creates an instance of ActionRequest class. */ + public ActionRequest() { + } + /** * Get the innerProperties property: Action properties for put request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java index 9e8ad565443d0..7d13023902928 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionType.java @@ -16,6 +16,18 @@ public final class ActionType extends ExpandableStringEnum { /** Static value RunPlaybook for ActionType. */ public static final ActionType RUN_PLAYBOOK = fromString("RunPlaybook"); + /** Static value AddIncidentTask for ActionType. */ + public static final ActionType ADD_INCIDENT_TASK = fromString("AddIncidentTask"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java index 97de0d03303b9..45591fc7f1eea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Actions.java @@ -45,12 +45,14 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule. + * @return the action of alert rule along with {@link Response}. */ - ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Gets the action of alert rule. @@ -59,14 +61,12 @@ PagedIterable listByAlertRule( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the action of alert rule along with {@link Response}. + * @return the action of alert rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + ActionResponse get(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Delete the action of alert rule. @@ -75,11 +75,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); /** * Delete the action of alert rule. @@ -88,14 +91,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param actionId Action ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String ruleId, String actionId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId, String actionId); /** * Gets the action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java index 4f7ecdd353b97..f9dd5b49803f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActionsList.java @@ -25,6 +25,10 @@ public final class ActionsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ActionsList class. */ + public ActionsList() { + } + /** * Get the nextLink property: URL to fetch the next set of actions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java index e010a8c88c2a2..92fb2f214a517 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityCustomEntityQuery.java @@ -24,6 +24,10 @@ public final class ActivityCustomEntityQuery extends CustomEntityQuery { @JsonProperty(value = "properties") private ActivityEntityQueriesProperties innerProperties; + /** Creates an instance of ActivityCustomEntityQuery class. */ + public ActivityCustomEntityQuery() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java index 610d4eff8d46c..98716b887d1ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueriesPropertiesQueryDefinitions.java @@ -16,6 +16,10 @@ public final class ActivityEntityQueriesPropertiesQueryDefinitions { @JsonProperty(value = "query") private String query; + /** Creates an instance of ActivityEntityQueriesPropertiesQueryDefinitions class. */ + public ActivityEntityQueriesPropertiesQueryDefinitions() { + } + /** * Get the query property: The Activity query to run on a given entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java index 7aadce92dcd42..7fa20beb01319 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQuery.java @@ -25,6 +25,10 @@ public final class ActivityEntityQuery extends EntityQueryInner { @JsonProperty(value = "properties") private ActivityEntityQueriesProperties innerProperties; + /** Creates an instance of ActivityEntityQuery class. */ + public ActivityEntityQuery() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java index 9066b404574c7..d0329a5167b18 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplate.java @@ -24,6 +24,10 @@ public final class ActivityEntityQueryTemplate extends EntityQueryTemplateInner @JsonProperty(value = "properties") private ActivityEntityQueryTemplateProperties innerProperties; + /** Creates an instance of ActivityEntityQueryTemplate class. */ + public ActivityEntityQueryTemplate() { + } + /** * Get the innerProperties property: Activity entity query properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java index 9a85f95ebfa31..002b707261d0d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityEntityQueryTemplatePropertiesQueryDefinitions.java @@ -22,6 +22,10 @@ public final class ActivityEntityQueryTemplatePropertiesQueryDefinitions { @JsonProperty(value = "summarizeBy") private String summarizeBy; + /** Creates an instance of ActivityEntityQueryTemplatePropertiesQueryDefinitions class. */ + public ActivityEntityQueryTemplatePropertiesQueryDefinitions() { + } + /** * Get the query property: The Activity query to run on a given entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java index 1e6b52c71395b..1462017662ef5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ActivityTimelineItem.java @@ -58,6 +58,10 @@ public final class ActivityTimelineItem extends EntityTimelineItem { @JsonProperty(value = "title", required = true) private String title; + /** Creates an instance of ActivityTimelineItem class. */ + public ActivityTimelineItem() { + } + /** * Get the queryId property: The activity query id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java new file mode 100644 index 0000000000000..a0260185a5675 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AddIncidentTaskActionProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AddIncidentTaskActionProperties model. */ +@Fluent +public final class AddIncidentTaskActionProperties { + /* + * The title of the task. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * The description of the task. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of AddIncidentTaskActionProperties class. */ + public AddIncidentTaskActionProperties() { + } + + /** + * Get the title property: The title of the task. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: The title of the task. + * + * @param title the title value to set. + * @return the AddIncidentTaskActionProperties object itself. + */ + public AddIncidentTaskActionProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: The description of the task. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of the task. + * + * @param description the description value to set. + * @return the AddIncidentTaskActionProperties object itself. + */ + public AddIncidentTaskActionProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (title() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property title in model AddIncidentTaskActionProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddIncidentTaskActionProperties.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java index eff4838eabd8a..ea2e48ddf3bfc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetail.java @@ -16,6 +16,15 @@ public final class AlertDetail extends ExpandableStringEnum { /** Static value Severity for AlertDetail. */ public static final AlertDetail SEVERITY = fromString("Severity"); + /** + * Creates a new instance of AlertDetail value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertDetail() { + } + /** * Creates or finds a AlertDetail from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java index 6abe8f54b47d1..0a9021a4f1ab7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertDetailsOverride.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Settings for how to dynamically override alert static details. */ @Fluent @@ -34,6 +35,16 @@ public final class AlertDetailsOverride { @JsonProperty(value = "alertSeverityColumnName") private String alertSeverityColumnName; + /* + * List of additional dynamic properties to override + */ + @JsonProperty(value = "alertDynamicProperties") + private List alertDynamicProperties; + + /** Creates an instance of AlertDetailsOverride class. */ + public AlertDetailsOverride() { + } + /** * Get the alertDisplayNameFormat property: the format containing columns name(s) to override the alert name. * @@ -114,11 +125,34 @@ public AlertDetailsOverride withAlertSeverityColumnName(String alertSeverityColu return this; } + /** + * Get the alertDynamicProperties property: List of additional dynamic properties to override. + * + * @return the alertDynamicProperties value. + */ + public List alertDynamicProperties() { + return this.alertDynamicProperties; + } + + /** + * Set the alertDynamicProperties property: List of additional dynamic properties to override. + * + * @param alertDynamicProperties the alertDynamicProperties value to set. + * @return the AlertDetailsOverride object itself. + */ + public AlertDetailsOverride withAlertDynamicProperties(List alertDynamicProperties) { + this.alertDynamicProperties = alertDynamicProperties; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (alertDynamicProperties() != null) { + alertDynamicProperties().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java new file mode 100644 index 0000000000000..bce00567c6ded --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertProperty.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The V3 alert property. */ +public final class AlertProperty extends ExpandableStringEnum { + /** Static value AlertLink for AlertProperty. */ + public static final AlertProperty ALERT_LINK = fromString("AlertLink"); + + /** Static value ConfidenceLevel for AlertProperty. */ + public static final AlertProperty CONFIDENCE_LEVEL = fromString("ConfidenceLevel"); + + /** Static value ConfidenceScore for AlertProperty. */ + public static final AlertProperty CONFIDENCE_SCORE = fromString("ConfidenceScore"); + + /** Static value ExtendedLinks for AlertProperty. */ + public static final AlertProperty EXTENDED_LINKS = fromString("ExtendedLinks"); + + /** Static value ProductName for AlertProperty. */ + public static final AlertProperty PRODUCT_NAME = fromString("ProductName"); + + /** Static value ProviderName for AlertProperty. */ + public static final AlertProperty PROVIDER_NAME = fromString("ProviderName"); + + /** Static value ProductComponentName for AlertProperty. */ + public static final AlertProperty PRODUCT_COMPONENT_NAME = fromString("ProductComponentName"); + + /** Static value RemediationSteps for AlertProperty. */ + public static final AlertProperty REMEDIATION_STEPS = fromString("RemediationSteps"); + + /** Static value Techniques for AlertProperty. */ + public static final AlertProperty TECHNIQUES = fromString("Techniques"); + + /** + * Creates a new instance of AlertProperty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertProperty() { + } + + /** + * Creates or finds a AlertProperty from its string representation. + * + * @param name a name to look for. + * @return the corresponding AlertProperty. + */ + @JsonCreator + public static AlertProperty fromString(String name) { + return fromString(name, AlertProperty.class); + } + + /** + * Gets known AlertProperty values. + * + * @return known AlertProperty values. + */ + public static Collection values() { + return values(AlertProperty.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java new file mode 100644 index 0000000000000..788c1080cb296 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertPropertyMapping.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A single alert property mapping to override. */ +@Fluent +public final class AlertPropertyMapping { + /* + * The V3 alert property + */ + @JsonProperty(value = "alertProperty") + private AlertProperty alertProperty; + + /* + * the column name to use to override this property + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of AlertPropertyMapping class. */ + public AlertPropertyMapping() { + } + + /** + * Get the alertProperty property: The V3 alert property. + * + * @return the alertProperty value. + */ + public AlertProperty alertProperty() { + return this.alertProperty; + } + + /** + * Set the alertProperty property: The V3 alert property. + * + * @param alertProperty the alertProperty value to set. + * @return the AlertPropertyMapping object itself. + */ + public AlertPropertyMapping withAlertProperty(AlertProperty alertProperty) { + this.alertProperty = alertProperty; + return this; + } + + /** + * Get the value property: the column name to use to override this property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: the column name to use to override this property. + * + * @param value the value value to set. + * @return the AlertPropertyMapping object itself. + */ + public AlertPropertyMapping withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java index fb0c0d7f86b20..7c20aa4a0ca85 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleKind.java @@ -29,6 +29,15 @@ public final class AlertRuleKind extends ExpandableStringEnum { /** Static value NRT for AlertRuleKind. */ public static final AlertRuleKind NRT = fromString("NRT"); + /** + * Creates a new instance of AlertRuleKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertRuleKind() { + } + /** * Creates or finds a AlertRuleKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java new file mode 100644 index 0000000000000..f201efae54f85 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleOperations.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.Context; + +/** Resource collection API of AlertRuleOperations. */ +public interface AlertRuleOperations { + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter); + + /** + * triggers analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleId Alert rule ID. + * @param analyticsRuleRunTriggerParameter The Analytics Rule Run Trigger parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void triggerRuleRun( + String resourceGroupName, + String workspaceName, + String ruleId, + AnalyticsRuleRunTrigger analyticsRuleRunTriggerParameter, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java index a8705467713ba..483e3438ebf5f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateDataSource.java @@ -23,6 +23,10 @@ public final class AlertRuleTemplateDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of AlertRuleTemplateDataSource class. */ + public AlertRuleTemplateDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java index 9ec04325df71e..48d8d3074b684 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatePropertiesBase.java @@ -54,6 +54,10 @@ public class AlertRuleTemplatePropertiesBase { @JsonProperty(value = "status") private TemplateStatus status; + /** Creates an instance of AlertRuleTemplatePropertiesBase class. */ + public AlertRuleTemplatePropertiesBase() { + } + /** * Get the alertRulesCreatedByTemplateCount property: the number of alert rules that were created by this template. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java index 7ab1567de6d34..632078b48312f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplateWithMitreProperties.java @@ -23,6 +23,10 @@ public class AlertRuleTemplateWithMitreProperties extends AlertRuleTemplatePrope @JsonProperty(value = "techniques") private List techniques; + /** Creates an instance of AlertRuleTemplateWithMitreProperties class. */ + public AlertRuleTemplateWithMitreProperties() { + } + /** * Get the tactics property: The tactics of the alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java index 6c1e23964aae5..f1d562c1c4873 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplates.java @@ -41,12 +41,14 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template. + * @return the alert rule template along with {@link Response}. */ - AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); /** * Gets the alert rule template. @@ -54,12 +56,10 @@ public interface AlertRuleTemplates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param alertRuleTemplateId Alert rule template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule template along with {@link Response}. + * @return the alert rule template. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String alertRuleTemplateId, Context context); + AlertRuleTemplate get(String resourceGroupName, String workspaceName, String alertRuleTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java index 8292bf9e38523..b6aa4aa014af3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRuleTemplatesList.java @@ -25,6 +25,10 @@ public final class AlertRuleTemplatesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRuleTemplatesList class. */ + public AlertRuleTemplatesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rule templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java index 4ce770f0de661..22b64b10d08d8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRules.java @@ -42,12 +42,13 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule. + * @return the alert rule along with {@link Response}. */ - AlertRule get(String resourceGroupName, String workspaceName, String ruleId); + Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Gets the alert rule. @@ -55,13 +56,12 @@ public interface AlertRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the alert rule along with {@link Response}. + * @return the alert rule. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + AlertRule get(String resourceGroupName, String workspaceName, String ruleId); /** * Creates or updates the alert rule. @@ -70,12 +70,14 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule. + * @return alert rule along with {@link Response}. */ - AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); + Response createOrUpdateWithResponse( + String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); /** * Creates or updates the alert rule. @@ -84,14 +86,12 @@ public interface AlertRules { * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. * @param alertRule The alert rule. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return alert rule along with {@link Response}. + * @return alert rule. */ - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule, Context context); + AlertRule createOrUpdate(String resourceGroupName, String workspaceName, String ruleId, AlertRuleInner alertRule); /** * Delete the alert rule. @@ -99,11 +99,13 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String ruleId); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); /** * Delete the alert rule. @@ -111,11 +113,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param ruleId Alert rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleId, Context context); + void delete(String resourceGroupName, String workspaceName, String ruleId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java index c758bd659a27d..8867147572886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRulesList.java @@ -25,6 +25,10 @@ public final class AlertRulesList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertRulesList class. */ + public AlertRulesList() { + } + /** * Get the nextLink property: URL to fetch the next set of alert rules. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java index 4c140f2d9b58f..99ce3377a2898 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertSeverity.java @@ -22,6 +22,15 @@ public final class AlertSeverity extends ExpandableStringEnum { /** Static value Informational for AlertSeverity. */ public static final AlertSeverity INFORMATIONAL = fromString("Informational"); + /** + * Creates a new instance of AlertSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertSeverity() { + } + /** * Creates or finds a AlertSeverity from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java index db728892d6f14..114b2eb8140ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertStatus.java @@ -25,6 +25,15 @@ public final class AlertStatus extends ExpandableStringEnum { /** Static value InProgress for AlertStatus. */ public static final AlertStatus IN_PROGRESS = fromString("InProgress"); + /** + * Creates a new instance of AlertStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AlertStatus() { + } + /** * Creates or finds a AlertStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java index 2b9ea1a543786..55703ca25bb59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertsDataTypeOfDataConnector.java @@ -17,6 +17,10 @@ public class AlertsDataTypeOfDataConnector { @JsonProperty(value = "alerts", required = true) private DataConnectorDataTypeCommon alerts; + /** Creates an instance of AlertsDataTypeOfDataConnector class. */ + public AlertsDataTypeOfDataConnector() { + } + /** * Get the alerts property: Alerts data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java new file mode 100644 index 0000000000000..3b5ee8c3df73e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnalyticsRuleRunTrigger.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.AnalyticsRuleRunTriggerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Analytics Rule Run Trigger request. */ +@Fluent +public final class AnalyticsRuleRunTrigger { + /* + * The analytics Rule Run Trigger request + */ + @JsonProperty(value = "properties", required = true) + private AnalyticsRuleRunTriggerProperties innerProperties = new AnalyticsRuleRunTriggerProperties(); + + /** Creates an instance of AnalyticsRuleRunTrigger class. */ + public AnalyticsRuleRunTrigger() { + } + + /** + * Get the innerProperties property: The analytics Rule Run Trigger request. + * + * @return the innerProperties value. + */ + private AnalyticsRuleRunTriggerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + public OffsetDateTime executionTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().executionTimeUtc(); + } + + /** + * Set the executionTimeUtc property: The executionTimeUtc property. + * + * @param executionTimeUtc the executionTimeUtc value to set. + * @return the AnalyticsRuleRunTrigger object itself. + */ + public AnalyticsRuleRunTrigger withExecutionTimeUtc(OffsetDateTime executionTimeUtc) { + if (this.innerProperties() == null) { + this.innerProperties = new AnalyticsRuleRunTriggerProperties(); + } + this.innerProperties().withExecutionTimeUtc(executionTimeUtc); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property innerProperties in model AnalyticsRuleRunTrigger")); + } else { + innerProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AnalyticsRuleRunTrigger.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java index a06d6aea90181..226c2ae74340c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Anomalies.java @@ -22,6 +22,10 @@ public final class Anomalies extends SettingsInner { @JsonProperty(value = "properties") private AnomaliesSettingsProperties innerProperties; + /** Creates an instance of Anomalies class. */ + public Anomalies() { + } + /** * Get the innerProperties property: Anomalies properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java index 3a67f21d0c143..73454b1a181d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalySecurityMLAnalyticsSettings.java @@ -26,6 +26,10 @@ public final class AnomalySecurityMLAnalyticsSettings extends SecurityMLAnalytic @JsonProperty(value = "properties") private AnomalySecurityMLAnalyticsSettingsProperties innerProperties; + /** Creates an instance of AnomalySecurityMLAnalyticsSettings class. */ + public AnomalySecurityMLAnalyticsSettings() { + } + /** * Get the innerProperties property: Anomaly Security ML Analytics Settings properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java index 28ec81da3af04..770c6cef09f90 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AnomalyTimelineItem.java @@ -83,6 +83,10 @@ public final class AnomalyTimelineItem extends EntityTimelineItem { @JsonProperty(value = "reasons") private List reasons; + /** Creates an instance of AnomalyTimelineItem class. */ + public AnomalyTimelineItem() { + } + /** * Get the azureResourceId property: The anomaly azure resource id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java index a6c58a1e05958..cfacebd058b59 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AntispamMailDirection.java @@ -22,6 +22,15 @@ public final class AntispamMailDirection extends ExpandableStringEnum { /** Static value InhibitResponseFunction for AttackTactic. */ public static final AttackTactic INHIBIT_RESPONSE_FUNCTION = fromString("InhibitResponseFunction"); + /** + * Creates a new instance of AttackTactic value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AttackTactic() { + } + /** * Creates or finds a AttackTactic from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java index 3ff1bf1a59fef..90a252037f566 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAction.java @@ -18,6 +18,7 @@ defaultImpl = AutomationRuleAction.class) @JsonTypeName("AutomationRuleAction") @JsonSubTypes({ + @JsonSubTypes.Type(name = "AddIncidentTask", value = AutomationRuleAddIncidentTaskAction.class), @JsonSubTypes.Type(name = "ModifyProperties", value = AutomationRuleModifyPropertiesAction.class), @JsonSubTypes.Type(name = "RunPlaybook", value = AutomationRuleRunPlaybookAction.class) }) @@ -29,6 +30,10 @@ public class AutomationRuleAction { @JsonProperty(value = "order", required = true) private int order; + /** Creates an instance of AutomationRuleAction class. */ + public AutomationRuleAction() { + } + /** * Get the order property: The order property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java new file mode 100644 index 0000000000000..9ba42bea1da9e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleAddIncidentTaskAction.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Describes an automation rule action to add a task to an incident. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("AddIncidentTask") +@Fluent +public final class AutomationRuleAddIncidentTaskAction extends AutomationRuleAction { + /* + * The actionConfiguration property. + */ + @JsonProperty(value = "actionConfiguration") + private AddIncidentTaskActionProperties actionConfiguration; + + /** Creates an instance of AutomationRuleAddIncidentTaskAction class. */ + public AutomationRuleAddIncidentTaskAction() { + } + + /** + * Get the actionConfiguration property: The actionConfiguration property. + * + * @return the actionConfiguration value. + */ + public AddIncidentTaskActionProperties actionConfiguration() { + return this.actionConfiguration; + } + + /** + * Set the actionConfiguration property: The actionConfiguration property. + * + * @param actionConfiguration the actionConfiguration value to set. + * @return the AutomationRuleAddIncidentTaskAction object itself. + */ + public AutomationRuleAddIncidentTaskAction withActionConfiguration( + AddIncidentTaskActionProperties actionConfiguration) { + this.actionConfiguration = actionConfiguration; + return this; + } + + /** {@inheritDoc} */ + @Override + public AutomationRuleAddIncidentTaskAction withOrder(int order) { + super.withOrder(order); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (actionConfiguration() != null) { + actionConfiguration().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java index 0eee30498e7ca..fb6b532aa049a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanCondition.java @@ -23,6 +23,10 @@ public final class AutomationRuleBooleanCondition { @JsonProperty(value = "innerConditions") private List innerConditions; + /** Creates an instance of AutomationRuleBooleanCondition class. */ + public AutomationRuleBooleanCondition() { + } + /** * Get the operator property: The operator property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java index a703cfcce4e48..efd203cab1253 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleBooleanConditionSupportedOperator.java @@ -17,6 +17,15 @@ public final class AutomationRuleBooleanConditionSupportedOperator /** Static value Or for AutomationRuleBooleanConditionSupportedOperator. */ public static final AutomationRuleBooleanConditionSupportedOperator OR = fromString("Or"); + /** + * Creates a new instance of AutomationRuleBooleanConditionSupportedOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRuleBooleanConditionSupportedOperator() { + } + /** * Creates or finds a AutomationRuleBooleanConditionSupportedOperator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java index fbd2b4bcaef28..d735c7a02b80f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleCondition.java @@ -25,6 +25,10 @@ }) @Immutable public class AutomationRuleCondition { + /** Creates an instance of AutomationRuleCondition class. */ + public AutomationRuleCondition() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java index 0f56b3772f369..7671608ffc48e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleModifyPropertiesAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleModifyPropertiesAction extends AutomationRuleAc @JsonProperty(value = "actionConfiguration") private IncidentPropertiesAction actionConfiguration; + /** Creates an instance of AutomationRuleModifyPropertiesAction class. */ + public AutomationRuleModifyPropertiesAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java index 6b0b8389178c2..39d781c8e0341 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedArrayType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedArrayType /** Static value Comments for AutomationRulePropertyArrayChangedConditionSupportedArrayType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedArrayType COMMENTS = fromString("Comments"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedArrayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedArrayType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedArrayType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java index 1d0e540202903..a1376bb28fb20 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedConditionSupportedChangeType.java @@ -14,6 +14,15 @@ public final class AutomationRulePropertyArrayChangedConditionSupportedChangeTyp /** Static value Added for AutomationRulePropertyArrayChangedConditionSupportedChangeType. */ public static final AutomationRulePropertyArrayChangedConditionSupportedChangeType ADDED = fromString("Added"); + /** + * Creates a new instance of AutomationRulePropertyArrayChangedConditionSupportedChangeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayChangedConditionSupportedChangeType() { + } + /** * Creates or finds a AutomationRulePropertyArrayChangedConditionSupportedChangeType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java index 33ee0d2d5aee9..36b6f40f659b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayChangedValuesCondition.java @@ -22,6 +22,10 @@ public final class AutomationRulePropertyArrayChangedValuesCondition { @JsonProperty(value = "changeType") private AutomationRulePropertyArrayChangedConditionSupportedChangeType changeType; + /** Creates an instance of AutomationRulePropertyArrayChangedValuesCondition class. */ + public AutomationRulePropertyArrayChangedValuesCondition() { + } + /** * Get the arrayType property: The arrayType property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java index 670c64ea59367..fb98a4f9dd0e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayConditionType.java @@ -15,6 +15,15 @@ public final class AutomationRulePropertyArrayConditionSupportedArrayConditionTy public static final AutomationRulePropertyArrayConditionSupportedArrayConditionType ANY_ITEM = fromString("AnyItem"); + /** + * Creates a new instance of AutomationRulePropertyArrayConditionSupportedArrayConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayConditionSupportedArrayConditionType() { + } + /** * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayConditionType from its string * representation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java index af5e23b9d813d..c209184c302e2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayConditionSupportedArrayType.java @@ -19,6 +19,15 @@ public final class AutomationRulePropertyArrayConditionSupportedArrayType public static final AutomationRulePropertyArrayConditionSupportedArrayType CUSTOM_DETAIL_VALUES = fromString("CustomDetailValues"); + /** + * Creates a new instance of AutomationRulePropertyArrayConditionSupportedArrayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyArrayConditionSupportedArrayType() { + } + /** * Creates or finds a AutomationRulePropertyArrayConditionSupportedArrayType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java index 40158ab460bc9..381ce9aa7de3a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyArrayValuesCondition.java @@ -29,6 +29,10 @@ public final class AutomationRulePropertyArrayValuesCondition { @JsonProperty(value = "itemConditions") private List itemConditions; + /** Creates an instance of AutomationRulePropertyArrayValuesCondition class. */ + public AutomationRulePropertyArrayValuesCondition() { + } + /** * Get the arrayType property: The arrayType property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java index 1ca0b71450304..1ef6316561616 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedChangedType.java @@ -18,6 +18,15 @@ public final class AutomationRulePropertyChangedConditionSupportedChangedType /** Static value ChangedTo for AutomationRulePropertyChangedConditionSupportedChangedType. */ public static final AutomationRulePropertyChangedConditionSupportedChangedType CHANGED_TO = fromString("ChangedTo"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedChangedType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedChangedType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedChangedType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java index 7f7b6618b8416..4ec99c10a8261 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyChangedConditionSupportedPropertyType.java @@ -23,6 +23,15 @@ public final class AutomationRulePropertyChangedConditionSupportedPropertyType public static final AutomationRulePropertyChangedConditionSupportedPropertyType INCIDENT_OWNER = fromString("IncidentOwner"); + /** + * Creates a new instance of AutomationRulePropertyChangedConditionSupportedPropertyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyChangedConditionSupportedPropertyType() { + } + /** * Creates or finds a AutomationRulePropertyChangedConditionSupportedPropertyType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java index ae9a8ff2891df..8f52fa3333600 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedOperator.java @@ -35,6 +35,15 @@ public final class AutomationRulePropertyConditionSupportedOperator /** Static value NotEndsWith for AutomationRulePropertyConditionSupportedOperator. */ public static final AutomationRulePropertyConditionSupportedOperator NOT_ENDS_WITH = fromString("NotEndsWith"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedOperator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedOperator() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedOperator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java index 72af96f863db6..b828f858109ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyConditionSupportedProperty.java @@ -220,6 +220,15 @@ public final class AutomationRulePropertyConditionSupportedProperty /** Static value Url for AutomationRulePropertyConditionSupportedProperty. */ public static final AutomationRulePropertyConditionSupportedProperty URL = fromString("Url"); + /** + * Creates a new instance of AutomationRulePropertyConditionSupportedProperty value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutomationRulePropertyConditionSupportedProperty() { + } + /** * Creates or finds a AutomationRulePropertyConditionSupportedProperty from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java index 9996382f4bddf..ff5cf10eefd44 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesChangedCondition.java @@ -35,6 +35,10 @@ public final class AutomationRulePropertyValuesChangedCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesChangedCondition class. */ + public AutomationRulePropertyValuesChangedCondition() { + } + /** * Get the propertyName property: The propertyName property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java index d04dd33f2854a..c6401d78b6c70 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulePropertyValuesCondition.java @@ -29,6 +29,10 @@ public final class AutomationRulePropertyValuesCondition { @JsonProperty(value = "propertyValues") private List propertyValues; + /** Creates an instance of AutomationRulePropertyValuesCondition class. */ + public AutomationRulePropertyValuesCondition() { + } + /** * Get the propertyName property: The property to evaluate in an automation rule property condition. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java index f2b367315f617..a8f694f9859cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleRunPlaybookAction.java @@ -20,6 +20,10 @@ public final class AutomationRuleRunPlaybookAction extends AutomationRuleAction @JsonProperty(value = "actionConfiguration") private PlaybookActionProperties actionConfiguration; + /** Creates an instance of AutomationRuleRunPlaybookAction class. */ + public AutomationRuleRunPlaybookAction() { + } + /** * Get the actionConfiguration property: The actionConfiguration property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java index 066a10e1830ec..a2bd9c35c4593 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRuleTriggeringLogic.java @@ -43,6 +43,10 @@ public final class AutomationRuleTriggeringLogic { @JsonProperty(value = "conditions") private List conditions; + /** Creates an instance of AutomationRuleTriggeringLogic class. */ + public AutomationRuleTriggeringLogic() { + } + /** * Get the isEnabled property: Determines whether the automation rule is enabled or disabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java index 157bf09eeafd3..5a3125430eb84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRules.java @@ -16,12 +16,14 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule. + * @return the automation rule along with {@link Response}. */ - AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Gets the automation rule. @@ -29,14 +31,12 @@ public interface AutomationRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the automation rule along with {@link Response}. + * @return the automation rule. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + AutomationRule get(String resourceGroupName, String workspaceName, String automationRuleId); /** * Delete the automation rule. @@ -44,12 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ - Object delete(String resourceGroupName, String workspaceName, String automationRuleId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String automationRuleId, Context context); /** * Delete the automation rule. @@ -57,14 +59,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param automationRuleId Automation rule ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String automationRuleId, Context context); + Object delete(String resourceGroupName, String workspaceName, String automationRuleId); /** * Gets all automation rules. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java index ca0dc3474b774..272b819532b79 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AutomationRulesList.java @@ -24,6 +24,10 @@ public final class AutomationRulesList { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AutomationRulesList class. */ + public AutomationRulesList() { + } + /** * Get the value property: The value property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java index 30665983543bf..c7333878de2f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Availability.java @@ -22,6 +22,10 @@ public final class Availability { @JsonProperty(value = "isPreview") private Boolean isPreview; + /** Creates an instance of Availability class. */ + public Availability() { + } + /** * Get the status property: The connector Availability Status. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java index 047f80cbc5a1a..4f5cf47b4120d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailCheckRequirements.java @@ -13,6 +13,10 @@ @JsonTypeName("AmazonWebServicesCloudTrail") @Immutable public final class AwsCloudTrailCheckRequirements extends DataConnectorsCheckRequirements { + /** Creates an instance of AwsCloudTrailCheckRequirements class. */ + public AwsCloudTrailCheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java index 85fed62b4c137..bd6fabfc5678a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnector.java @@ -22,6 +22,10 @@ public final class AwsCloudTrailDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsCloudTrailDataConnectorProperties innerProperties; + /** Creates an instance of AwsCloudTrailDataConnector class. */ + public AwsCloudTrailDataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services CloudTrail data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java index 019e54161be6d..0d072da4e805e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class AwsCloudTrailDataConnectorDataTypes { @JsonProperty(value = "logs", required = true) private AwsCloudTrailDataConnectorDataTypesLogs logs; + /** Creates an instance of AwsCloudTrailDataConnectorDataTypes class. */ + public AwsCloudTrailDataConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java index f11d9c72a1d9f..bb73c9450fe57 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsCloudTrailDataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsCloudTrailDataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsCloudTrailDataConnectorDataTypesLogs class. */ + public AwsCloudTrailDataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsCloudTrailDataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java index ddfb6f7d40c15..753b432fb0390 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3CheckRequirements.java @@ -13,6 +13,10 @@ @JsonTypeName("AmazonWebServicesS3") @Immutable public final class AwsS3CheckRequirements extends DataConnectorsCheckRequirements { + /** Creates an instance of AwsS3CheckRequirements class. */ + public AwsS3CheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java index 3739b6ccb5232..65fcba2368f60 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnector.java @@ -23,6 +23,10 @@ public final class AwsS3DataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private AwsS3DataConnectorProperties innerProperties; + /** Creates an instance of AwsS3DataConnector class. */ + public AwsS3DataConnector() { + } + /** * Get the innerProperties property: Amazon Web Services S3 data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java index 14c7a6754785f..18cc9658d41b6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class AwsS3DataConnectorDataTypes { @JsonProperty(value = "logs", required = true) private AwsS3DataConnectorDataTypesLogs logs; + /** Creates an instance of AwsS3DataConnectorDataTypes class. */ + public AwsS3DataConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java index dd24d8ad6de34..855fe6d5d57f8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AwsS3DataConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class AwsS3DataConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of AwsS3DataConnectorDataTypesLogs class. */ + public AwsS3DataConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public AwsS3DataConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java index 4c8ea02124614..c2929f76aa26f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureDevOpsResourceInfo.java @@ -22,6 +22,10 @@ public final class AzureDevOpsResourceInfo { @JsonProperty(value = "serviceConnectionId") private String serviceConnectionId; + /** Creates an instance of AzureDevOpsResourceInfo class. */ + public AzureDevOpsResourceInfo() { + } + /** * Get the pipelineId property: Id of the pipeline created for the source-control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java index 64b4871d5cf41..178ea6f4edd33 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AzureResourceEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.AzureResourceEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents an azure resource entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("AzureResource") -@Fluent +@Immutable public final class AzureResourceEntity extends EntityInner { /* * AzureResource entity properties @@ -23,6 +23,10 @@ public final class AzureResourceEntity extends EntityInner { @JsonProperty(value = "properties") private AzureResourceEntityProperties innerProperties; + /** Creates an instance of AzureResourceEntity class. */ + public AzureResourceEntity() { + } + /** * Get the innerProperties property: AzureResource entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java index b46a2d88c95d1..69d5f83fc4e26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkEntityMappings.java @@ -23,6 +23,10 @@ public final class BookmarkEntityMappings { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of BookmarkEntityMappings class. */ + public BookmarkEntityMappings() { + } + /** * Get the entityType property: The entity type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java index ea70e05214484..c20dfc59bd11f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandParameters.java @@ -30,6 +30,10 @@ public final class BookmarkExpandParameters { @JsonProperty(value = "startTime") private OffsetDateTime startTime; + /** Creates an instance of BookmarkExpandParameters class. */ + public BookmarkExpandParameters() { + } + /** * Get the endTime property: The end date filter, so the only expansion results returned are before this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java index b9b48339a131c..d0dd0a8b92952 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkExpandResponseValue.java @@ -24,6 +24,10 @@ public final class BookmarkExpandResponseValue { @JsonProperty(value = "edges") private List edges; + /** Creates an instance of BookmarkExpandResponseValue class. */ + public BookmarkExpandResponseValue() { + } + /** * Get the entities property: Array of the expansion result entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java index f89890b19242f..b718b92eea2f6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkList.java @@ -25,6 +25,10 @@ public final class BookmarkList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of BookmarkList class. */ + public BookmarkList() { + } + /** * Get the nextLink property: URL to fetch the next set of bookmarks. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java index cf54322f2c78d..510c32bc2a798 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkOperations.java @@ -16,13 +16,18 @@ public interface BookmarkOperations { * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return the entity expansion result operation response along with {@link Response}. */ - BookmarkExpandResponse expand( - String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); + Response expandWithResponse( + String resourceGroupName, + String workspaceName, + String bookmarkId, + BookmarkExpandParameters parameters, + Context context); /** * Expand an bookmark. @@ -31,16 +36,11 @@ BookmarkExpandResponse expand( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param parameters The parameters required to execute an expand operation on the given bookmark. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response along with {@link Response}. + * @return the entity expansion result operation response. */ - Response expandWithResponse( - String resourceGroupName, - String workspaceName, - String bookmarkId, - BookmarkExpandParameters parameters, - Context context); + BookmarkExpandResponse expand( + String resourceGroupName, String workspaceName, String bookmarkId, BookmarkExpandParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java index e1db491640d0e..e146bc88ea215 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkRelations.java @@ -58,12 +58,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation. + * @return a bookmark relation along with {@link Response}. */ - Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** * Gets a bookmark relation. @@ -72,14 +74,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark relation along with {@link Response}. + * @return a bookmark relation. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + Relation get(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Delete the bookmark relation. @@ -88,11 +88,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); /** * Delete the bookmark relation. @@ -101,14 +104,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, String relationName, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId, String relationName); /** * Gets a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java index bfad411f1ce64..37689f545cfe2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BookmarkTimelineItem.java @@ -65,6 +65,10 @@ public final class BookmarkTimelineItem extends EntityTimelineItem { @JsonProperty(value = "labels") private List labels; + /** Creates an instance of BookmarkTimelineItem class. */ + public BookmarkTimelineItem() { + } + /** * Get the azureResourceId property: The bookmark azure resource id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java index 3b3706f36fd81..844d404d48478 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Bookmarks.java @@ -41,12 +41,14 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark. + * @return a bookmark along with {@link Response}. */ - Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Gets a bookmark. @@ -54,14 +56,12 @@ public interface Bookmarks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a bookmark along with {@link Response}. + * @return a bookmark. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + Bookmark get(String resourceGroupName, String workspaceName, String bookmarkId); /** * Delete the bookmark. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String bookmarkId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String bookmarkId, Context context); /** * Delete the bookmark. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param bookmarkId Bookmark ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String bookmarkId, Context context); + void delete(String resourceGroupName, String workspaceName, String bookmarkId); /** * Gets a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java index be26717140de0..563c06bf65e06 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/BooleanConditionProperties.java @@ -20,6 +20,10 @@ public final class BooleanConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRuleBooleanCondition conditionProperties; + /** Creates an instance of BooleanConditionProperties class. */ + public BooleanConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java new file mode 100644 index 0000000000000..1e8768f358149 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Category.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Categories of recommendations. */ +public final class Category extends ExpandableStringEnum { + /** Static value Onboarding for Category. */ + public static final Category ONBOARDING = fromString("Onboarding"); + + /** Static value NewFeature for Category. */ + public static final Category NEW_FEATURE = fromString("NewFeature"); + + /** Static value SocEfficiency for Category. */ + public static final Category SOC_EFFICIENCY = fromString("SocEfficiency"); + + /** Static value CostOptimization for Category. */ + public static final Category COST_OPTIMIZATION = fromString("CostOptimization"); + + /** Static value Demo for Category. */ + public static final Category DEMO = fromString("Demo"); + + /** + * Creates a new instance of Category value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Category() { + } + + /** + * Creates or finds a Category from its string representation. + * + * @param name a name to look for. + * @return the corresponding Category. + */ + @JsonCreator + public static Category fromString(String name) { + return fromString(name, Category.class); + } + + /** + * Gets known Category values. + * + * @return known Category values. + */ + public static Collection values() { + return values(Category.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java index 9d6d5e61b586f..df99e16b4d4af 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ClientInfo.java @@ -35,6 +35,10 @@ public final class ClientInfo { @JsonProperty(value = "userPrincipalName") private String userPrincipalName; + /** Creates an instance of ClientInfo class. */ + public ClientInfo() { + } + /** * Get the email property: The email of the client. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java index 2d0908e927daf..ed15f6bcb5162 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CloudApplicationEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.CloudApplicationEntityProperties; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a cloud application entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("CloudApplication") -@Fluent +@Immutable public final class CloudApplicationEntity extends EntityInner { /* * CloudApplication entity properties @@ -23,6 +23,10 @@ public final class CloudApplicationEntity extends EntityInner { @JsonProperty(value = "properties") private CloudApplicationEntityProperties innerProperties; + /** Creates an instance of CloudApplicationEntity class. */ + public CloudApplicationEntity() { + } + /** * Get the innerProperties property: CloudApplication entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java index 396d69282da38..5e61a7e1755c6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessApiPollingDataConnector.java @@ -22,6 +22,10 @@ public final class CodelessApiPollingDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private ApiPollingParameters innerProperties; + /** Creates an instance of CodelessApiPollingDataConnector class. */ + public CodelessApiPollingDataConnector() { + } + /** * Get the innerProperties property: Codeless poling data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java index a9a781b14c946..5e07b5b9c84d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingAuthProperties.java @@ -89,6 +89,10 @@ public final class CodelessConnectorPollingAuthProperties { @JsonProperty(value = "scope") private String scope; + /** Creates an instance of CodelessConnectorPollingAuthProperties class. */ + public CodelessConnectorPollingAuthProperties() { + } + /** * Get the authType property: The authentication type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java index b1040c30de779..1c855a5070745 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingConfigProperties.java @@ -41,6 +41,10 @@ public final class CodelessConnectorPollingConfigProperties { @JsonProperty(value = "response") private CodelessConnectorPollingResponseProperties response; + /** Creates an instance of CodelessConnectorPollingConfigProperties class. */ + public CodelessConnectorPollingConfigProperties() { + } + /** * Get the isActive property: The poller active status. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java index a0d01a5af717c..ae569a83de31d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingPagingProperties.java @@ -65,6 +65,10 @@ public final class CodelessConnectorPollingPagingProperties { @JsonProperty(value = "pageSize") private Integer pageSize; + /** Creates an instance of CodelessConnectorPollingPagingProperties class. */ + public CodelessConnectorPollingPagingProperties() { + } + /** * Get the pagingType property: Describes the type. could be 'None', 'PageToken', 'PageCount', 'TimeStamp'. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java index cf4d6e8754b98..268b7ae718403 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingRequestProperties.java @@ -83,6 +83,10 @@ public final class CodelessConnectorPollingRequestProperties { @JsonProperty(value = "endTimeAttributeName") private String endTimeAttributeName; + /** Creates an instance of CodelessConnectorPollingRequestProperties class. */ + public CodelessConnectorPollingRequestProperties() { + } + /** * Get the apiEndpoint property: Describe the endpoint we should pull the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java index 561f409ee82f6..6418f41211f73 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessConnectorPollingResponseProperties.java @@ -36,6 +36,10 @@ public final class CodelessConnectorPollingResponseProperties { @JsonProperty(value = "isGzipCompressed") private Boolean isGzipCompressed; + /** Creates an instance of CodelessConnectorPollingResponseProperties class. */ + public CodelessConnectorPollingResponseProperties() { + } + /** * Get the eventsJsonPaths property: Describes the path we should extract the data in the response. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java index bf0ae2f7d8b44..41d52e49929fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigProperties.java @@ -84,6 +84,10 @@ public final class CodelessUiConnectorConfigProperties { @JsonProperty(value = "instructionSteps", required = true) private List instructionSteps; + /** Creates an instance of CodelessUiConnectorConfigProperties class. */ + public CodelessUiConnectorConfigProperties() { + } + /** * Get the title property: Connector blade title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java index c57fe3ddde438..324c9a5fdd6c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem.java @@ -10,6 +10,10 @@ /** The CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem extends ConnectivityCriteria { + /** Creates an instance of CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem class. */ + public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesConnectivityCriteriaItem withType(ConnectivityType type) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java index 1f9a8f78eb43e..bc9304fa137a3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesDataTypesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesDataTypesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesDataTypesItem extends LastDataReceivedDataType { + /** Creates an instance of CodelessUiConnectorConfigPropertiesDataTypesItem class. */ + public CodelessUiConnectorConfigPropertiesDataTypesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesDataTypesItem withName(String name) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java index 80ff447db0ad5..251488f8d6243 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesGraphQueriesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesGraphQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesGraphQueriesItem extends GraphQueries { + /** Creates an instance of CodelessUiConnectorConfigPropertiesGraphQueriesItem class. */ + public CodelessUiConnectorConfigPropertiesGraphQueriesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesGraphQueriesItem withMetricName(String metricName) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java index 187727984833d..3116316916d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesInstructionStepsItem.java @@ -10,6 +10,10 @@ /** The CodelessUiConnectorConfigPropertiesInstructionStepsItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesInstructionStepsItem extends InstructionSteps { + /** Creates an instance of CodelessUiConnectorConfigPropertiesInstructionStepsItem class. */ + public CodelessUiConnectorConfigPropertiesInstructionStepsItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesInstructionStepsItem withTitle(String title) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java index 288bd8d550f89..da94f59b943d7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiConnectorConfigPropertiesSampleQueriesItem.java @@ -9,6 +9,10 @@ /** The CodelessUiConnectorConfigPropertiesSampleQueriesItem model. */ @Fluent public final class CodelessUiConnectorConfigPropertiesSampleQueriesItem extends SampleQueries { + /** Creates an instance of CodelessUiConnectorConfigPropertiesSampleQueriesItem class. */ + public CodelessUiConnectorConfigPropertiesSampleQueriesItem() { + } + /** {@inheritDoc} */ @Override public CodelessUiConnectorConfigPropertiesSampleQueriesItem withDescription(String description) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java index 06cd156687bbc..cbf0702a87089 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CodelessUiDataConnector.java @@ -22,6 +22,10 @@ public final class CodelessUiDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private CodelessParameters innerProperties; + /** Creates an instance of CodelessUiDataConnector class. */ + public CodelessUiDataConnector() { + } + /** * Get the innerProperties property: Codeless UI data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java index 2e471ac418a27..006e4ef77ecf2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConditionType.java @@ -25,6 +25,15 @@ public final class ConditionType extends ExpandableStringEnum { /** Static value Boolean for ConditionType. */ public static final ConditionType BOOLEAN = fromString("Boolean"); + /** + * Creates a new instance of ConditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConditionType() { + } + /** * Creates or finds a ConditionType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java index 7e6818923a420..7613f93e6a8e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceLevel.java @@ -19,6 +19,15 @@ public final class ConfidenceLevel extends ExpandableStringEnum /** Static value High for ConfidenceLevel. */ public static final ConfidenceLevel HIGH = fromString("High"); + /** + * Creates a new instance of ConfidenceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConfidenceLevel() { + } + /** * Creates or finds a ConfidenceLevel from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java index 1f8966323364a..aa7a871a1503c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConfidenceScoreStatus.java @@ -25,6 +25,15 @@ public final class ConfidenceScoreStatus extends ExpandableStringEnum /** Static value APIKey for ConnectAuthKind. */ public static final ConnectAuthKind APIKEY = fromString("APIKey"); + /** + * Creates a new instance of ConnectAuthKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectAuthKind() { + } + /** * Creates or finds a ConnectAuthKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java index 655facb3559ae..be350399547f0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectedEntity.java @@ -22,6 +22,10 @@ public final class ConnectedEntity { @JsonProperty(value = "additionalData") private Object additionalData; + /** Creates an instance of ConnectedEntity class. */ + public ConnectedEntity() { + } + /** * Get the targetEntityId property: Entity Id of the connected entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java index da5f0724d4220..32ad5919b97bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityCriteria.java @@ -23,6 +23,10 @@ public class ConnectivityCriteria { @JsonProperty(value = "value") private List value; + /** Creates an instance of ConnectivityCriteria class. */ + public ConnectivityCriteria() { + } + /** * Get the type property: type of connectivity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java index d3298e56cbd90..2332c7a93c3fa 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ConnectivityType.java @@ -13,6 +13,15 @@ public final class ConnectivityType extends ExpandableStringEnum { /** Static value Workbook for ContentType. */ public static final ContentType WORKBOOK = fromString("Workbook"); + /** + * Creates a new instance of ContentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContentType() { + } + /** * Creates or finds a ContentType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java new file mode 100644 index 0000000000000..bb25525290bff --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Context.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Context of recommendation. */ +public final class Context extends ExpandableStringEnum { + /** Static value Analytics for Context. */ + public static final Context ANALYTICS = fromString("Analytics"); + + /** Static value Incidents for Context. */ + public static final Context INCIDENTS = fromString("Incidents"); + + /** Static value Overview for Context. */ + public static final Context OVERVIEW = fromString("Overview"); + + /** Static value None for Context. */ + public static final Context NONE = fromString("None"); + + /** + * Creates a new instance of Context value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Context() { + } + + /** + * Creates or finds a Context from its string representation. + * + * @param name a name to look for. + * @return the corresponding Context. + */ + @JsonCreator + public static Context fromString(String name) { + return fromString(name, Context.class); + } + + /** + * Gets known Context values. + * + * @return known Context values. + */ + public static Collection values() { + return values(Context.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java index 76169a7542b08..8a71f8d00b29c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQuery.java @@ -19,6 +19,10 @@ @JsonSubTypes({@JsonSubTypes.Type(name = "Activity", value = ActivityCustomEntityQuery.class)}) @Fluent public class CustomEntityQuery extends ResourceWithEtag { + /** Creates an instance of CustomEntityQuery class. */ + public CustomEntityQuery() { + } + /** {@inheritDoc} */ @Override public CustomEntityQuery withEtag(String etag) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java index b0e8395c6c5ff..9ad30cad89cd3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/CustomEntityQueryKind.java @@ -13,6 +13,15 @@ public final class CustomEntityQueryKind extends ExpandableStringEnum requestConfigUserInputValues; + /** Creates an instance of DataConnectorConnectBody class. */ + public DataConnectorConnectBody() { + } + /** * Get the kind property: The authentication kind used to poll the data. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java index 936cd58c91149..3c8f4bb2d8f76 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorDataTypeCommon.java @@ -17,6 +17,10 @@ public class DataConnectorDataTypeCommon { @JsonProperty(value = "state", required = true) private DataTypeState state; + /** Creates an instance of DataConnectorDataTypeCommon class. */ + public DataConnectorDataTypeCommon() { + } + /** * Get the state property: Describe whether this data type connection is enabled or not. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java index b140a12dfff79..fad570c897818 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorKind.java @@ -37,6 +37,10 @@ public final class DataConnectorKind extends ExpandableStringEnum value; + /** Creates an instance of DataConnectorList class. */ + public DataConnectorList() { + } + /** * Get the nextLink property: URL to fetch the next set of data connectors. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java index 36d4914ce98b3..518078c708dd1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorTenantId.java @@ -17,6 +17,10 @@ public class DataConnectorTenantId { @JsonProperty(value = "tenantId", required = true) private String tenantId; + /** Creates an instance of DataConnectorTenantId class. */ + public DataConnectorTenantId() { + } + /** * Get the tenantId property: The tenant id to connect to, and get the data from. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java index e0bbbf5d03346..93fbfed69f7b3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorWithAlertsProperties.java @@ -16,6 +16,10 @@ public class DataConnectorWithAlertsProperties { @JsonProperty(value = "dataTypes") private AlertsDataTypeOfDataConnector dataTypes; + /** Creates an instance of DataConnectorWithAlertsProperties class. */ + public DataConnectorWithAlertsProperties() { + } + /** * Get the dataTypes property: The available data types for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java index f80628152117b..28edd0d5c9f4f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectors.java @@ -36,19 +36,6 @@ public interface DataConnectors { */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); - /** - * Gets a data connector. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataConnectorId Connector ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data connector. - */ - DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); - /** * Gets a data connector. * @@ -65,19 +52,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Creates or updates the data connector. + * Gets a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data connector. + * @return a data connector. */ - DataConnector createOrUpdate( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); + DataConnector get(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Creates or updates the data connector. @@ -100,16 +85,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the data connector. + * Creates or updates the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param dataConnector The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data connector. */ - void delete(String resourceGroupName, String workspaceName, String dataConnectorId); + DataConnector createOrUpdate( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorInner dataConnector); /** * Delete the data connector. @@ -127,18 +115,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); /** - * Connects a data connector. + * Delete the data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. - * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void connect( - String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); + void delete(String resourceGroupName, String workspaceName, String dataConnectorId); /** * Connects a data connector. @@ -161,16 +147,18 @@ Response connectWithResponse( Context context); /** - * Disconnect a data connector. + * Connects a data connector. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorId Connector ID. + * @param connectBody The data connector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); + void connect( + String resourceGroupName, String workspaceName, String dataConnectorId, DataConnectorConnectBody connectBody); /** * Disconnect a data connector. @@ -186,4 +174,16 @@ Response connectWithResponse( */ Response disconnectWithResponse( String resourceGroupName, String workspaceName, String dataConnectorId, Context context); + + /** + * Disconnect a data connector. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataConnectorId Connector ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void disconnect(String resourceGroupName, String workspaceName, String dataConnectorId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java index 57317f6ffc3c3..0ac49063f1782 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirements.java @@ -29,6 +29,9 @@ @JsonSubTypes.Type(name = "MicrosoftThreatProtection", value = MtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeATP", value = OfficeAtpCheckRequirements.class), @JsonSubTypes.Type(name = "OfficeIRM", value = OfficeIrmCheckRequirements.class), + @JsonSubTypes.Type( + name = "MicrosoftPurviewInformationProtection", + value = MicrosoftPurviewInformationProtectionCheckRequirements.class), @JsonSubTypes.Type(name = "Office365Project", value = Office365ProjectCheckRequirements.class), @JsonSubTypes.Type(name = "OfficePowerBI", value = OfficePowerBICheckRequirements.class), @JsonSubTypes.Type(name = "ThreatIntelligence", value = TICheckRequirements.class), @@ -37,6 +40,10 @@ }) @Immutable public class DataConnectorsCheckRequirements { + /** Creates an instance of DataConnectorsCheckRequirements class. */ + public DataConnectorsCheckRequirements() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java index 6524d59b35155..ba642ba0695fc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataConnectorsCheckRequirementsOperations.java @@ -15,15 +15,17 @@ public interface DataConnectorsCheckRequirementsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type. + * @return requirements state for a data connector type along with {@link Response}. */ - DataConnectorRequirementsState post( + Response postWithResponse( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements, + Context context); /** * Get requirements state for a data connector type. @@ -31,15 +33,13 @@ DataConnectorRequirementsState post( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataConnectorsCheckRequirements The parameters for requirements check message. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return requirements state for a data connector type along with {@link Response}. + * @return requirements state for a data connector type. */ - Response postWithResponse( + DataConnectorRequirementsState post( String resourceGroupName, String workspaceName, - DataConnectorsCheckRequirements dataConnectorsCheckRequirements, - Context context); + DataConnectorsCheckRequirements dataConnectorsCheckRequirements); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java index 419ceca405400..445def19bebcf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeDefinitions.java @@ -16,6 +16,10 @@ public final class DataTypeDefinitions { @JsonProperty(value = "dataType") private String dataType; + /** Creates an instance of DataTypeDefinitions class. */ + public DataTypeDefinitions() { + } + /** * Get the dataType property: The data type name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java index f0851844c733a..e84f1e9d4f61d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DataTypeState.java @@ -16,6 +16,15 @@ public final class DataTypeState extends ExpandableStringEnum { /** Static value Disabled for DataTypeState. */ public static final DataTypeState DISABLED = fromString("Disabled"); + /** + * Creates a new instance of DataTypeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataTypeState() { + } + /** * Creates or finds a DataTypeState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java index f0501a0e1fbcb..0881b11bbc1cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeleteStatus.java @@ -19,6 +19,15 @@ public final class DeleteStatus extends ExpandableStringEnum { /** Static value Unspecified for DeleteStatus. */ public static final DeleteStatus UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of DeleteStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeleteStatus() { + } + /** * Creates or finds a DeleteStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java index f500a22a553ec..481720e7baa7c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Deployment.java @@ -41,6 +41,10 @@ public final class Deployment { @JsonProperty(value = "deploymentLogsUrl") private String deploymentLogsUrl; + /** Creates an instance of Deployment class. */ + public Deployment() { + } + /** * Get the deploymentId property: Deployment identifier. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java index 0cfc63e3b5a8a..c54e5010665ff 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeploymentFetchStatus.java @@ -19,6 +19,15 @@ public final class DeploymentFetchStatus extends ExpandableStringEnum /** Static value Canceling for DeploymentState. */ public static final DeploymentState CANCELING = fromString("Canceling"); + /** + * Creates a new instance of DeploymentState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentState() { + } + /** * Creates or finds a DeploymentState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java index 2a78da582b0bb..181296bc81544 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/DeviceImportance.java @@ -22,6 +22,15 @@ public final class DeviceImportance extends ExpandableStringEnum getWithResponse(String resourceGroupName, String domain, Context context); /** * Get whois information for a single domain name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param domain Domain name to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return whois information for a single domain name along with {@link Response}. + * @return whois information for a single domain name. */ - Response getWithResponse(String resourceGroupName, String domain, Context context); + EnrichmentDomainWhois get(String resourceGroupName, String domain); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java index eaa3c125f5675..49d592d4defa7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365CheckRequirements.java @@ -21,6 +21,10 @@ public final class Dynamics365CheckRequirements extends DataConnectorsCheckRequi @JsonProperty(value = "properties") private Dynamics365CheckRequirementsProperties innerProperties; + /** Creates an instance of Dynamics365CheckRequirements class. */ + public Dynamics365CheckRequirements() { + } + /** * Get the innerProperties property: Dynamics365 requirements check properties. * @@ -30,6 +34,29 @@ private Dynamics365CheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the Dynamics365CheckRequirements object itself. + */ + public Dynamics365CheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Dynamics365CheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java index 653d886600c33..5ad9d53bce116 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnector.java @@ -22,6 +22,10 @@ public final class Dynamics365DataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private Dynamics365DataConnectorProperties innerProperties; + /** Creates an instance of Dynamics365DataConnector class. */ + public Dynamics365DataConnector() { + } + /** * Get the innerProperties property: Dynamics365 data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java index 0df0a2723965f..e85f4ef27e118 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class Dynamics365DataConnectorDataTypes { @JsonProperty(value = "dynamics365CdsActivities", required = true) private Dynamics365DataConnectorDataTypesDynamics365CdsActivities dynamics365CdsActivities; + /** Creates an instance of Dynamics365DataConnectorDataTypes class. */ + public Dynamics365DataConnectorDataTypes() { + } + /** * Get the dynamics365CdsActivities property: Common Data Service data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java index d1ed289fd67c8..779c712378411 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.java @@ -9,6 +9,10 @@ /** Common Data Service data type connection. */ @Fluent public final class Dynamics365DataConnectorDataTypesDynamics365CdsActivities extends DataConnectorDataTypeCommon { + /** Creates an instance of Dynamics365DataConnectorDataTypesDynamics365CdsActivities class. */ + public Dynamics365DataConnectorDataTypesDynamics365CdsActivities() { + } + /** {@inheritDoc} */ @Override public Dynamics365DataConnectorDataTypesDynamics365CdsActivities withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java index d75c0f24e472b..c49d22318903d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContact.java @@ -71,6 +71,10 @@ public final class EnrichmentDomainWhoisContact { @JsonProperty(value = "email") private String email; + /** Creates an instance of EnrichmentDomainWhoisContact class. */ + public EnrichmentDomainWhoisContact() { + } + /** * Get the name property: The name of this contact. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java index 869d7a774b30f..b7531a9759b21 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisContacts.java @@ -34,6 +34,10 @@ public final class EnrichmentDomainWhoisContacts { @JsonProperty(value = "tech") private EnrichmentDomainWhoisContact tech; + /** Creates an instance of EnrichmentDomainWhoisContacts class. */ + public EnrichmentDomainWhoisContacts() { + } + /** * Get the admin property: The admin contact for this whois record. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java index 7a22dff870a65..75a8b2a8017d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisDetails.java @@ -35,6 +35,10 @@ public final class EnrichmentDomainWhoisDetails { @JsonProperty(value = "statuses") private List statuses; + /** Creates an instance of EnrichmentDomainWhoisDetails class. */ + public EnrichmentDomainWhoisDetails() { + } + /** * Get the registrar property: The registrar associated with this domain. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java index 545f2a28b66bb..3fe8745eb42de 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EnrichmentDomainWhoisRegistrarDetails.java @@ -46,6 +46,10 @@ public final class EnrichmentDomainWhoisRegistrarDetails { @JsonProperty(value = "whoisServer") private String whoisServer; + /** Creates an instance of EnrichmentDomainWhoisRegistrarDetails class. */ + public EnrichmentDomainWhoisRegistrarDetails() { + } + /** * Get the name property: The name of this registrar. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java index 182172f2a926e..882cb668d3713 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Entities.java @@ -35,19 +35,6 @@ public interface Entities { */ 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. * @@ -63,19 +50,17 @@ public interface Entities { Response getWithResponse(String resourceGroupName, String workspaceName, String entityId, Context context); /** - * Expands an entity. + * Gets an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity expansion result operation response. + * @return an entity. */ - EntityExpandResponse expand( - String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); + Entity get(String resourceGroupName, String workspaceName, String entityId); /** * Expands an entity. @@ -98,19 +83,19 @@ Response expandWithResponse( Context context); /** - * Get Insights and Activities for an entity. + * Expands an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param kind The Kind parameter for queries. + * @param parameters The parameters required to execute an expand operation on the given entity. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return insights and Activities for an entity. + * @return the entity expansion result operation response. */ - GetQueriesResponse queries( - String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); + EntityExpandResponse expand( + String resourceGroupName, String workspaceName, String entityId, EntityExpandParameters parameters); /** * Get Insights and Activities for an entity. @@ -129,19 +114,19 @@ Response queriesWithResponse( String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind, Context context); /** - * Execute Insights for an entity. + * Get Insights and Activities for an entity. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityId entity ID. - * @param parameters The parameters required to execute insights on the given entity. + * @param kind The Kind parameter for queries. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Insights result operation response. + * @return insights and Activities for an entity. */ - EntityGetInsightsResponse getInsights( - String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); + GetQueriesResponse queries( + String resourceGroupName, String workspaceName, String entityId, EntityItemQueryKind kind); /** * Execute Insights for an entity. @@ -162,4 +147,19 @@ Response getInsightsWithResponse( String entityId, EntityGetInsightsParameters parameters, Context context); + + /** + * Execute Insights for an entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityId entity ID. + * @param parameters The parameters required to execute insights on the given entity. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Get Insights result operation response. + */ + EntityGetInsightsResponse getInsights( + String resourceGroupName, String workspaceName, String entityId, EntityGetInsightsParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java index 29a184b1bde33..faac913312c82 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntitiesGetTimelines.java @@ -16,13 +16,18 @@ public interface EntitiesGetTimelines { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response. + * @return the entity timeline result operation response along with {@link Response}. */ - EntityTimelineResponse list( - String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); + Response listWithResponse( + String resourceGroupName, + String workspaceName, + String entityId, + EntityTimelineParameters parameters, + Context context); /** * Timeline for an entity. @@ -31,16 +36,11 @@ EntityTimelineResponse list( * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param parameters The parameters required to execute an timeline operation on the given entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the entity timeline result operation response along with {@link Response}. + * @return the entity timeline result operation response. */ - Response listWithResponse( - String resourceGroupName, - String workspaceName, - String entityId, - EntityTimelineParameters parameters, - Context context); + EntityTimelineResponse list( + String resourceGroupName, String workspaceName, String entityId, EntityTimelineParameters parameters); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java index 7ebdadd6fc3c6..7d596084948ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityAnalytics.java @@ -23,6 +23,10 @@ public final class EntityAnalytics extends SettingsInner { @JsonProperty(value = "properties") private EntityAnalyticsProperties innerProperties; + /** Creates an instance of EntityAnalytics class. */ + public EntityAnalytics() { + } + /** * Get the innerProperties property: EntityAnalytics properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java index 49d3c8f895a19..5252752f3fb19 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityCommonProperties.java @@ -26,6 +26,10 @@ public class EntityCommonProperties { @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) private String friendlyName; + /** Creates an instance of EntityCommonProperties class. */ + public EntityCommonProperties() { + } + /** * Get the additionalData property: A bag of custom fields that should be part of the entity and will be presented * to the user. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java index e925912285ebb..92eb022c689d9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityEdges.java @@ -25,6 +25,10 @@ public final class EntityEdges { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map additionalData; + /** Creates an instance of EntityEdges class. */ + public EntityEdges() { + } + /** * Get the targetEntityId property: The target entity Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java index 8d0d6ec6ebdcf..d577a3d079d72 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandParameters.java @@ -30,6 +30,10 @@ public final class EntityExpandParameters { @JsonProperty(value = "startTime") private OffsetDateTime startTime; + /** Creates an instance of EntityExpandParameters class. */ + public EntityExpandParameters() { + } + /** * Get the endTime property: The end date filter, so the only expansion results returned are before this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java index f8558de18c341..839192828e368 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityExpandResponseValue.java @@ -24,6 +24,10 @@ public final class EntityExpandResponseValue { @JsonProperty(value = "edges") private List edges; + /** Creates an instance of EntityExpandResponseValue class. */ + public EntityExpandResponseValue() { + } + /** * Get the entities property: Array of the expansion result entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java index 0d26828407936..7c6b4b3ae1360 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityFieldMapping.java @@ -22,6 +22,10 @@ public final class EntityFieldMapping { @JsonProperty(value = "value") private String value; + /** Creates an instance of EntityFieldMapping class. */ + public EntityFieldMapping() { + } + /** * Get the identifier property: Alert V3 identifier. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java index 04a3e0d4c5303..23167eecede9e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityGetInsightsParameters.java @@ -38,6 +38,10 @@ public final class EntityGetInsightsParameters { @JsonProperty(value = "insightQueryIds") private List insightQueryIds; + /** Creates an instance of EntityGetInsightsParameters class. */ + public EntityGetInsightsParameters() { + } + /** * Get the startTime property: The start timeline date, so the results returned are after this date. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java index 15d19b7473a95..6fd53f2bd08d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItem.java @@ -35,6 +35,10 @@ public final class EntityInsightItem { @JsonProperty(value = "chartQueryResults") private List chartQueryResults; + /** Creates an instance of EntityInsightItem class. */ + public EntityInsightItem() { + } + /** * Get the queryId property: The query id of the insight. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java index e04c157d5dc66..a2e6328b624bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityInsightItemQueryTimeInterval.java @@ -23,6 +23,10 @@ public final class EntityInsightItemQueryTimeInterval { @JsonProperty(value = "endTime") private OffsetDateTime endTime; + /** Creates an instance of EntityInsightItemQueryTimeInterval class. */ + public EntityInsightItemQueryTimeInterval() { + } + /** * Get the startTime property: Insight query start time. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java index 3759170c00e3b..cb0816389a7ff 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityItemQueryKind.java @@ -13,6 +13,15 @@ public final class EntityItemQueryKind extends ExpandableStringEnum { /** Static value Nic for EntityKind. */ public static final EntityKind NIC = fromString("Nic"); + /** + * Creates a new instance of EntityKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityKind() { + } + /** * Creates or finds a EntityKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java index 0e160998fea52..04067d516bde4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityList.java @@ -25,6 +25,10 @@ public final class EntityList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of EntityList class. */ + public EntityList() { + } + /** * Get the nextLink property: URL to fetch the next set of entities. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java index b5081a9937a3f..f0fb60fa302b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMapping.java @@ -23,6 +23,10 @@ public final class EntityMapping { @JsonProperty(value = "fieldMappings") private List fieldMappings; + /** Creates an instance of EntityMapping class. */ + public EntityMapping() { + } + /** * Get the entityType property: The V3 type of the mapped entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java index 5d33cc2b87a47..449a0fa75e2a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityMappingType.java @@ -64,6 +64,15 @@ public final class EntityMappingType extends ExpandableStringEnum /** Static value AzureActiveDirectory for EntityProviders. */ public static final EntityProviders AZURE_ACTIVE_DIRECTORY = fromString("AzureActiveDirectory"); + /** + * Creates a new instance of EntityProviders value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityProviders() { + } + /** * Creates or finds a EntityProviders from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java index d0f22a8e74b05..eafaf93054836 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueries.java @@ -37,19 +37,6 @@ public interface EntityQueries { PagedIterable list( String resourceGroupName, String workspaceName, EntityQueriesKind kind, Context context); - /** - * Gets an entity query. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param entityQueryId entity query ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. - */ - EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); - /** * Gets an entity query. * @@ -66,19 +53,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); /** - * Creates or updates the entity query. + * Gets an entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. - * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return specific entity query. + * @return an entity query. */ - EntityQuery createOrUpdate( - String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); + EntityQuery get(String resourceGroupName, String workspaceName, String entityQueryId); /** * Creates or updates the entity query. @@ -101,16 +86,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the entity query. + * Creates or updates the entity query. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryId entity query ID. + * @param entityQuery The entity query we want to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return specific entity query. */ - void delete(String resourceGroupName, String workspaceName, String entityQueryId); + EntityQuery createOrUpdate( + String resourceGroupName, String workspaceName, String entityQueryId, CustomEntityQuery entityQuery); /** * Delete the entity query. @@ -126,4 +114,16 @@ Response createOrUpdateWithResponse( */ Response deleteWithResponse( String resourceGroupName, String workspaceName, String entityQueryId, Context context); + + /** + * Delete the entity query. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param entityQueryId entity query ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String entityQueryId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java index 9af86d0f151c2..7c26b4207a89b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueriesKind.java @@ -16,6 +16,15 @@ public final class EntityQueriesKind extends ExpandableStringEnum /** Static value Activity for EntityQueryKind. */ public static final EntityQueryKind ACTIVITY = fromString("Activity"); + /** + * Creates a new instance of EntityQueryKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityQueryKind() { + } + /** * Creates or finds a EntityQueryKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java index 28db9eb064609..6c4c8f1653b64 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryList.java @@ -25,6 +25,10 @@ public final class EntityQueryList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of EntityQueryList class. */ + public EntityQueryList() { + } + /** * Get the nextLink property: URL to fetch the next set of entity queries. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java index 21ce0db46791c..b6a36d38e2259 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplateKind.java @@ -13,6 +13,15 @@ public final class EntityQueryTemplateKind extends ExpandableStringEnum value; + /** Creates an instance of EntityQueryTemplateList class. */ + public EntityQueryTemplateList() { + } + /** * Get the nextLink property: URL to fetch the next set of entity query templates. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java index 4bddc9d19d913..f30d43de07a78 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityQueryTemplates.java @@ -35,7 +35,7 @@ public interface EntityQueryTemplates { * @return all entity query templates as paginated response with {@link PagedIterable}. */ PagedIterable list( - String resourceGroupName, String workspaceName, Constant88 kind, Context context); + String resourceGroupName, String workspaceName, Constant96 kind, Context context); /** * Gets an entity query. @@ -43,12 +43,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query. + * @return an entity query along with {@link Response}. */ - EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); /** * Gets an entity query. @@ -56,12 +58,10 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param entityQueryTemplateId entity query template ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity query along with {@link Response}. + * @return an entity query. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String entityQueryTemplateId, Context context); + EntityQueryTemplate get(String resourceGroupName, String workspaceName, String entityQueryTemplateId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java index 28d08ca8e2716..0ce15bc7a8edf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityRelations.java @@ -16,12 +16,14 @@ public interface EntityRelations { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation. + * @return an entity relation along with {@link Response}. */ - Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); + Response getRelationWithResponse( + String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); /** * Gets an entity relation. @@ -30,12 +32,10 @@ public interface EntityRelations { * @param workspaceName The name of the workspace. * @param entityId entity ID. * @param relationName Relation Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an entity relation along with {@link Response}. + * @return an entity relation. */ - Response getRelationWithResponse( - String resourceGroupName, String workspaceName, String entityId, String relationName, Context context); + Relation getRelation(String resourceGroupName, String workspaceName, String entityId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java index fff8bc9123109..e366cf19eccd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineItem.java @@ -24,6 +24,10 @@ }) @Immutable public class EntityTimelineItem { + /** Creates an instance of EntityTimelineItem class. */ + public EntityTimelineItem() { + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java index e5a502f1acfb8..98cadce02de36 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EntityTimelineKind.java @@ -22,6 +22,15 @@ public final class EntityTimelineKind extends ExpandableStringEnum { /** Static value Nic for EntityType. */ public static final EntityType NIC = fromString("Nic"); + /** + * Creates a new instance of EntityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityType() { + } + /** * Creates or finds a EntityType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java index 8849d5c4a7b91..6e0980e896b95 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EventGroupingAggregationKind.java @@ -16,6 +16,15 @@ public final class EventGroupingAggregationKind extends ExpandableStringEnum aggregations; + /** Creates an instance of ExpansionResultsMetadata class. */ + public ExpansionResultsMetadata() { + } + /** * Get the aggregations property: Information of the aggregated nodes in the expansion result. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java index 05d0db1cba993..9e804778c4f86 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/EyesOn.java @@ -22,6 +22,10 @@ public final class EyesOn extends SettingsInner { @JsonProperty(value = "properties") private EyesOnSettingsProperties innerProperties; + /** Creates an instance of EyesOn class. */ + public EyesOn() { + } + /** * Get the innerProperties property: EyesOn properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java index d01e4fca5f25b..218cfb57f5d25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FieldMapping.java @@ -22,6 +22,10 @@ public final class FieldMapping { @JsonProperty(value = "columnName") private String columnName; + /** Creates an instance of FieldMapping class. */ + public FieldMapping() { + } + /** * Get the identifier property: the V3 identifier of the entity. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java index 7cfc51143dbb1..6d0cb7f7b9d84 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.FileEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a file entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("File") -@Fluent +@Immutable public final class FileEntity extends EntityInner { /* * File entity properties @@ -24,6 +24,10 @@ public final class FileEntity extends EntityInner { @JsonProperty(value = "properties") private FileEntityProperties innerProperties; + /** Creates an instance of FileEntity class. */ + public FileEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java index b75ccaba87f1d..2e53a0ca367f3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileFormat.java @@ -19,6 +19,15 @@ public final class FileFormat extends ExpandableStringEnum { /** Static value Unspecified for FileFormat. */ public static final FileFormat UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of FileFormat value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FileFormat() { + } + /** * Creates or finds a FileFormat from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java index 60f2e72f165e0..71548df30f7a1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileHashAlgorithm.java @@ -25,6 +25,15 @@ public final class FileHashAlgorithm extends ExpandableStringEnum value; + /** Creates an instance of FileImportList class. */ + public FileImportList() { + } + /** * Get the nextLink property: URL to fetch the next set of file imports. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java index 865e69307352d..21ec46620540a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImportState.java @@ -31,6 +31,15 @@ public final class FileImportState extends ExpandableStringEnum /** Static value Unspecified for FileImportState. */ public static final FileImportState UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of FileImportState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FileImportState() { + } + /** * Creates or finds a FileImportState from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java index ae0a2d6348d24..2d077559c476a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileImports.java @@ -54,12 +54,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import. + * @return a file import along with {@link Response}. */ - FileImport get(String resourceGroupName, String workspaceName, String fileImportId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String fileImportId, Context context); /** * Gets a file import. @@ -67,14 +69,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param fileImportId File import ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a file import along with {@link Response}. + * @return a file import. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String fileImportId, Context context); + FileImport get(String resourceGroupName, String workspaceName, String fileImportId); /** * Delete the file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java index 39027c4f608c9..2f7e6eae298dc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FileMetadata.java @@ -40,6 +40,10 @@ public final class FileMetadata { @JsonProperty(value = "deleteStatus", access = JsonProperty.Access.WRITE_ONLY) private DeleteStatus deleteStatus; + /** Creates an instance of FileMetadata class. */ + public FileMetadata() { + } + /** * Get the fileFormat property: The format of the file. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java index 792e517d8d108..e4da3b1c6f151 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRule.java @@ -24,6 +24,10 @@ public final class FusionAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private FusionAlertRuleProperties innerProperties; + /** Creates an instance of FusionAlertRule class. */ + public FusionAlertRule() { + } + /** * Get the innerProperties property: Fusion alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java index ce4da38707f03..e8d4cfadb18d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class FusionAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private FusionAlertRuleTemplateProperties innerProperties; + /** Creates an instance of FusionAlertRuleTemplate class. */ + public FusionAlertRuleTemplate() { + } + /** * Get the innerProperties property: Fusion alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java index 018fafeb72565..d842490715ceb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionScenarioExclusionPattern.java @@ -23,6 +23,10 @@ public final class FusionScenarioExclusionPattern { @JsonProperty(value = "dateAddedInUTC", required = true) private String dateAddedInUtc; + /** Creates an instance of FusionScenarioExclusionPattern class. */ + public FusionScenarioExclusionPattern() { + } + /** * Get the exclusionPattern property: Scenario exclusion pattern. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java index e551140636d87..12e0f1644634f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSettings.java @@ -30,6 +30,10 @@ public final class FusionSourceSettings { @JsonProperty(value = "sourceSubTypes") private List sourceSubTypes; + /** Creates an instance of FusionSourceSettings class. */ + public FusionSourceSettings() { + } + /** * Get the enabled property: Determines whether this source signal is enabled or disabled in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java index cdf5cd5f92699..7c45ee6c6e36d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSourceSubTypeSetting.java @@ -36,6 +36,10 @@ public final class FusionSourceSubTypeSetting { @JsonProperty(value = "severityFilters", required = true) private FusionSubTypeSeverityFilter severityFilters; + /** Creates an instance of FusionSourceSubTypeSetting class. */ + public FusionSourceSubTypeSetting() { + } + /** * Get the enabled property: Determines whether this source subtype under source signal is enabled or disabled in * Fusion detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java index c6ae35c723373..8f7925947c211 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFilter.java @@ -23,6 +23,10 @@ public final class FusionSubTypeSeverityFilter { @JsonProperty(value = "filters") private List filters; + /** Creates an instance of FusionSubTypeSeverityFilter class. */ + public FusionSubTypeSeverityFilter() { + } + /** * Get the isSupported property: Determines whether this source subtype supports severity configuration or not. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java index 0892d2a463238..f1c43ed81d153 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionSubTypeSeverityFiltersItem.java @@ -23,6 +23,10 @@ public final class FusionSubTypeSeverityFiltersItem { @JsonProperty(value = "enabled", required = true) private boolean enabled; + /** Creates an instance of FusionSubTypeSeverityFiltersItem class. */ + public FusionSubTypeSeverityFiltersItem() { + } + /** * Get the severity property: The Severity for a given source subtype consumed in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java index 1f2111a56b48d..985a2b1a32ca5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSetting.java @@ -24,6 +24,10 @@ public final class FusionTemplateSourceSetting { @JsonProperty(value = "sourceSubTypes") private List sourceSubTypes; + /** Creates an instance of FusionTemplateSourceSetting class. */ + public FusionTemplateSourceSetting() { + } + /** * Get the sourceName property: The name of a source signal consumed in Fusion detection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java index 89bfdf241a525..ddbbf8b4bcc5b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSourceSubType.java @@ -29,6 +29,10 @@ public final class FusionTemplateSourceSubType { @JsonProperty(value = "severityFilter", required = true) private FusionTemplateSubTypeSeverityFilter severityFilter; + /** Creates an instance of FusionTemplateSourceSubType class. */ + public FusionTemplateSourceSubType() { + } + /** * Get the sourceSubTypeName property: The name of source subtype under a source signal consumed in Fusion * detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java index ef8388621d5ae..da2fa6c2ba1fe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/FusionTemplateSubTypeSeverityFilter.java @@ -23,6 +23,10 @@ public final class FusionTemplateSubTypeSeverityFilter { @JsonProperty(value = "severityFilters") private List severityFilters; + /** Creates an instance of FusionTemplateSubTypeSeverityFilter class. */ + public FusionTemplateSubTypeSeverityFilter() { + } + /** * Get the isSupported property: Determines whether severity configuration is supported for this source subtype * consumed in Fusion detection. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java index 675f38adbbe96..5f7e0a8e0b868 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GeoLocation.java @@ -56,6 +56,10 @@ public final class GeoLocation { @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) private String state; + /** Creates an instance of GeoLocation class. */ + public GeoLocation() { + } + /** * Get the asn property: Autonomous System Number. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java index cc444f69cd21e..68a5c001b06e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetInsightsError.java @@ -13,6 +13,15 @@ public final class GetInsightsError extends ExpandableStringEnum errors; + /** Creates an instance of GetInsightsResultsMetadata class. */ + public GetInsightsResultsMetadata() { + } + /** * Get the totalCount property: the total items found for the insights request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java new file mode 100644 index 0000000000000..1d7f635c9a558 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetRecommendations.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of GetRecommendations. */ +public interface GetRecommendations { + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations along with {@link Response}. + */ + Response listWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a list of all recommendations. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of all recommendations. + */ + RecommendationList list(String resourceGroupName, String workspaceName); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java new file mode 100644 index 0000000000000..59fc55dba4639 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GetTriggeredAnalyticsRuleRuns.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of GetTriggeredAnalyticsRuleRuns. */ +public interface GetTriggeredAnalyticsRuleRuns { + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets the triggered analytics rule runs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule runs as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java new file mode 100644 index 0000000000000..39e36a2d4bf2b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Gets.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.UUID; + +/** Resource collection API of Gets. */ +public interface Gets { + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id along with {@link Response}. + */ + Response singleRecommendationWithResponse( + String resourceGroupName, String workspaceName, UUID recommendationId, Context context); + + /** + * Gets a recommendation by its id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a recommendation by its id. + */ + Recommendation singleRecommendation(String resourceGroupName, String workspaceName, UUID recommendationId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java index 07ee2d932d262..f3f8fe110c3db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GitHubResourceInfo.java @@ -16,6 +16,10 @@ public final class GitHubResourceInfo { @JsonProperty(value = "appInstallationId") private String appInstallationId; + /** Creates an instance of GitHubResourceInfo class. */ + public GitHubResourceInfo() { + } + /** * Get the appInstallationId property: GitHub application installation id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java index a0f7e3b56450f..5085def4d731a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GraphQueries.java @@ -28,6 +28,10 @@ public class GraphQueries { @JsonProperty(value = "baseQuery") private String baseQuery; + /** Creates an instance of GraphQueries class. */ + public GraphQueries() { + } + /** * Get the metricName property: the metric that the query is checking. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java index c6a5e97fd9ca9..4bdfe6f016886 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/GroupingConfiguration.java @@ -58,6 +58,10 @@ public final class GroupingConfiguration { @JsonProperty(value = "groupByCustomDetails") private List groupByCustomDetails; + /** Creates an instance of GroupingConfiguration class. */ + public GroupingConfiguration() { + } + /** * Get the enabled property: Grouping enabled. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java index 08e75c45b2b33..7c681299dd38e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HostEntity.java @@ -23,6 +23,10 @@ public final class HostEntity extends EntityInner { @JsonProperty(value = "properties") private HostEntityProperties innerProperties; + /** Creates an instance of HostEntity class. */ + public HostEntity() { + } + /** * Get the innerProperties property: Host entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java index 3ea294c0b3b58..33239610c7970 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/HuntingBookmark.java @@ -25,6 +25,10 @@ public final class HuntingBookmark extends EntityInner { @JsonProperty(value = "properties") private HuntingBookmarkProperties innerProperties; + /** Creates an instance of HuntingBookmark class. */ + public HuntingBookmark() { + } + /** * Get the innerProperties property: HuntingBookmark entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java index 2d051e853f0fc..593614b66e684 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incident.java @@ -50,67 +50,60 @@ public interface Incident { SystemData systemData(); /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. + * Gets the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - IncidentClassification classification(); + String title(); /** - * Gets the classificationComment property: Describes the reason the incident was closed. + * Gets the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - String classificationComment(); + String description(); /** - * Gets the classificationReason property: The classification reason the incident was closed with. + * Gets the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - IncidentClassificationReason classificationReason(); + IncidentSeverity severity(); /** - * Gets the createdTimeUtc property: The time the incident was created. + * Gets the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - OffsetDateTime createdTimeUtc(); + IncidentStatus status(); /** - * Gets the description property: The description of the incident. + * Gets the classification property: The reason the incident was closed. * - * @return the description value. + * @return the classification value. */ - String description(); + IncidentClassification classification(); /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. + * Gets the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - OffsetDateTime firstActivityTimeUtc(); + IncidentClassificationReason classificationReason(); /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. + * Gets the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - String incidentUrl(); + String classificationComment(); /** - * Gets the incidentNumber property: A sequential number. + * Gets the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @return the owner value. */ - Integer incidentNumber(); + IncidentOwnerInfo owner(); /** * Gets the labels property: List of labels relevant to this incident. @@ -120,18 +113,11 @@ public interface Incident { List labels(); /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. + * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - String providerIncidentId(); + OffsetDateTime firstActivityTimeUtc(); /** * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. @@ -148,11 +134,25 @@ public interface Incident { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the owner property: Describes a user that the incident is assigned to. + * Gets the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - IncidentOwnerInfo owner(); + OffsetDateTime createdTimeUtc(); + + /** + * Gets the incidentNumber property: A sequential number. + * + * @return the incidentNumber value. + */ + Integer incidentNumber(); + + /** + * Gets the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + IncidentAdditionalData additionalData(); /** * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. @@ -162,32 +162,32 @@ public interface Incident { List relatedAnalyticRuleIds(); /** - * Gets the severity property: The severity of the incident. + * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - IncidentSeverity severity(); + String incidentUrl(); /** - * Gets the status property: The status of the incident. + * Gets the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @return the providerName value. */ - IncidentStatus status(); + String providerName(); /** - * Gets the teamInformation property: Describes a team for the incident. + * Gets the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the teamInformation value. + * @return the providerIncidentId value. */ - TeamInformation teamInformation(); + String providerIncidentId(); /** - * Gets the title property: The title of the incident. + * Gets the teamInformation property: Describes a team for the incident. * - * @return the title value. + * @return the teamInformation value. */ - String title(); + TeamInformation teamInformation(); /** * Gets the name of the resource group. @@ -229,20 +229,20 @@ interface WithParentResource { */ interface WithCreate extends DefinitionStages.WithEtag, + DefinitionStages.WithTitle, + DefinitionStages.WithDescription, + DefinitionStages.WithSeverity, + DefinitionStages.WithStatus, DefinitionStages.WithClassification, - DefinitionStages.WithClassificationComment, DefinitionStages.WithClassificationReason, - DefinitionStages.WithDescription, - DefinitionStages.WithFirstActivityTimeUtc, + DefinitionStages.WithClassificationComment, + DefinitionStages.WithOwner, DefinitionStages.WithLabels, + DefinitionStages.WithFirstActivityTimeUtc, + DefinitionStages.WithLastActivityTimeUtc, DefinitionStages.WithProviderName, DefinitionStages.WithProviderIncidentId, - DefinitionStages.WithLastActivityTimeUtc, - DefinitionStages.WithOwner, - DefinitionStages.WithSeverity, - DefinitionStages.WithStatus, - DefinitionStages.WithTeamInformation, - DefinitionStages.WithTitle { + DefinitionStages.WithTeamInformation { /** * Executes the create request. * @@ -268,25 +268,55 @@ interface WithEtag { */ WithCreate withEtag(String etag); } - /** The stage of the Incident definition allowing to specify classification. */ - interface WithClassification { + /** The stage of the Incident definition allowing to specify title. */ + interface WithTitle { /** - * Specifies the classification property: The reason the incident was closed. + * Specifies the title property: The title of the incident. * - * @param classification The reason the incident was closed. + * @param title The title of the incident. * @return the next definition stage. */ - WithCreate withClassification(IncidentClassification classification); + WithCreate withTitle(String title); } - /** The stage of the Incident definition allowing to specify classificationComment. */ - interface WithClassificationComment { + /** The stage of the Incident definition allowing to specify description. */ + interface WithDescription { /** - * Specifies the classificationComment property: Describes the reason the incident was closed. + * Specifies the description property: The description of the incident. * - * @param classificationComment Describes the reason the incident was closed. + * @param description The description of the incident. * @return the next definition stage. */ - WithCreate withClassificationComment(String classificationComment); + WithCreate withDescription(String description); + } + /** The stage of the Incident definition allowing to specify severity. */ + interface WithSeverity { + /** + * Specifies the severity property: The severity of the incident. + * + * @param severity The severity of the incident. + * @return the next definition stage. + */ + WithCreate withSeverity(IncidentSeverity severity); + } + /** The stage of the Incident definition allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status of the incident. + * + * @param status The status of the incident. + * @return the next definition stage. + */ + WithCreate withStatus(IncidentStatus status); + } + /** The stage of the Incident definition allowing to specify classification. */ + interface WithClassification { + /** + * Specifies the classification property: The reason the incident was closed. + * + * @param classification The reason the incident was closed. + * @return the next definition stage. + */ + WithCreate withClassification(IncidentClassification classification); } /** The stage of the Incident definition allowing to specify classificationReason. */ interface WithClassificationReason { @@ -298,25 +328,25 @@ interface WithClassificationReason { */ WithCreate withClassificationReason(IncidentClassificationReason classificationReason); } - /** The stage of the Incident definition allowing to specify description. */ - interface WithDescription { + /** The stage of the Incident definition allowing to specify classificationComment. */ + interface WithClassificationComment { /** - * Specifies the description property: The description of the incident. + * Specifies the classificationComment property: Describes the reason the incident was closed. * - * @param description The description of the incident. + * @param classificationComment Describes the reason the incident was closed. * @return the next definition stage. */ - WithCreate withDescription(String description); + WithCreate withClassificationComment(String classificationComment); } - /** The stage of the Incident definition allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { + /** The stage of the Incident definition allowing to specify owner. */ + interface WithOwner { /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. + * Specifies the owner property: Describes a user that the incident is assigned to. * - * @param firstActivityTimeUtc The time of the first activity in the incident. + * @param owner Describes a user that the incident is assigned to. * @return the next definition stage. */ - WithCreate withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); + WithCreate withOwner(IncidentOwnerInfo owner); } /** The stage of the Incident definition allowing to specify labels. */ interface WithLabels { @@ -328,25 +358,15 @@ 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 { + /** The stage of the Incident definition allowing to specify firstActivityTimeUtc. */ + interface WithFirstActivityTimeUtc { /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. + * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId The incident ID assigned by the incident provider. + * @param firstActivityTimeUtc The time of the first activity in the incident. * @return the next definition stage. */ - WithCreate withProviderIncidentId(String providerIncidentId); + WithCreate withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); } /** The stage of the Incident definition allowing to specify lastActivityTimeUtc. */ interface WithLastActivityTimeUtc { @@ -358,35 +378,25 @@ interface WithLastActivityTimeUtc { */ WithCreate withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); } - /** The stage of the Incident definition allowing to specify owner. */ - interface WithOwner { - /** - * Specifies the owner property: Describes a user that the incident is assigned to. - * - * @param owner Describes a user that the incident is assigned to. - * @return the next definition stage. - */ - WithCreate withOwner(IncidentOwnerInfo owner); - } - /** The stage of the Incident definition allowing to specify severity. */ - interface WithSeverity { + /** The stage of the Incident definition allowing to specify providerName. */ + interface WithProviderName { /** - * Specifies the severity property: The severity of the incident. + * Specifies the providerName property: The name of the source provider that generated the incident. * - * @param severity The severity of the incident. + * @param providerName The name of the source provider that generated the incident. * @return the next definition stage. */ - WithCreate withSeverity(IncidentSeverity severity); + WithCreate withProviderName(String providerName); } - /** The stage of the Incident definition allowing to specify status. */ - interface WithStatus { + /** The stage of the Incident definition allowing to specify providerIncidentId. */ + interface WithProviderIncidentId { /** - * Specifies the status property: The status of the incident. + * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. * - * @param status The status of the incident. + * @param providerIncidentId The incident ID assigned by the incident provider. * @return the next definition stage. */ - WithCreate withStatus(IncidentStatus status); + WithCreate withProviderIncidentId(String providerIncidentId); } /** The stage of the Incident definition allowing to specify teamInformation. */ interface WithTeamInformation { @@ -398,16 +408,6 @@ interface WithTeamInformation { */ WithCreate withTeamInformation(TeamInformationInner teamInformation); } - /** The stage of the Incident definition allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: The title of the incident. - * - * @param title The title of the incident. - * @return the next definition stage. - */ - WithCreate withTitle(String title); - } } /** * Begins update for the Incident resource. @@ -419,20 +419,20 @@ interface WithTitle { /** The template for Incident update. */ interface Update extends UpdateStages.WithEtag, + UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithSeverity, + UpdateStages.WithStatus, UpdateStages.WithClassification, - UpdateStages.WithClassificationComment, UpdateStages.WithClassificationReason, - UpdateStages.WithDescription, - UpdateStages.WithFirstActivityTimeUtc, + UpdateStages.WithClassificationComment, + UpdateStages.WithOwner, UpdateStages.WithLabels, + UpdateStages.WithFirstActivityTimeUtc, + UpdateStages.WithLastActivityTimeUtc, UpdateStages.WithProviderName, UpdateStages.WithProviderIncidentId, - UpdateStages.WithLastActivityTimeUtc, - UpdateStages.WithOwner, - UpdateStages.WithSeverity, - UpdateStages.WithStatus, - UpdateStages.WithTeamInformation, - UpdateStages.WithTitle { + UpdateStages.WithTeamInformation { /** * Executes the update request. * @@ -460,25 +460,55 @@ interface WithEtag { */ Update withEtag(String etag); } - /** The stage of the Incident update allowing to specify classification. */ - interface WithClassification { + /** The stage of the Incident update allowing to specify title. */ + interface WithTitle { /** - * Specifies the classification property: The reason the incident was closed. + * Specifies the title property: The title of the incident. * - * @param classification The reason the incident was closed. + * @param title The title of the incident. * @return the next definition stage. */ - Update withClassification(IncidentClassification classification); + Update withTitle(String title); } - /** The stage of the Incident update allowing to specify classificationComment. */ - interface WithClassificationComment { + /** The stage of the Incident update allowing to specify description. */ + interface WithDescription { /** - * Specifies the classificationComment property: Describes the reason the incident was closed. + * Specifies the description property: The description of the incident. * - * @param classificationComment Describes the reason the incident was closed. + * @param description The description of the incident. * @return the next definition stage. */ - Update withClassificationComment(String classificationComment); + Update withDescription(String description); + } + /** The stage of the Incident update allowing to specify severity. */ + interface WithSeverity { + /** + * Specifies the severity property: The severity of the incident. + * + * @param severity The severity of the incident. + * @return the next definition stage. + */ + Update withSeverity(IncidentSeverity severity); + } + /** The stage of the Incident update allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status of the incident. + * + * @param status The status of the incident. + * @return the next definition stage. + */ + Update withStatus(IncidentStatus status); + } + /** The stage of the Incident update allowing to specify classification. */ + interface WithClassification { + /** + * Specifies the classification property: The reason the incident was closed. + * + * @param classification The reason the incident was closed. + * @return the next definition stage. + */ + Update withClassification(IncidentClassification classification); } /** The stage of the Incident update allowing to specify classificationReason. */ interface WithClassificationReason { @@ -490,25 +520,25 @@ interface WithClassificationReason { */ Update withClassificationReason(IncidentClassificationReason classificationReason); } - /** The stage of the Incident update allowing to specify description. */ - interface WithDescription { + /** The stage of the Incident update allowing to specify classificationComment. */ + interface WithClassificationComment { /** - * Specifies the description property: The description of the incident. + * Specifies the classificationComment property: Describes the reason the incident was closed. * - * @param description The description of the incident. + * @param classificationComment Describes the reason the incident was closed. * @return the next definition stage. */ - Update withDescription(String description); + Update withClassificationComment(String classificationComment); } - /** The stage of the Incident update allowing to specify firstActivityTimeUtc. */ - interface WithFirstActivityTimeUtc { + /** The stage of the Incident update allowing to specify owner. */ + interface WithOwner { /** - * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. + * Specifies the owner property: Describes a user that the incident is assigned to. * - * @param firstActivityTimeUtc The time of the first activity in the incident. + * @param owner Describes a user that the incident is assigned to. * @return the next definition stage. */ - Update withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); + Update withOwner(IncidentOwnerInfo owner); } /** The stage of the Incident update allowing to specify labels. */ interface WithLabels { @@ -520,25 +550,15 @@ 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 { + /** The stage of the Incident update allowing to specify firstActivityTimeUtc. */ + interface WithFirstActivityTimeUtc { /** - * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. + * Specifies the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @param providerIncidentId The incident ID assigned by the incident provider. + * @param firstActivityTimeUtc The time of the first activity in the incident. * @return the next definition stage. */ - Update withProviderIncidentId(String providerIncidentId); + Update withFirstActivityTimeUtc(OffsetDateTime firstActivityTimeUtc); } /** The stage of the Incident update allowing to specify lastActivityTimeUtc. */ interface WithLastActivityTimeUtc { @@ -550,35 +570,25 @@ interface WithLastActivityTimeUtc { */ Update withLastActivityTimeUtc(OffsetDateTime lastActivityTimeUtc); } - /** The stage of the Incident update allowing to specify owner. */ - interface WithOwner { - /** - * Specifies the owner property: Describes a user that the incident is assigned to. - * - * @param owner Describes a user that the incident is assigned to. - * @return the next definition stage. - */ - Update withOwner(IncidentOwnerInfo owner); - } - /** The stage of the Incident update allowing to specify severity. */ - interface WithSeverity { + /** The stage of the Incident update allowing to specify providerName. */ + interface WithProviderName { /** - * Specifies the severity property: The severity of the incident. + * Specifies the providerName property: The name of the source provider that generated the incident. * - * @param severity The severity of the incident. + * @param providerName The name of the source provider that generated the incident. * @return the next definition stage. */ - Update withSeverity(IncidentSeverity severity); + Update withProviderName(String providerName); } - /** The stage of the Incident update allowing to specify status. */ - interface WithStatus { + /** The stage of the Incident update allowing to specify providerIncidentId. */ + interface WithProviderIncidentId { /** - * Specifies the status property: The status of the incident. + * Specifies the providerIncidentId property: The incident ID assigned by the incident provider. * - * @param status The status of the incident. + * @param providerIncidentId The incident ID assigned by the incident provider. * @return the next definition stage. */ - Update withStatus(IncidentStatus status); + Update withProviderIncidentId(String providerIncidentId); } /** The stage of the Incident update allowing to specify teamInformation. */ interface WithTeamInformation { @@ -590,16 +600,6 @@ interface WithTeamInformation { */ Update withTeamInformation(TeamInformationInner teamInformation); } - /** The stage of the Incident update allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: The title of the incident. - * - * @param title The title of the incident. - * @return the next definition stage. - */ - Update withTitle(String title); - } } /** * Refreshes the resource to sync with Azure. @@ -620,33 +620,24 @@ interface WithTitle { * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param teamProperties Team properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. + * @return describes team information along with {@link Response}. */ - TeamInformation createTeam(TeamProperties teamProperties); + Response createTeamWithResponse(TeamInformationInner teamProperties, Context context); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param teamProperties Team properties. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information along with {@link Response}. - */ - Response createTeamWithResponse(TeamProperties teamProperties, Context context); - - /** - * Gets all incident alerts. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return describes team information. */ - IncidentAlertList listAlerts(); + TeamInformation createTeam(TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -660,13 +651,13 @@ interface WithTitle { Response listAlertsWithResponse(Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all incident alerts. */ - IncidentBookmarkList listBookmarks(); + IncidentAlertList listAlerts(); /** * Gets all incident bookmarks. @@ -680,13 +671,13 @@ interface WithTitle { Response listBookmarksWithResponse(Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all incident bookmarks. */ - IncidentEntitiesResponse listEntities(); + IncidentBookmarkList listBookmarks(); /** * Gets all incident related entities. @@ -698,4 +689,13 @@ interface WithTitle { * @return all incident related entities along with {@link Response}. */ Response listEntitiesWithResponse(Context context); + + /** + * Gets all incident related entities. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident related entities. + */ + IncidentEntitiesResponse listEntities(); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java index f86ce54b9f24f..7313297d41e0b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentAdditionalData.java @@ -35,12 +35,6 @@ public final class IncidentAdditionalData { @JsonProperty(value = "alertProductNames", access = JsonProperty.Access.WRITE_ONLY) private List alertProductNames; - /* - * The provider incident url to the incident in Microsoft 365 Defender portal - */ - @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) - private String providerIncidentUrl; - /* * The tactics associated with incident */ @@ -48,11 +42,21 @@ public final class IncidentAdditionalData { private List tactics; /* - * The techniques associated with incident's tactics' + * The techniques associated with incident's tactics */ @JsonProperty(value = "techniques", access = JsonProperty.Access.WRITE_ONLY) private List techniques; + /* + * The provider incident url to the incident in Microsoft 365 Defender portal + */ + @JsonProperty(value = "providerIncidentUrl", access = JsonProperty.Access.WRITE_ONLY) + private String providerIncidentUrl; + + /** Creates an instance of IncidentAdditionalData class. */ + public IncidentAdditionalData() { + } + /** * Get the alertsCount property: The number of alerts in the incident. * @@ -89,15 +93,6 @@ public List alertProductNames() { return this.alertProductNames; } - /** - * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. - * - * @return the providerIncidentUrl value. - */ - public String providerIncidentUrl() { - return this.providerIncidentUrl; - } - /** * Get the tactics property: The tactics associated with incident. * @@ -108,7 +103,7 @@ public List tactics() { } /** - * Get the techniques property: The techniques associated with incident's tactics'. + * Get the techniques property: The techniques associated with incident's tactics. * * @return the techniques value. */ @@ -116,6 +111,15 @@ public List techniques() { return this.techniques; } + /** + * Get the providerIncidentUrl property: The provider incident url to the incident in Microsoft 365 Defender portal. + * + * @return the providerIncidentUrl value. + */ + public String providerIncidentUrl() { + return this.providerIncidentUrl; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java index 400aa8f0d0c49..37d377dcfef3a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentClassification.java @@ -22,6 +22,15 @@ public final class IncidentClassification extends ExpandableStringEnum value; - /** - * Get the nextLink property: URL to fetch the next set of comments. - * - * @return the nextLink value. + /* + * The nextLink property. */ - public String nextLink() { - return this.nextLink; + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of IncidentCommentList class. */ + public IncidentCommentList() { } /** - * Get the value property: Array of comments. + * Get the value property: The value property. * * @return the value value. */ @@ -44,7 +39,7 @@ public List value() { } /** - * Set the value property: Array of comments. + * Set the value property: The value property. * * @param value the value value to set. * @return the IncidentCommentList object itself. @@ -54,6 +49,15 @@ public IncidentCommentList withValue(List value) { return this; } + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java index 3e39bb7cd39ce..9844c3898eb24 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentComments.java @@ -58,12 +58,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment. + * @return an incident comment along with {@link Response}. */ - IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Gets an incident comment. @@ -72,14 +74,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident comment along with {@link Response}. + * @return an incident comment. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + IncidentComment get(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Delete the incident comment. @@ -88,11 +88,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); /** * Delete the incident comment. @@ -101,14 +104,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param incidentCommentId Incident comment ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId, Context context); + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentCommentId); /** * Gets an incident comment. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java index 3746be98a60ad..74a866d473bd2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentConfiguration.java @@ -22,6 +22,10 @@ public final class IncidentConfiguration { @JsonProperty(value = "groupingConfiguration") private GroupingConfiguration groupingConfiguration; + /** Creates an instance of IncidentConfiguration class. */ + public IncidentConfiguration() { + } + /** * Get the createIncident property: Create incidents from alerts triggered by this analytics rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java index f282c15e2c9d7..c2f99b31cd894 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentEntitiesResultsMetadata.java @@ -11,55 +11,59 @@ /** Information of a specific aggregation in the incident related entities result. */ @Fluent public final class IncidentEntitiesResultsMetadata { + /* + * The kind of the aggregated entity. + */ + @JsonProperty(value = "entityKind", required = true) + private EntityKind entityKind; + /* * Total number of aggregations of the given kind in the incident related entities result. */ @JsonProperty(value = "count", required = true) private int count; - /* - * The kind of the aggregated entity. - */ - @JsonProperty(value = "entityKind", required = true) - private EntityKind entityKind; + /** Creates an instance of IncidentEntitiesResultsMetadata class. */ + public IncidentEntitiesResultsMetadata() { + } /** - * Get the count property: Total number of aggregations of the given kind in the incident related entities result. + * Get the entityKind property: The kind of the aggregated entity. * - * @return the count value. + * @return the entityKind value. */ - public int count() { - return this.count; + public EntityKind entityKind() { + return this.entityKind; } /** - * Set the count property: Total number of aggregations of the given kind in the incident related entities result. + * Set the entityKind property: The kind of the aggregated entity. * - * @param count the count value to set. + * @param entityKind the entityKind value to set. * @return the IncidentEntitiesResultsMetadata object itself. */ - public IncidentEntitiesResultsMetadata withCount(int count) { - this.count = count; + public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { + this.entityKind = entityKind; return this; } /** - * Get the entityKind property: The kind of the aggregated entity. + * Get the count property: Total number of aggregations of the given kind in the incident related entities result. * - * @return the entityKind value. + * @return the count value. */ - public EntityKind entityKind() { - return this.entityKind; + public int count() { + return this.count; } /** - * Set the entityKind property: The kind of the aggregated entity. + * Set the count property: Total number of aggregations of the given kind in the incident related entities result. * - * @param entityKind the entityKind value to set. + * @param count the count value to set. * @return the IncidentEntitiesResultsMetadata object itself. */ - public IncidentEntitiesResultsMetadata withEntityKind(EntityKind entityKind) { - this.entityKind = entityKind; + public IncidentEntitiesResultsMetadata withCount(int count) { + this.count = count; return this; } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java index e8ee0d18e29b6..1dba990980615 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentInfo.java @@ -34,6 +34,10 @@ public final class IncidentInfo { @JsonProperty(value = "relationName") private String relationName; + /** Creates an instance of IncidentInfo class. */ + public IncidentInfo() { + } + /** * Get the incidentId property: Incident Id. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java index c24c4a8522eab..975a88bd59ca9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabel.java @@ -23,6 +23,10 @@ public final class IncidentLabel { @JsonProperty(value = "labelType", access = JsonProperty.Access.WRITE_ONLY) private IncidentLabelType labelType; + /** Creates an instance of IncidentLabel class. */ + public IncidentLabel() { + } + /** * Get the labelName property: The name of the label. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java index 19999e0261f65..1212669d63e97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentLabelType.java @@ -16,6 +16,15 @@ public final class IncidentLabelType extends ExpandableStringEnum value; - /** - * Get the nextLink property: URL to fetch the next set of incidents. - * - * @return the nextLink value. + /* + * URL to fetch the next set of incidents. */ - public String nextLink() { - return this.nextLink; + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of IncidentList class. */ + public IncidentList() { } /** - * Get the value property: Array of incidents. + * Get the value property: The value property. * * @return the value value. */ @@ -44,7 +39,7 @@ public List value() { } /** - * Set the value property: Array of incidents. + * Set the value property: The value property. * * @param value the value value to set. * @return the IncidentList object itself. @@ -54,6 +49,15 @@ public IncidentList withValue(List value) { return this; } + /** + * Get the nextLink property: URL to fetch the next set of incidents. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java index dee86cc228605..32b1f5991cfe6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentOwnerInfo.java @@ -41,6 +41,10 @@ public final class IncidentOwnerInfo { @JsonProperty(value = "ownerType") private OwnerType ownerType; + /** Creates an instance of IncidentOwnerInfo class. */ + public IncidentOwnerInfo() { + } + /** * Get the email property: The email of the user the incident is assigned to. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java index 924ddce626e4f..c3943f31c05bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentProperties.java @@ -11,67 +11,60 @@ /** An immutable client-side representation of IncidentProperties. */ public interface IncidentProperties { /** - * Gets the additionalData property: Additional data on the incident. - * - * @return the additionalData value. - */ - IncidentAdditionalData additionalData(); - - /** - * Gets the classification property: The reason the incident was closed. + * Gets the title property: The title of the incident. * - * @return the classification value. + * @return the title value. */ - IncidentClassification classification(); + String title(); /** - * Gets the classificationComment property: Describes the reason the incident was closed. + * Gets the description property: The description of the incident. * - * @return the classificationComment value. + * @return the description value. */ - String classificationComment(); + String description(); /** - * Gets the classificationReason property: The classification reason the incident was closed with. + * Gets the severity property: The severity of the incident. * - * @return the classificationReason value. + * @return the severity value. */ - IncidentClassificationReason classificationReason(); + IncidentSeverity severity(); /** - * Gets the createdTimeUtc property: The time the incident was created. + * Gets the status property: The status of the incident. * - * @return the createdTimeUtc value. + * @return the status value. */ - OffsetDateTime createdTimeUtc(); + IncidentStatus status(); /** - * Gets the description property: The description of the incident. + * Gets the classification property: The reason the incident was closed. * - * @return the description value. + * @return the classification value. */ - String description(); + IncidentClassification classification(); /** - * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. + * Gets the classificationReason property: The classification reason the incident was closed with. * - * @return the firstActivityTimeUtc value. + * @return the classificationReason value. */ - OffsetDateTime firstActivityTimeUtc(); + IncidentClassificationReason classificationReason(); /** - * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. + * Gets the classificationComment property: Describes the reason the incident was closed. * - * @return the incidentUrl value. + * @return the classificationComment value. */ - String incidentUrl(); + String classificationComment(); /** - * Gets the incidentNumber property: A sequential number. + * Gets the owner property: Describes a user that the incident is assigned to. * - * @return the incidentNumber value. + * @return the owner value. */ - Integer incidentNumber(); + IncidentOwnerInfo owner(); /** * Gets the labels property: List of labels relevant to this incident. @@ -81,18 +74,11 @@ public interface IncidentProperties { List labels(); /** - * Gets the providerName property: The name of the source provider that generated the incident. - * - * @return the providerName value. - */ - String providerName(); - - /** - * Gets the providerIncidentId property: The incident ID assigned by the incident provider. + * Gets the firstActivityTimeUtc property: The time of the first activity in the incident. * - * @return the providerIncidentId value. + * @return the firstActivityTimeUtc value. */ - String providerIncidentId(); + OffsetDateTime firstActivityTimeUtc(); /** * Gets the lastActivityTimeUtc property: The time of the last activity in the incident. @@ -109,11 +95,25 @@ public interface IncidentProperties { OffsetDateTime lastModifiedTimeUtc(); /** - * Gets the owner property: Describes a user that the incident is assigned to. + * Gets the createdTimeUtc property: The time the incident was created. * - * @return the owner value. + * @return the createdTimeUtc value. */ - IncidentOwnerInfo owner(); + OffsetDateTime createdTimeUtc(); + + /** + * Gets the incidentNumber property: A sequential number. + * + * @return the incidentNumber value. + */ + Integer incidentNumber(); + + /** + * Gets the additionalData property: Additional data on the incident. + * + * @return the additionalData value. + */ + IncidentAdditionalData additionalData(); /** * Gets the relatedAnalyticRuleIds property: List of resource ids of Analytic rules related to the incident. @@ -123,32 +123,32 @@ public interface IncidentProperties { List relatedAnalyticRuleIds(); /** - * Gets the severity property: The severity of the incident. + * Gets the incidentUrl property: The deep-link url to the incident in Azure portal. * - * @return the severity value. + * @return the incidentUrl value. */ - IncidentSeverity severity(); + String incidentUrl(); /** - * Gets the status property: The status of the incident. + * Gets the providerName property: The name of the source provider that generated the incident. * - * @return the status value. + * @return the providerName value. */ - IncidentStatus status(); + String providerName(); /** - * Gets the teamInformation property: Describes a team for the incident. + * Gets the providerIncidentId property: The incident ID assigned by the incident provider. * - * @return the teamInformation value. + * @return the providerIncidentId value. */ - TeamInformation teamInformation(); + String providerIncidentId(); /** - * Gets the title property: The title of the incident. + * Gets the teamInformation property: Describes a team for the incident. * - * @return the title value. + * @return the teamInformation value. */ - String title(); + TeamInformation teamInformation(); /** * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentPropertiesInner object. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java index 0278075d0b460..7680e876e1834 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentPropertiesAction.java @@ -53,6 +53,10 @@ public final class IncidentPropertiesAction { @JsonProperty(value = "labels") private List labels; + /** Creates an instance of IncidentPropertiesAction class. */ + public IncidentPropertiesAction() { + } + /** * Get the severity property: The severity of the incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java index 078c2fce6eb80..dbf09abdbe1bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentRelations.java @@ -52,20 +52,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident relation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @param relationName Relation Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident relation. - */ - Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); - /** * Gets an incident relation. * @@ -83,20 +69,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); /** - * Creates or updates the incident relation. + * Gets an incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. - * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a relation between two resources. + * @return an incident relation. */ - Relation createOrUpdate( - String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); + Relation get(String resourceGroupName, String workspaceName, String incidentId, String relationName); /** * Creates or updates the incident relation. @@ -121,17 +105,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete the incident relation. + * Creates or updates the incident relation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. * @param relationName Relation Name. + * @param relation The relation model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a relation between two resources. */ - void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); + Relation createOrUpdate( + String resourceGroupName, String workspaceName, String incidentId, String relationName, RelationInner relation); /** * Delete the incident relation. @@ -148,4 +135,17 @@ Response createOrUpdateWithResponse( */ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, String relationName, Context context); + + /** + * Delete the incident relation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param relationName Relation Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String incidentId, String relationName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java index 4be03522b9c58..c55bda3bdadad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentSeverity.java @@ -22,6 +22,15 @@ public final class IncidentSeverity extends ExpandableStringEnum { /** Static value Closed for IncidentStatus. */ public static final IncidentStatus CLOSED = fromString("Closed"); + /** + * Creates a new instance of IncidentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentStatus() { + } + /** * Creates or finds a IncidentStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java new file mode 100644 index 0000000000000..ea9dac71b6ce5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTask.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of IncidentTask. */ +public interface IncidentTask { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the title property: The title of the task. + * + * @return the title value. + */ + String title(); + + /** + * Gets the description property: The description of the task. + * + * @return the description value. + */ + String description(); + + /** + * Gets the status property: The status property. + * + * @return the status value. + */ + IncidentTaskStatus status(); + + /** + * Gets the createdTimeUtc property: The time the task was created. + * + * @return the createdTimeUtc value. + */ + OffsetDateTime createdTimeUtc(); + + /** + * Gets the lastModifiedTimeUtc property: The last time the task was updated. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the createdBy property: Information on the client (user or application) that made some action. + * + * @return the createdBy value. + */ + ClientInfo createdBy(); + + /** + * Gets the lastModifiedBy property: Information on the client (user or application) that made some action. + * + * @return the lastModifiedBy value. + */ + ClientInfo lastModifiedBy(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner object. + * + * @return the inner object. + */ + IncidentTaskInner innerModel(); + + /** The entirety of the IncidentTask definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithTitle, + DefinitionStages.WithStatus, + DefinitionStages.WithCreate { + } + /** The IncidentTask definition stages. */ + interface DefinitionStages { + /** The first stage of the IncidentTask definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the IncidentTask definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, incidentId. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @return the next definition stage. + */ + WithTitle withExistingIncident(String resourceGroupName, String workspaceName, String incidentId); + } + /** The stage of the IncidentTask definition allowing to specify title. */ + interface WithTitle { + /** + * Specifies the title property: The title of the task. + * + * @param title The title of the task. + * @return the next definition stage. + */ + WithStatus withTitle(String title); + } + /** The stage of the IncidentTask definition allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status property.. + * + * @param status The status property. + * @return the next definition stage. + */ + WithCreate withStatus(IncidentTaskStatus status); + } + /** + * The stage of the IncidentTask definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithEtag, + DefinitionStages.WithDescription, + DefinitionStages.WithCreatedBy, + DefinitionStages.WithLastModifiedBy { + /** + * Executes the create request. + * + * @return the created resource. + */ + IncidentTask create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + IncidentTask create(Context context); + } + /** The stage of the IncidentTask definition allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: Etag of the azure resource. + * + * @param etag Etag of the azure resource. + * @return the next definition stage. + */ + WithCreate withEtag(String etag); + } + /** The stage of the IncidentTask definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the task. + * + * @param description The description of the task. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the IncidentTask definition allowing to specify createdBy. */ + interface WithCreatedBy { + /** + * Specifies the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + WithCreate withCreatedBy(ClientInfo createdBy); + } + /** The stage of the IncidentTask definition allowing to specify lastModifiedBy. */ + interface WithLastModifiedBy { + /** + * Specifies the lastModifiedBy property: Information on the client (user or application) that made some + * action. + * + * @param lastModifiedBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + WithCreate withLastModifiedBy(ClientInfo lastModifiedBy); + } + } + /** + * Begins update for the IncidentTask resource. + * + * @return the stage of resource update. + */ + IncidentTask.Update update(); + + /** The template for IncidentTask update. */ + interface Update + extends UpdateStages.WithEtag, + UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithStatus, + UpdateStages.WithCreatedBy, + UpdateStages.WithLastModifiedBy { + /** + * Executes the update request. + * + * @return the updated resource. + */ + IncidentTask apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + IncidentTask apply(Context context); + } + /** The IncidentTask update stages. */ + interface UpdateStages { + /** The stage of the IncidentTask update allowing to specify etag. */ + interface WithEtag { + /** + * Specifies the etag property: Etag of the azure resource. + * + * @param etag Etag of the azure resource. + * @return the next definition stage. + */ + Update withEtag(String etag); + } + /** The stage of the IncidentTask update allowing to specify title. */ + interface WithTitle { + /** + * Specifies the title property: The title of the task. + * + * @param title The title of the task. + * @return the next definition stage. + */ + Update withTitle(String title); + } + /** The stage of the IncidentTask update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: The description of the task. + * + * @param description The description of the task. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the IncidentTask update allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: The status property.. + * + * @param status The status property. + * @return the next definition stage. + */ + Update withStatus(IncidentTaskStatus status); + } + /** The stage of the IncidentTask update allowing to specify createdBy. */ + interface WithCreatedBy { + /** + * Specifies the createdBy property: Information on the client (user or application) that made some action. + * + * @param createdBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + Update withCreatedBy(ClientInfo createdBy); + } + /** The stage of the IncidentTask update allowing to specify lastModifiedBy. */ + interface WithLastModifiedBy { + /** + * Specifies the lastModifiedBy property: Information on the client (user or application) that made some + * action. + * + * @param lastModifiedBy Information on the client (user or application) that made some action. + * @return the next definition stage. + */ + Update withLastModifiedBy(ClientInfo lastModifiedBy); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + IncidentTask refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + IncidentTask refresh(Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java new file mode 100644 index 0000000000000..dfaf09e1b83af --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskList.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.IncidentTaskInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The IncidentTaskList model. */ +@Fluent +public final class IncidentTaskList { + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of IncidentTaskList class. */ + public IncidentTaskList() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the IncidentTaskList object itself. + */ + public IncidentTaskList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the IncidentTaskList object itself. + */ + public IncidentTaskList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java new file mode 100644 index 0000000000000..619131af1ab11 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTaskStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IncidentTaskStatus. */ +public final class IncidentTaskStatus extends ExpandableStringEnum { + /** Static value New for IncidentTaskStatus. */ + public static final IncidentTaskStatus NEW = fromString("New"); + + /** Static value Completed for IncidentTaskStatus. */ + public static final IncidentTaskStatus COMPLETED = fromString("Completed"); + + /** + * Creates a new instance of IncidentTaskStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentTaskStatus() { + } + + /** + * Creates or finds a IncidentTaskStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncidentTaskStatus. + */ + @JsonCreator + public static IncidentTaskStatus fromString(String name) { + return fromString(name, IncidentTaskStatus.class); + } + + /** + * Gets known IncidentTaskStatus values. + * + * @return known IncidentTaskStatus values. + */ + public static Collection values() { + return values(IncidentTaskStatus.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java new file mode 100644 index 0000000000000..130e861c0216e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IncidentTasks.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of IncidentTasks. */ +public interface IncidentTasks { + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String incidentId); + + /** + * Gets all incident tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident tasks as paginated response with {@link PagedIterable}. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String incidentId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Gets an incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task. + */ + IncidentTask get(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId, Context context); + + /** + * Delete the incident task. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @param incidentTaskId Incident task ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String incidentId, String incidentTaskId); + + /** + * Gets an incident task. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + IncidentTask getById(String id); + + /** + * Gets an incident task. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident task along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the incident task. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the incident task. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new IncidentTask resource. + * + * @param name resource name. + * @return the first stage of the new IncidentTask definition. + */ + IncidentTask.DefinitionStages.Blank define(String name); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java index 3a2710c7cad6e..4e3d4ce1e0dc8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Incidents.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Resource collection API of Incidents. */ public interface Incidents { @@ -16,12 +17,19 @@ public interface Incidents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. + * @param requestBody The requestBody parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. + * @return any object along with {@link Response}. */ - Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); + Response runPlaybookWithResponse( + String resourceGroupName, + String workspaceName, + String incidentIdentifier, + ManualTriggerRequestBody requestBody, + Context context); /** * Triggers playbook on a specific incident. @@ -29,19 +37,12 @@ public interface Incidents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentIdentifier The incidentIdentifier parameter. - * @param requestBody The requestBody parameter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. + * @return any object. */ - Response runPlaybookWithResponse( - String resourceGroupName, - String workspaceName, - String incidentIdentifier, - ManualTriggerRequestBody requestBody, - Context context); + Object runPlaybook(String resourceGroupName, String workspaceName, String incidentIdentifier); /** * Gets all incidents. @@ -81,19 +82,6 @@ PagedIterable list( String skipToken, Context context); - /** - * Gets an incident. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param incidentId Incident ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an incident. - */ - Incident get(String resourceGroupName, String workspaceName, String incidentId); - /** * Gets an incident. * @@ -110,7 +98,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Delete the incident. + * Gets an incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -118,8 +106,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an incident. */ - void delete(String resourceGroupName, String workspaceName, String incidentId); + Incident get(String resourceGroupName, String workspaceName, String incidentId); /** * Delete the incident. @@ -137,19 +126,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. + * Delete the incident. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. - * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes team information. */ - TeamInformation createTeam( - String resourceGroupName, String workspaceName, String incidentId, TeamProperties teamProperties); + void delete(String resourceGroupName, String workspaceName, String incidentId); /** * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. @@ -168,21 +154,23 @@ Response createTeamWithResponse( String resourceGroupName, String workspaceName, String incidentId, - TeamProperties teamProperties, + TeamInformationInner teamProperties, Context context); /** - * Gets all incident alerts. + * Creates a Microsoft team to investigate the incident by sharing information and insights between participants. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param incidentId Incident ID. + * @param teamProperties Team properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident alerts. + * @return describes team information. */ - IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); + TeamInformation createTeam( + String resourceGroupName, String workspaceName, String incidentId, TeamInformationInner teamProperties); /** * Gets all incident alerts. @@ -200,7 +188,7 @@ Response listAlertsWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident bookmarks. + * Gets all incident alerts. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -208,9 +196,9 @@ Response listAlertsWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident bookmarks. + * @return all incident alerts. */ - IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); + IncidentAlertList listAlerts(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident bookmarks. @@ -228,7 +216,7 @@ Response listBookmarksWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); /** - * Gets all incident related entities. + * Gets all incident bookmarks. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -236,9 +224,9 @@ Response listBookmarksWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all incident related entities. + * @return all incident bookmarks. */ - IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); + IncidentBookmarkList listBookmarks(String resourceGroupName, String workspaceName, String incidentId); /** * Gets all incident related entities. @@ -255,6 +243,19 @@ Response listBookmarksWithResponse( Response listEntitiesWithResponse( String resourceGroupName, String workspaceName, String incidentId, Context context); + /** + * Gets all incident related entities. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param incidentId Incident ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all incident related entities. + */ + IncidentEntitiesResponse listEntities(String resourceGroupName, String workspaceName, String incidentId); + /** * Gets an incident. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java index 7cb969486ee31..d4798afa8a05a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IngestionMode.java @@ -19,6 +19,15 @@ public final class IngestionMode extends ExpandableStringEnum { /** Static value Unspecified for IngestionMode. */ public static final IngestionMode UNSPECIFIED = fromString("Unspecified"); + /** + * Creates a new instance of IngestionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngestionMode() { + } + /** * Creates or finds a IngestionMode from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java index 0efb0bc5aff8b..0d7b8b0003925 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItem.java @@ -20,6 +20,10 @@ public final class InsightQueryItem extends EntityQueryItem { @JsonProperty(value = "properties") private InsightQueryItemProperties properties; + /** Creates an instance of InsightQueryItem class. */ + public InsightQueryItem() { + } + /** * Get the properties property: Properties bag for InsightQueryItem. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java index e69737b5e3c81..67b3aac548b5a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemProperties.java @@ -59,6 +59,10 @@ public final class InsightQueryItemProperties extends EntityQueryItemProperties @JsonProperty(value = "referenceTimeRange") private InsightQueryItemPropertiesReferenceTimeRange referenceTimeRange; + /** Creates an instance of InsightQueryItemProperties class. */ + public InsightQueryItemProperties() { + } + /** * Get the displayName property: The insight display name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java index c9877e7f9273b..85469c4c7e6d3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesAdditionalQuery.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesAdditionalQuery { @JsonProperty(value = "text") private String text; + /** Creates an instance of InsightQueryItemPropertiesAdditionalQuery class. */ + public InsightQueryItemPropertiesAdditionalQuery() { + } + /** * Get the query property: The insight query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java index f870634fb1997..6ca5ad9714ee5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesDefaultTimeRange.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesDefaultTimeRange { @JsonProperty(value = "afterRange") private String afterRange; + /** Creates an instance of InsightQueryItemPropertiesDefaultTimeRange class. */ + public InsightQueryItemPropertiesDefaultTimeRange() { + } + /** * Get the beforeRange property: The padding for the start time of the query. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java index 6dd0b8e28f15f..56b41fe1f3735 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesReferenceTimeRange.java @@ -16,6 +16,10 @@ public final class InsightQueryItemPropertiesReferenceTimeRange { @JsonProperty(value = "beforeRange") private String beforeRange; + /** Creates an instance of InsightQueryItemPropertiesReferenceTimeRange class. */ + public InsightQueryItemPropertiesReferenceTimeRange() { + } + /** * Get the beforeRange property: Additional query time for looking back. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java index 3c889abbed883..c6127abe667ac 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQuery.java @@ -23,6 +23,10 @@ public final class InsightQueryItemPropertiesTableQuery { @JsonProperty(value = "queriesDefinitions") private List queriesDefinitions; + /** Creates an instance of InsightQueryItemPropertiesTableQuery class. */ + public InsightQueryItemPropertiesTableQuery() { + } + /** * Get the columnsDefinitions property: List of insight column definitions. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java index f9428faa609ae..fded6773e09ba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.java @@ -28,6 +28,10 @@ public final class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem { @JsonProperty(value = "supportDeepLink") private Boolean supportDeepLink; + /** Creates an instance of InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem class. */ + public InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem() { + } + /** * Get the headerProperty property: Insight column header. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java index ea811b7bdc9a6..ed768336113e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.java @@ -35,6 +35,10 @@ public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem { @JsonProperty(value = "linkColumnsDefinitions") private List linkColumnsDefinitions; + /** Creates an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem class. */ + public InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem() { + } + /** * Get the filter property: Insight column header. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java index 626304571d5cb..aefca4653d86d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.java @@ -22,6 +22,10 @@ public final class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropert @JsonProperty(value = "Query") private String query; + /** Creates an instance of InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem class. */ + public InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem() { + } + /** * Get the projectedName property: Insight Link Definition Projected Name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java index 08c5f7cb09c25..18e8969e4cc1c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResult.java @@ -23,6 +23,10 @@ public final class InsightsTableResult { @JsonProperty(value = "rows") private List> rows; + /** Creates an instance of InsightsTableResult class. */ + public InsightsTableResult() { + } + /** * Get the columns property: Columns Metadata of the table. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java index 486e7914039cb..cf1bd2dc19726 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InsightsTableResultColumnsItem.java @@ -22,6 +22,10 @@ public final class InsightsTableResultColumnsItem { @JsonProperty(value = "name") private String name; + /** Creates an instance of InsightsTableResultColumnsItem class. */ + public InsightsTableResultColumnsItem() { + } + /** * Get the type property: the type of the colum. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java index 227c38863a55d..de9e6b7b83fe3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionSteps.java @@ -29,6 +29,10 @@ public class InstructionSteps { @JsonProperty(value = "instructions") private List instructions; + /** Creates an instance of InstructionSteps class. */ + public InstructionSteps() { + } + /** * Get the title property: Instruction step title. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java index 45cf764a6a76a..b30b0a0b303ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/InstructionStepsInstructionsItem.java @@ -9,6 +9,10 @@ /** The InstructionStepsInstructionsItem model. */ @Fluent public final class InstructionStepsInstructionsItem extends ConnectorInstructionModelBase { + /** Creates an instance of InstructionStepsInstructionsItem class. */ + public InstructionStepsInstructionsItem() { + } + /** {@inheritDoc} */ @Override public InstructionStepsInstructionsItem withParameters(Object parameters) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java new file mode 100644 index 0000000000000..e1837f424bcd6 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Instructions.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Instructions section of a recommendation. */ +@Fluent +public final class Instructions { + /* + * What actions should be taken to complete the recommendation. + */ + @JsonProperty(value = "actionsToBePerformed", required = true) + private String actionsToBePerformed; + + /* + * Explains why the recommendation is important. + */ + @JsonProperty(value = "recommendationImportance", required = true) + private String recommendationImportance; + + /* + * How should the user complete the recommendation. + */ + @JsonProperty(value = "howToPerformActionDetails") + private String howToPerformActionDetails; + + /** Creates an instance of Instructions class. */ + public Instructions() { + } + + /** + * Get the actionsToBePerformed property: What actions should be taken to complete the recommendation. + * + * @return the actionsToBePerformed value. + */ + public String actionsToBePerformed() { + return this.actionsToBePerformed; + } + + /** + * Set the actionsToBePerformed property: What actions should be taken to complete the recommendation. + * + * @param actionsToBePerformed the actionsToBePerformed value to set. + * @return the Instructions object itself. + */ + public Instructions withActionsToBePerformed(String actionsToBePerformed) { + this.actionsToBePerformed = actionsToBePerformed; + return this; + } + + /** + * Get the recommendationImportance property: Explains why the recommendation is important. + * + * @return the recommendationImportance value. + */ + public String recommendationImportance() { + return this.recommendationImportance; + } + + /** + * Set the recommendationImportance property: Explains why the recommendation is important. + * + * @param recommendationImportance the recommendationImportance value to set. + * @return the Instructions object itself. + */ + public Instructions withRecommendationImportance(String recommendationImportance) { + this.recommendationImportance = recommendationImportance; + return this; + } + + /** + * Get the howToPerformActionDetails property: How should the user complete the recommendation. + * + * @return the howToPerformActionDetails value. + */ + public String howToPerformActionDetails() { + return this.howToPerformActionDetails; + } + + /** + * Set the howToPerformActionDetails property: How should the user complete the recommendation. + * + * @param howToPerformActionDetails the howToPerformActionDetails value to set. + * @return the Instructions object itself. + */ + public Instructions withHowToPerformActionDetails(String howToPerformActionDetails) { + this.howToPerformActionDetails = howToPerformActionDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actionsToBePerformed() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property actionsToBePerformed in model Instructions")); + } + if (recommendationImportance() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property recommendationImportance in model Instructions")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Instructions.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java index cf5ebc9db245e..f1cfd8df136c5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTCheckRequirements.java @@ -21,6 +21,10 @@ public final class IoTCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private IoTCheckRequirementsProperties innerProperties; + /** Creates an instance of IoTCheckRequirements class. */ + public IoTCheckRequirements() { + } + /** * Get the innerProperties property: IoT requirements check properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java index 787fff5098c38..4e04dc30decd6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDataConnector.java @@ -22,6 +22,10 @@ public final class IoTDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private IoTDataConnectorProperties innerProperties; + /** Creates an instance of IoTDataConnector class. */ + public IoTDataConnector() { + } + /** * Get the innerProperties property: IoT data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java index 06ab4d1c051d5..b2251a5ea8bee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IoTDeviceEntity.java @@ -25,6 +25,10 @@ public final class IoTDeviceEntity extends EntityInner { @JsonProperty(value = "properties") private IoTDeviceEntityProperties innerProperties; + /** Creates an instance of IoTDeviceEntity class. */ + public IoTDeviceEntity() { + } + /** * Get the innerProperties property: IoTDevice entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java index beeac5a11a604..f0ec73678065e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.IpEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an ip entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Ip") -@Fluent +@Immutable public final class IpEntity extends EntityInner { /* * Ip entity properties @@ -24,6 +24,10 @@ public final class IpEntity extends EntityInner { @JsonProperty(value = "properties") private IpEntityProperties innerProperties; + /** Creates an instance of IpEntity class. */ + public IpEntity() { + } + /** * Get the innerProperties property: Ip entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java index c85e9c1ab3752..818b8e284d64a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/IpGeodatas.java @@ -14,23 +14,23 @@ public interface IpGeodatas { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address. + * @return geodata for a single IP address along with {@link Response}. */ - EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); + Response getWithResponse(String resourceGroupName, String ipAddress, Context context); /** * Get geodata for a single IP address. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ipAddress IP address (v4 or v6) to be enriched. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return geodata for a single IP address along with {@link Response}. + * @return geodata for a single IP address. */ - Response getWithResponse(String resourceGroupName, String ipAddress, Context context); + EnrichmentIpGeodata get(String resourceGroupName, String ipAddress); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java index ff0016d01c524..05524b81f56e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/KillChainIntent.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Holds the alert intent stage(s) mapping for this alert. */ +/** The intent of the alert. */ public final class KillChainIntent extends ExpandableStringEnum { /** Static value Unknown for KillChainIntent. */ public static final KillChainIntent UNKNOWN = fromString("Unknown"); @@ -52,6 +52,15 @@ public final class KillChainIntent extends ExpandableStringEnum /** Static value Impact for KillChainIntent. */ public static final KillChainIntent IMPACT = fromString("Impact"); + /** + * Creates a new instance of KillChainIntent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KillChainIntent() { + } + /** * Creates or finds a KillChainIntent from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java index b8879fab665fb..5af7072046190 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Kind.java @@ -61,6 +61,15 @@ public final class Kind extends ExpandableStringEnum { /** Static value AutomationRule for Kind. */ public static final Kind AUTOMATION_RULE = fromString("AutomationRule"); + /** + * Creates a new instance of Kind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Kind() { + } + /** * Creates or finds a Kind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java index ee71cb19cfb9d..eacd6e8811c16 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/LastDataReceivedDataType.java @@ -22,6 +22,10 @@ public class LastDataReceivedDataType { @JsonProperty(value = "lastDataReceivedQuery") private String lastDataReceivedQuery; + /** Creates an instance of LastDataReceivedDataType class. */ + public LastDataReceivedDataType() { + } + /** * Get the name property: Name of the data type to show in the graph. can be use with {{graphQueriesTableName}} * placeholder. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java index 9538371ea2c41..c41d1e9677dcc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRule.java @@ -24,6 +24,10 @@ public final class MLBehaviorAnalyticsAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private MLBehaviorAnalyticsAlertRuleProperties innerProperties; + /** Creates an instance of MLBehaviorAnalyticsAlertRule class. */ + public MLBehaviorAnalyticsAlertRule() { + } + /** * Get the innerProperties property: MLBehaviorAnalytics alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java index 3dc6cb43070cb..7ff8a9aae1423 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MLBehaviorAnalyticsAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class MLBehaviorAnalyticsAlertRuleTemplate extends AlertRuleTemplat @JsonProperty(value = "properties") private MLBehaviorAnalyticsAlertRuleTemplateProperties innerProperties; + /** Creates an instance of MLBehaviorAnalyticsAlertRuleTemplate class. */ + public MLBehaviorAnalyticsAlertRuleTemplate() { + } + /** * Get the innerProperties property: MLBehaviorAnalytics alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java index 1f8aeca643cc4..8107f98359e98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailClusterEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailClusterEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +17,7 @@ /** Represents a mail cluster entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("MailCluster") -@Fluent +@Immutable public final class MailClusterEntity extends EntityInner { /* * Mail cluster entity properties @@ -25,6 +25,10 @@ public final class MailClusterEntity extends EntityInner { @JsonProperty(value = "properties") private MailClusterEntityProperties innerProperties; + /** Creates an instance of MailClusterEntity class. */ + public MailClusterEntity() { + } + /** * Get the innerProperties property: Mail cluster entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java index 8d4c01ef2b891..ebd61789c75cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailMessageEntity.java @@ -26,6 +26,10 @@ public final class MailMessageEntity extends EntityInner { @JsonProperty(value = "properties") private MailMessageEntityProperties innerProperties; + /** Creates an instance of MailMessageEntity class. */ + public MailMessageEntity() { + } + /** * Get the innerProperties property: Mail message entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java index 9441ac626ef07..550d3d54eff7a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MailboxEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MailboxEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a mailbox entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Mailbox") -@Fluent +@Immutable public final class MailboxEntity extends EntityInner { /* * Mailbox entity properties @@ -24,6 +24,10 @@ public final class MailboxEntity extends EntityInner { @JsonProperty(value = "properties") private MailboxEntityProperties innerProperties; + /** Creates an instance of MailboxEntity class. */ + public MailboxEntity() { + } + /** * Get the innerProperties property: Mailbox entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java index efcd2bbb952b2..906b04dc6e984 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MalwareEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.MalwareEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a malware entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Malware") -@Fluent +@Immutable public final class MalwareEntity extends EntityInner { /* * File entity properties @@ -24,6 +24,10 @@ public final class MalwareEntity extends EntityInner { @JsonProperty(value = "properties") private MalwareEntityProperties innerProperties; + /** Creates an instance of MalwareEntity class. */ + public MalwareEntity() { + } + /** * Get the innerProperties property: File entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java index ab2433df85a50..1491f62fd9aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ManualTriggerRequestBody.java @@ -24,6 +24,10 @@ public final class ManualTriggerRequestBody { @JsonProperty(value = "logicAppsResourceId", required = true) private String logicAppsResourceId; + /** Creates an instance of ManualTriggerRequestBody class. */ + public ManualTriggerRequestBody() { + } + /** * Get the tenantId property: The tenantId property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java index 412bb642d81e4..760410892abc3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MatchingMethod.java @@ -22,6 +22,15 @@ public final class MatchingMethod extends ExpandableStringEnum { /** Static value Selected for MatchingMethod. */ public static final MatchingMethod SELECTED = fromString("Selected"); + /** + * Creates a new instance of MatchingMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MatchingMethod() { + } + /** * Creates or finds a MatchingMethod from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java index bf543c75aaafc..0834b040fb546 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasCheckRequirements.java @@ -21,6 +21,10 @@ public final class McasCheckRequirements extends DataConnectorsCheckRequirements @JsonProperty(value = "properties") private McasCheckRequirementsProperties innerProperties; + /** Creates an instance of McasCheckRequirements class. */ + public McasCheckRequirements() { + } + /** * Get the innerProperties property: MCAS (Microsoft Cloud App Security) requirements check properties. * @@ -30,6 +34,29 @@ private McasCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the McasCheckRequirements object itself. + */ + public McasCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new McasCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java index 4849da973db9a..b97aa53d6e97d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnector.java @@ -22,6 +22,10 @@ public final class McasDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private McasDataConnectorProperties innerProperties; + /** Creates an instance of McasDataConnector class. */ + public McasDataConnector() { + } + /** * Get the innerProperties property: MCAS (Microsoft Cloud App Security) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java index ced242cf519f6..47e45201f9aae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/McasDataConnectorDataTypes.java @@ -16,6 +16,10 @@ public final class McasDataConnectorDataTypes extends AlertsDataTypeOfDataConnec @JsonProperty(value = "discoveryLogs") private DataConnectorDataTypeCommon discoveryLogs; + /** Creates an instance of McasDataConnectorDataTypes class. */ + public McasDataConnectorDataTypes() { + } + /** * Get the discoveryLogs property: Discovery log data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java index 97b1be834a33a..ef6df0d8eba25 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpCheckRequirements.java @@ -21,6 +21,10 @@ public final class MdatpCheckRequirements extends DataConnectorsCheckRequirement @JsonProperty(value = "properties") private MdatpCheckRequirementsProperties innerProperties; + /** Creates an instance of MdatpCheckRequirements class. */ + public MdatpCheckRequirements() { + } + /** * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) requirements check * properties. @@ -31,6 +35,29 @@ private MdatpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MdatpCheckRequirements object itself. + */ + public MdatpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MdatpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java index be4c5abc500b7..6091da72918b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MdatpDataConnector.java @@ -22,6 +22,10 @@ public final class MdatpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private MdatpDataConnectorProperties innerProperties; + /** Creates an instance of MdatpDataConnector class. */ + public MdatpDataConnector() { + } + /** * Get the innerProperties property: MDATP (Microsoft Defender Advanced Threat Protection) data connector * properties. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java index 568297b27c579..8c6d3e99ebc05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataAuthor.java @@ -28,6 +28,10 @@ public final class MetadataAuthor { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataAuthor class. */ + public MetadataAuthor() { + } + /** * Get the name property: Name of the author. Company or person. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java index d2101c1cc1cf7..2a244bb3737d6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataCategories.java @@ -23,6 +23,10 @@ public final class MetadataCategories { @JsonProperty(value = "verticals") private List verticals; + /** Creates an instance of MetadataCategories class. */ + public MetadataCategories() { + } + /** * Get the domains property: domain for the solution content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java index 0fcabe6da5cd3..7559941194567 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataDependencies.java @@ -52,6 +52,10 @@ public final class MetadataDependencies { @JsonProperty(value = "criteria") private List criteria; + /** Creates an instance of MetadataDependencies class. */ + public MetadataDependencies() { + } + /** * Get the contentId property: Id of the content item we depend on. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/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/MetadataPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java index 7556f02585fb6..96b649e7e87a5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataPatch.java @@ -19,6 +19,10 @@ public final class MetadataPatch extends ResourceWithEtag { @JsonProperty(value = "properties") private MetadataPropertiesPatch innerProperties; + /** Creates an instance of MetadataPatch class. */ + public MetadataPatch() { + } + /** * Get the innerProperties property: Metadata patch request body. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java index 41a206a6dccf9..8c21deca2e754 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSource.java @@ -29,6 +29,10 @@ public final class MetadataSource { @JsonProperty(value = "sourceId") private String sourceId; + /** Creates an instance of MetadataSource class. */ + public MetadataSource() { + } + /** * Get the kind property: Source type of the content. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java index a25d51b568bed..a2d9a01d2b2df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataSupport.java @@ -35,6 +35,10 @@ public final class MetadataSupport { @JsonProperty(value = "link") private String link; + /** Creates an instance of MetadataSupport class. */ + public MetadataSupport() { + } + /** * Get the tier property: Type of support for content item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java index b8be150a2a19c..5640a663d54e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Metadatas.java @@ -53,12 +53,14 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata. + * @return a Metadata along with {@link Response}. */ - MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Get a Metadata. @@ -66,14 +68,12 @@ PagedIterable list( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Metadata along with {@link Response}. + * @return a Metadata. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + MetadataModel get(String resourceGroupName, String workspaceName, String metadataName); /** * Delete a Metadata. @@ -81,11 +81,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String metadataName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String metadataName, Context context); /** * Delete a Metadata. @@ -93,14 +96,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param metadataName The Metadata name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String metadataName, Context context); + void delete(String resourceGroupName, String workspaceName, String metadataName); /** * Get a Metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java new file mode 100644 index 0000000000000..b93c826f214ac --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionCheckRequirements.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftPurviewInformationProtectionCheckRequirementsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents MicrosoftPurviewInformationProtection requirements check request. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("MicrosoftPurviewInformationProtection") +@Fluent +public final class MicrosoftPurviewInformationProtectionCheckRequirements extends DataConnectorsCheckRequirements { + /* + * MicrosoftPurviewInformationProtection requirements check properties. + */ + @JsonProperty(value = "properties") + private MicrosoftPurviewInformationProtectionCheckRequirementsProperties innerProperties; + + /** Creates an instance of MicrosoftPurviewInformationProtectionCheckRequirements class. */ + public MicrosoftPurviewInformationProtectionCheckRequirements() { + } + + /** + * Get the innerProperties property: MicrosoftPurviewInformationProtection requirements check properties. + * + * @return the innerProperties value. + */ + private MicrosoftPurviewInformationProtectionCheckRequirementsProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MicrosoftPurviewInformationProtectionCheckRequirements object itself. + */ + public MicrosoftPurviewInformationProtectionCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java new file mode 100644 index 0000000000000..34b5d61afeacd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypes.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The available data types for Microsoft Purview Information Protection data connector. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionConnectorDataTypes { + /* + * Logs data type. + */ + @JsonProperty(value = "logs", required = true) + private MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs; + + /** Creates an instance of MicrosoftPurviewInformationProtectionConnectorDataTypes class. */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes() { + } + + /** + * Get the logs property: Logs data type. + * + * @return the logs value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs() { + return this.logs; + } + + /** + * Set the logs property: Logs data type. + * + * @param logs the logs value to set. + * @return the MicrosoftPurviewInformationProtectionConnectorDataTypes object itself. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes withLogs( + MicrosoftPurviewInformationProtectionConnectorDataTypesLogs logs) { + this.logs = logs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logs() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property logs in model" + + " MicrosoftPurviewInformationProtectionConnectorDataTypes")); + } else { + logs().validate(); + } + } + + private static final ClientLogger LOGGER = + new ClientLogger(MicrosoftPurviewInformationProtectionConnectorDataTypes.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java new file mode 100644 index 0000000000000..80a191731899a --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionConnectorDataTypesLogs.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; + +/** Logs data type. */ +@Fluent +public final class MicrosoftPurviewInformationProtectionConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of MicrosoftPurviewInformationProtectionConnectorDataTypesLogs class. */ + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() { + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionConnectorDataTypesLogs withState(DataTypeState state) { + super.withState(state); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java new file mode 100644 index 0000000000000..2c81e5461451d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftPurviewInformationProtectionDataConnector.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.securityinsights.fluent.models.DataConnectorInner; +import com.azure.resourcemanager.securityinsights.fluent.models.MicrosoftPurviewInformationProtectionDataConnectorProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Represents Microsoft Purview Information Protection data connector. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") +@JsonTypeName("MicrosoftPurviewInformationProtection") +@Fluent +public final class MicrosoftPurviewInformationProtectionDataConnector extends DataConnectorInner { + /* + * Microsoft Purview Information Protection data connector properties. + */ + @JsonProperty(value = "properties") + private MicrosoftPurviewInformationProtectionDataConnectorProperties innerProperties; + + /** Creates an instance of MicrosoftPurviewInformationProtectionDataConnector class. */ + public MicrosoftPurviewInformationProtectionDataConnector() { + } + + /** + * Get the innerProperties property: Microsoft Purview Information Protection data connector properties. + * + * @return the innerProperties value. + */ + private MicrosoftPurviewInformationProtectionDataConnectorProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MicrosoftPurviewInformationProtectionDataConnector withEtag(String etag) { + super.withEtag(etag); + return this; + } + + /** + * Get the dataTypes property: The available data types for the connector. + * + * @return the dataTypes value. + */ + public MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes() { + return this.innerProperties() == null ? null : this.innerProperties().dataTypes(); + } + + /** + * Set the dataTypes property: The available data types for the connector. + * + * @param dataTypes the dataTypes value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnector object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnector withDataTypes( + MicrosoftPurviewInformationProtectionConnectorDataTypes dataTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionDataConnectorProperties(); + } + this.innerProperties().withDataTypes(dataTypes); + return this; + } + + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the MicrosoftPurviewInformationProtectionDataConnector object itself. + */ + public MicrosoftPurviewInformationProtectionDataConnector withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new MicrosoftPurviewInformationProtectionDataConnectorProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java index 201a74e0f4e16..d72927a479667 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRule.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRule extends AlertRuleI @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRule class. */ + public MicrosoftSecurityIncidentCreationAlertRule() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java index 5a6e176fc2a3c..d76b0b58863bd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleCommonProperties.java @@ -36,6 +36,10 @@ public class MicrosoftSecurityIncidentCreationAlertRuleCommonProperties { @JsonProperty(value = "severitiesFilter") private List severitiesFilter; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleCommonProperties class. */ + public MicrosoftSecurityIncidentCreationAlertRuleCommonProperties() { + } + /** * Get the displayNamesFilter property: the alerts' displayNames on which the cases will be generated. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java index d908982016d7a..356b3a7e049b4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class MicrosoftSecurityIncidentCreationAlertRuleTemplate extends Al @JsonProperty(value = "properties") private MicrosoftSecurityIncidentCreationAlertRuleTemplateProperties innerProperties; + /** Creates an instance of MicrosoftSecurityIncidentCreationAlertRuleTemplate class. */ + public MicrosoftSecurityIncidentCreationAlertRuleTemplate() { + } + /** * Get the innerProperties property: MicrosoftSecurityIncidentCreation rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java index d6958d5cf48af..6fb7b4a767429 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MicrosoftSecurityProductName.java @@ -37,6 +37,15 @@ public final class MicrosoftSecurityProductName extends ExpandableStringEnum alerts; + + /** Creates an instance of MtpFilteredProviders class. */ + public MtpFilteredProviders() { + } + + /** + * Get the alerts property: Alerts filtered providers. When filters are not applied, all alerts will stream through + * the MTP pipeline, still in private preview for all products EXCEPT MDA and MDI, which are in GA state. + * + * @return the alerts value. + */ + public List alerts() { + return this.alerts; + } + + /** + * Set the alerts property: Alerts filtered providers. When filters are not applied, all alerts will stream through + * the MTP pipeline, still in private preview for all products EXCEPT MDA and MDI, which are in GA state. + * + * @param alerts the alerts value to set. + * @return the MtpFilteredProviders object itself. + */ + public MtpFilteredProviders withAlerts(List alerts) { + this.alerts = alerts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (alerts() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property alerts in model MtpFilteredProviders")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MtpFilteredProviders.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java new file mode 100644 index 0000000000000..314cb8f134e4b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MtpProvider.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The available data providers. */ +public final class MtpProvider extends ExpandableStringEnum { + /** Static value microsoftDefenderForCloudApps for MtpProvider. */ + public static final MtpProvider MICROSOFT_DEFENDER_FOR_CLOUD_APPS = fromString("microsoftDefenderForCloudApps"); + + /** Static value microsoftDefenderForIdentity for MtpProvider. */ + public static final MtpProvider MICROSOFT_DEFENDER_FOR_IDENTITY = fromString("microsoftDefenderForIdentity"); + + /** + * Creates a new instance of MtpProvider value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MtpProvider() { + } + + /** + * Creates or finds a MtpProvider from its string representation. + * + * @param name a name to look for. + * @return the corresponding MtpProvider. + */ + @JsonCreator + public static MtpProvider fromString(String name) { + return fromString(name, MtpProvider.class); + } + + /** + * Gets known MtpProvider values. + * + * @return known MtpProvider values. + */ + public static Collection values() { + return values(MtpProvider.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java index 26326e8ddb92f..8ff8953f2d423 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NicEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.NicEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents an network interface entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Nic") -@Fluent +@Immutable public final class NicEntity extends EntityInner { /* * Network interface entity properties @@ -24,6 +24,10 @@ public final class NicEntity extends EntityInner { @JsonProperty(value = "properties") private NicEntityProperties innerProperties; + /** Creates an instance of NicEntity class. */ + public NicEntity() { + } + /** * Get the innerProperties property: Network interface entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java index 7a23f7a2b182d..0ce0d60900d31 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRule.java @@ -26,6 +26,10 @@ public final class NrtAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private NrtAlertRuleProperties innerProperties; + /** Creates an instance of NrtAlertRule class. */ + public NrtAlertRule() { + } + /** * Get the innerProperties property: NRT alert rule properties. * @@ -427,6 +431,29 @@ public NrtAlertRule withEventGroupingSettings(EventGroupingSettings eventGroupin return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRule object itself. + */ + public NrtAlertRule withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java index 551cb9589235c..d28b91f789e56 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/NrtAlertRuleTemplate.java @@ -25,6 +25,10 @@ public final class NrtAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private NrtAlertRuleTemplateProperties innerProperties; + /** Creates an instance of NrtAlertRuleTemplate class. */ + public NrtAlertRuleTemplate() { + } + /** * Get the innerProperties property: NRT alert rule template properties. * @@ -197,6 +201,29 @@ public NrtAlertRuleTemplate withEventGroupingSettings(EventGroupingSettings even return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the NrtAlertRuleTemplate object itself. + */ + public NrtAlertRuleTemplate withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new NrtAlertRuleTemplateProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Get the tactics property: The tactics of the alert rule. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java index 8ed7cfef085ed..81feffa749c93 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectCheckRequirements.java @@ -21,6 +21,10 @@ public final class Office365ProjectCheckRequirements extends DataConnectorsCheck @JsonProperty(value = "properties") private Office365ProjectCheckRequirementsProperties innerProperties; + /** Creates an instance of Office365ProjectCheckRequirements class. */ + public Office365ProjectCheckRequirements() { + } + /** * Get the innerProperties property: Office365 Project requirements check properties. * @@ -30,6 +34,29 @@ private Office365ProjectCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the Office365ProjectCheckRequirements object itself. + */ + public Office365ProjectCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new Office365ProjectCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java index bafc9102b1dde..b709b2e023c42 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class Office365ProjectConnectorDataTypes { @JsonProperty(value = "logs", required = true) private Office365ProjectConnectorDataTypesLogs logs; + /** Creates an instance of Office365ProjectConnectorDataTypes class. */ + public Office365ProjectConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java index 80908337be80d..01d5bb97c7cae 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class Office365ProjectConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of Office365ProjectConnectorDataTypesLogs class. */ + public Office365ProjectConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public Office365ProjectConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java index 7665b6940195e..b1ca30836d378 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Office365ProjectDataConnector.java @@ -22,6 +22,10 @@ public final class Office365ProjectDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private Office365ProjectDataConnectorProperties innerProperties; + /** Creates an instance of Office365ProjectDataConnector class. */ + public Office365ProjectDataConnector() { + } + /** * Get the innerProperties property: Office Microsoft Project data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java index 25d2ff4c15b41..d19d990620455 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpCheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficeAtpCheckRequirements extends DataConnectorsCheckRequire @JsonProperty(value = "properties") private OfficeAtpCheckRequirementsProperties innerProperties; + /** Creates an instance of OfficeAtpCheckRequirements class. */ + public OfficeAtpCheckRequirements() { + } + /** * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) requirements check * properties. @@ -31,6 +35,29 @@ private OfficeAtpCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficeAtpCheckRequirements object itself. + */ + public OfficeAtpCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficeAtpCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java index 2a339d8590fd3..82aa15446f80e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeAtpDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeAtpDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeAtpDataConnectorProperties innerProperties; + /** Creates an instance of OfficeAtpDataConnector class. */ + public OfficeAtpDataConnector() { + } + /** * Get the innerProperties property: OfficeATP (Office 365 Advanced Threat Protection) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java index c82170f9180d6..8d5f713347d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsentList.java @@ -25,6 +25,10 @@ public final class OfficeConsentList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OfficeConsentList class. */ + public OfficeConsentList() { + } + /** * Get the nextLink property: URL to fetch the next set of office consents. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java index ed83191305b56..65662fbfa49fb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeConsents.java @@ -41,12 +41,14 @@ public interface OfficeConsents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent. + * @return an office365 consent along with {@link Response}. */ - OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Gets an office365 consent. @@ -54,14 +56,12 @@ public interface OfficeConsents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an office365 consent along with {@link Response}. + * @return an office365 consent. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + OfficeConsent get(String resourceGroupName, String workspaceName, String consentId); /** * Delete the office365 consent. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String consentId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String consentId, Context context); /** * Delete the office365 consent. @@ -81,12 +84,9 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param consentId consent ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String consentId, Context context); + void delete(String resourceGroupName, String workspaceName, String consentId); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java index 2fb508346db83..8eef8afb3c95e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeDataConnectorProperties innerProperties; + /** Creates an instance of OfficeDataConnector class. */ + public OfficeDataConnector() { + } + /** * Get the innerProperties property: Office data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java index f96e94afc7493..72327b88ce2e9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypes.java @@ -29,6 +29,10 @@ public final class OfficeDataConnectorDataTypes { @JsonProperty(value = "teams", required = true) private OfficeDataConnectorDataTypesTeams teams; + /** Creates an instance of OfficeDataConnectorDataTypes class. */ + public OfficeDataConnectorDataTypes() { + } + /** * Get the exchange property: Exchange data type connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java index f4bb9c178fe0d..d5115e8c9b482 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesExchange.java @@ -9,6 +9,10 @@ /** Exchange data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesExchange extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesExchange class. */ + public OfficeDataConnectorDataTypesExchange() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesExchange withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java index 85b62eaef4d0a..08ab9688e59a9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesSharePoint.java @@ -9,6 +9,10 @@ /** SharePoint data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesSharePoint extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesSharePoint class. */ + public OfficeDataConnectorDataTypesSharePoint() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesSharePoint withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java index a16d1b5ddc04a..1ff0e69de273e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeDataConnectorDataTypesTeams.java @@ -9,6 +9,10 @@ /** Teams data type connection. */ @Fluent public final class OfficeDataConnectorDataTypesTeams extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficeDataConnectorDataTypesTeams class. */ + public OfficeDataConnectorDataTypesTeams() { + } + /** {@inheritDoc} */ @Override public OfficeDataConnectorDataTypesTeams withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java index 0572876278d14..e912ce821e714 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmCheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficeIrmCheckRequirements extends DataConnectorsCheckRequire @JsonProperty(value = "properties") private OfficeIrmCheckRequirementsProperties innerProperties; + /** Creates an instance of OfficeIrmCheckRequirements class. */ + public OfficeIrmCheckRequirements() { + } + /** * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) requirements check properties. * @@ -30,6 +34,29 @@ private OfficeIrmCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficeIrmCheckRequirements object itself. + */ + public OfficeIrmCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficeIrmCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java index 0a26b9e454929..da67e7253f68f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficeIrmDataConnector.java @@ -22,6 +22,10 @@ public final class OfficeIrmDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficeIrmDataConnectorProperties innerProperties; + /** Creates an instance of OfficeIrmDataConnector class. */ + public OfficeIrmDataConnector() { + } + /** * Get the innerProperties property: OfficeIRM (Microsoft Insider Risk Management) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java index 8e52f4d91bb24..bf1ae4f33a068 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBICheckRequirements.java @@ -21,6 +21,10 @@ public final class OfficePowerBICheckRequirements extends DataConnectorsCheckReq @JsonProperty(value = "properties") private OfficePowerBICheckRequirementsProperties innerProperties; + /** Creates an instance of OfficePowerBICheckRequirements class. */ + public OfficePowerBICheckRequirements() { + } + /** * Get the innerProperties property: Office Power BI requirements check properties. * @@ -30,6 +34,29 @@ private OfficePowerBICheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the OfficePowerBICheckRequirements object itself. + */ + public OfficePowerBICheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new OfficePowerBICheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java index 42b1400cfcf47..b9df79b02be48 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class OfficePowerBIConnectorDataTypes { @JsonProperty(value = "logs", required = true) private OfficePowerBIConnectorDataTypesLogs logs; + /** Creates an instance of OfficePowerBIConnectorDataTypes class. */ + public OfficePowerBIConnectorDataTypes() { + } + /** * Get the logs property: Logs data type. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java index 0e71c0fd1cad8..a77690e1e4de0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIConnectorDataTypesLogs.java @@ -9,6 +9,10 @@ /** Logs data type. */ @Fluent public final class OfficePowerBIConnectorDataTypesLogs extends DataConnectorDataTypeCommon { + /** Creates an instance of OfficePowerBIConnectorDataTypesLogs class. */ + public OfficePowerBIConnectorDataTypesLogs() { + } + /** {@inheritDoc} */ @Override public OfficePowerBIConnectorDataTypesLogs withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java index 2c7496612394b..7ed1a962d32cf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OfficePowerBIDataConnector.java @@ -22,6 +22,10 @@ public final class OfficePowerBIDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private OfficePowerBIDataConnectorProperties innerProperties; + /** Creates an instance of OfficePowerBIDataConnector class. */ + public OfficePowerBIDataConnector() { + } + /** * Get the innerProperties property: Office Microsoft PowerBI data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java index 54967890e46e1..bad441db6f3b8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "resource") private String resource; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the description property: Description of the operation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java index 47df47f995193..c88eb98bd9440 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OperationsList.java @@ -25,6 +25,10 @@ public final class OperationsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of OperationsList class. */ + public OperationsList() { + } + /** * Get the nextLink property: URL to fetch the next set of operations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java index 77aafbf0cf2b5..5e030be941b83 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Operator.java @@ -16,6 +16,15 @@ public final class Operator extends ExpandableStringEnum { /** Static value OR for Operator. */ public static final Operator OR = fromString("OR"); + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + /** * Creates or finds a Operator from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java index 6fff096285297..be4c2d51e6075 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OutputType.java @@ -22,6 +22,15 @@ public final class OutputType extends ExpandableStringEnum { /** Static value Entity for OutputType. */ public static final OutputType ENTITY = fromString("Entity"); + /** + * Creates a new instance of OutputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutputType() { + } + /** * Creates or finds a OutputType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java index 8bb1280540329..82b98bb7dcacb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/OwnerType.java @@ -19,6 +19,15 @@ public final class OwnerType extends ExpandableStringEnum { /** Static value Group for OwnerType. */ public static final OwnerType GROUP = fromString("Group"); + /** + * Creates a new instance of OwnerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OwnerType() { + } + /** * Creates or finds a OwnerType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java index ba4232af432ec..9c89c601a2e31 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionProviderScope.java @@ -19,6 +19,15 @@ public final class PermissionProviderScope extends ExpandableStringEnum customs; + /** Creates an instance of Permissions class. */ + public Permissions() { + } + /** * Get the resourceProvider property: Resource provider permissions required for the connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java index 943909826a2e7..7baf23b26bb06 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsCustomsItem.java @@ -9,6 +9,10 @@ /** The PermissionsCustomsItem model. */ @Fluent public final class PermissionsCustomsItem extends Customs { + /** Creates an instance of PermissionsCustomsItem class. */ + public PermissionsCustomsItem() { + } + /** {@inheritDoc} */ @Override public PermissionsCustomsItem withName(String name) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java index d2db9072abc2f..8d49828e934eb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PermissionsResourceProviderItem.java @@ -9,6 +9,10 @@ /** The PermissionsResourceProviderItem model. */ @Fluent public final class PermissionsResourceProviderItem extends ResourceProvider { + /** Creates an instance of PermissionsResourceProviderItem class. */ + public PermissionsResourceProviderItem() { + } + /** {@inheritDoc} */ @Override public PermissionsResourceProviderItem withProvider(ProviderName provider) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PlaybookActionProperties.java index 9d85ffb7802b6..29995598bf923 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 @@ -23,6 +23,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. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java index e62fa3c417171..30bc1a24050e7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PollingFrequency.java @@ -19,6 +19,15 @@ public final class PollingFrequency extends ExpandableStringEnum { + /** Static value Low for Priority. */ + public static final Priority LOW = fromString("Low"); + + /** Static value Medium for Priority. */ + public static final Priority MEDIUM = fromString("Medium"); + + /** Static value High for Priority. */ + public static final Priority HIGH = fromString("High"); + + /** + * Creates a new instance of Priority value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Priority() { + } + + /** + * Creates or finds a Priority from its string representation. + * + * @param name a name to look for. + * @return the corresponding Priority. + */ + @JsonCreator + public static Priority fromString(String name) { + return fromString(name, Priority.class); + } + + /** + * Gets known Priority values. + * + * @return known Priority values. + */ + public static Collection values() { + return values(Priority.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java index 1d192d71c851c..e2c7225f4cb97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProcessEntity.java @@ -24,6 +24,10 @@ public final class ProcessEntity extends EntityInner { @JsonProperty(value = "properties") private ProcessEntityProperties innerProperties; + /** Creates an instance of ProcessEntity class. */ + public ProcessEntity() { + } + /** * Get the innerProperties property: Process entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java index ead1ce681b979..7dfdea9e34b37 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProductSettings.java @@ -10,18 +10,6 @@ /** Resource collection API of ProductSettings. */ public interface ProductSettings { - /** - * List of all the settings. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the settings. - */ - SettingList list(String resourceGroupName, String workspaceName); - /** * List of all the settings. * @@ -36,17 +24,16 @@ public interface ProductSettings { Response listWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * Gets a setting. + * List of all the settings. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a setting. + * @return list of all the settings. */ - Settings get(String resourceGroupName, String workspaceName, String settingsName); + SettingList list(String resourceGroupName, String workspaceName); /** * Gets a setting. @@ -64,7 +51,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String settingsName, Context context); /** - * Delete setting of the product. + * Gets a setting. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -72,8 +59,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a setting. */ - void delete(String resourceGroupName, String workspaceName, String settingsName); + Settings get(String resourceGroupName, String workspaceName, String settingsName); /** * Delete setting of the product. @@ -91,18 +79,16 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String settingsName, Context context); /** - * Updates setting. + * Delete setting of the product. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. - * @param settings The setting. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Setting. */ - Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); + void delete(String resourceGroupName, String workspaceName, String settingsName); /** * Updates setting. @@ -119,4 +105,18 @@ Response deleteWithResponse( */ Response updateWithResponse( String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings, Context context); + + /** + * Updates setting. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param settingsName The setting name. Supports - Anomalies, EyesOn, EntityAnalytics, Ueba. + * @param settings The setting. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Setting. + */ + Settings update(String resourceGroupName, String workspaceName, String settingsName, SettingsInner settings); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java index dc048782a94f5..be5d0f5368a51 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyArrayChangedConditionProperties extends AutomationRul @JsonProperty(value = "conditionProperties") private AutomationRulePropertyArrayChangedValuesCondition conditionProperties; + /** Creates an instance of PropertyArrayChangedConditionProperties class. */ + public PropertyArrayChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java index a508d41ec8736..61d9a767f8efd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyArrayConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyArrayConditionProperties extends AutomationRuleCondit @JsonProperty(value = "conditionProperties") private AutomationRulePropertyArrayValuesCondition conditionProperties; + /** Creates an instance of PropertyArrayConditionProperties class. */ + public PropertyArrayConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java index 22470af86a465..d0916572cfff9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyChangedConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyChangedConditionProperties extends AutomationRuleCond @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesChangedCondition conditionProperties; + /** Creates an instance of PropertyChangedConditionProperties class. */ + public PropertyChangedConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java index 7c641a0bca1ee..58c0036f081d9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/PropertyConditionProperties.java @@ -20,6 +20,10 @@ public final class PropertyConditionProperties extends AutomationRuleCondition { @JsonProperty(value = "conditionProperties") private AutomationRulePropertyValuesCondition conditionProperties; + /** Creates an instance of PropertyConditionProperties class. */ + public PropertyConditionProperties() { + } + /** * Get the conditionProperties property: The conditionProperties property. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java index a365b42e5c16b..0c462bd2c1774 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProviderName.java @@ -34,6 +34,15 @@ public final class ProviderName extends ExpandableStringEnum { public static final ProviderName MICROSOFT_AUTHORIZATION_POLICY_ASSIGNMENTS = fromString("Microsoft.Authorization/policyAssignments"); + /** + * Creates a new instance of ProviderName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProviderName() { + } + /** * Creates or finds a ProviderName from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java new file mode 100644 index 0000000000000..1afca7787242e --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The triggered analytics rule run provisioning state. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Accepted for ProvisioningState. */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** Static value InProgress for ProvisioningState. */ + public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java index e20070c785ad5..edd53dc5ea73e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/QueryBasedAlertRuleTemplateProperties.java @@ -56,6 +56,16 @@ public class QueryBasedAlertRuleTemplateProperties { @JsonProperty(value = "eventGroupingSettings") private EventGroupingSettings eventGroupingSettings; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of QueryBasedAlertRuleTemplateProperties class. */ + public QueryBasedAlertRuleTemplateProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -199,6 +209,27 @@ public QueryBasedAlertRuleTemplateProperties withEventGroupingSettings( return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the QueryBasedAlertRuleTemplateProperties object itself. + */ + public QueryBasedAlertRuleTemplateProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -214,5 +245,8 @@ public void validate() { if (eventGroupingSettings() != null) { eventGroupingSettings().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java new file mode 100644 index 0000000000000..21de0e099a0a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Recommendation.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** An immutable client-side representation of Recommendation. */ +public interface Recommendation { + /** + * Gets the id property: id of recommendation. + * + * @return the id value. + */ + UUID id(); + + /** + * Gets the instructions property: Instructions of the recommendation. + * + * @return the instructions value. + */ + Instructions instructions(); + + /** + * Gets the content property: Content of the recommendation. + * + * @return the content value. + */ + Content content(); + + /** + * Gets the resourceId property: Id of the resource this recommendation refers to. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the additionalProperties property: Collection of additional properties for the recommendation. + * + * @return the additionalProperties value. + */ + Map additionalProperties(); + + /** + * Gets the title property: Title of the recommendation. + * + * @return the title value. + */ + String title(); + + /** + * Gets the description property: Description of the recommendation. + * + * @return the description value. + */ + String description(); + + /** + * Gets the recommendationTypeTitle property: Title of the recommendation type. + * + * @return the recommendationTypeTitle value. + */ + String recommendationTypeTitle(); + + /** + * Gets the recommendationTypeId property: Id of the recommendation type. + * + * @return the recommendationTypeId value. + */ + String recommendationTypeId(); + + /** + * Gets the category property: Category of the recommendation. + * + * @return the category value. + */ + Category category(); + + /** + * Gets the context property: Context of the recommendation. + * + * @return the context value. + */ + Context context(); + + /** + * Gets the workspaceId property: Id of the workspace this recommendation refers to. + * + * @return the workspaceId value. + */ + UUID workspaceId(); + + /** + * Gets the actions property: List of actions to take for this recommendation. + * + * @return the actions value. + */ + List actions(); + + /** + * Gets the state property: State of the recommendation. + * + * @return the state value. + */ + State state(); + + /** + * Gets the priority property: Priority of the recommendation. + * + * @return the priority value. + */ + Priority priority(); + + /** + * Gets the lastEvaluatedTimeUtc property: The time stamp (UTC) when the recommendation was last evaluated. + * + * @return the lastEvaluatedTimeUtc value. + */ + OffsetDateTime lastEvaluatedTimeUtc(); + + /** + * Gets the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + OffsetDateTime hideUntilTimeUtc(); + + /** + * Gets the displayUntilTimeUtc property: The timestamp (UTC) after which the recommendation should not be displayed + * anymore. + * + * @return the displayUntilTimeUtc value. + */ + OffsetDateTime displayUntilTimeUtc(); + + /** + * Gets the visible property: Value indicating if the recommendation should be displayed or not. + * + * @return the visible value. + */ + Boolean visible(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RecommendationInner object. + * + * @return the inner object. + */ + RecommendationInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java new file mode 100644 index 0000000000000..93f95267bfd08 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationList.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner; +import java.util.List; + +/** An immutable client-side representation of RecommendationList. */ +public interface RecommendationList { + /** + * Gets the value property: An list of recommendations. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.RecommendationListInner object. + * + * @return the inner object. + */ + RecommendationListInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java new file mode 100644 index 0000000000000..3e61e91ba60f7 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendationPatch.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Recommendation Fields to update. */ +@Fluent +public final class RecommendationPatch { + /* + * State of the recommendation. + */ + @JsonProperty(value = "state") + private State state; + + /* + * The time stamp (UTC) when the recommendation should be displayed again. + */ + @JsonProperty(value = "hideUntilTimeUtc") + private OffsetDateTime hideUntilTimeUtc; + + /** Creates an instance of RecommendationPatch class. */ + public RecommendationPatch() { + } + + /** + * Get the state property: State of the recommendation. + * + * @return the state value. + */ + public State state() { + return this.state; + } + + /** + * Set the state property: State of the recommendation. + * + * @param state the state value to set. + * @return the RecommendationPatch object itself. + */ + public RecommendationPatch withState(State state) { + this.state = state; + return this; + } + + /** + * Get the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @return the hideUntilTimeUtc value. + */ + public OffsetDateTime hideUntilTimeUtc() { + return this.hideUntilTimeUtc; + } + + /** + * Set the hideUntilTimeUtc property: The time stamp (UTC) when the recommendation should be displayed again. + * + * @param hideUntilTimeUtc the hideUntilTimeUtc value to set. + * @return the RecommendationPatch object itself. + */ + public RecommendationPatch withHideUntilTimeUtc(OffsetDateTime hideUntilTimeUtc) { + this.hideUntilTimeUtc = hideUntilTimeUtc; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java new file mode 100644 index 0000000000000..065a7c219ae0b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RecommendedAction.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** What actions should be taken to complete the recommendation. */ +@Fluent +public final class RecommendedAction { + /* + * Text of the link to complete the action. + */ + @JsonProperty(value = "linkText", required = true) + private String linkText; + + /* + * The Link to complete the action. + */ + @JsonProperty(value = "linkUrl", required = true) + private String linkUrl; + + /* + * The state of the action. + */ + @JsonProperty(value = "state") + private Priority state; + + /** Creates an instance of RecommendedAction class. */ + public RecommendedAction() { + } + + /** + * Get the linkText property: Text of the link to complete the action. + * + * @return the linkText value. + */ + public String linkText() { + return this.linkText; + } + + /** + * Set the linkText property: Text of the link to complete the action. + * + * @param linkText the linkText value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withLinkText(String linkText) { + this.linkText = linkText; + return this; + } + + /** + * Get the linkUrl property: The Link to complete the action. + * + * @return the linkUrl value. + */ + public String linkUrl() { + return this.linkUrl; + } + + /** + * Set the linkUrl property: The Link to complete the action. + * + * @param linkUrl the linkUrl value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withLinkUrl(String linkUrl) { + this.linkUrl = linkUrl; + return this; + } + + /** + * Get the state property: The state of the action. + * + * @return the state value. + */ + public Priority state() { + return this.state; + } + + /** + * Set the state property: The state of the action. + * + * @param state the state value to set. + * @return the RecommendedAction object itself. + */ + public RecommendedAction withState(Priority state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linkText() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property linkText in model RecommendedAction")); + } + if (linkUrl() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property linkUrl in model RecommendedAction")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RecommendedAction.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java index 0b533e8cddbbb..37cb3be9e41f7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryHive.java @@ -40,6 +40,15 @@ public final class RegistryHive extends ExpandableStringEnum { /** Static value HKEY_CURRENT_USER for RegistryHive. */ public static final RegistryHive HKEY_CURRENT_USER = fromString("HKEY_CURRENT_USER"); + /** + * Creates a new instance of RegistryHive value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegistryHive() { + } + /** * Creates or finds a RegistryHive from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java index 116afd6feb604..a89770bdaa26b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryKeyEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryKeyEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a registry key entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryKey") -@Fluent +@Immutable public final class RegistryKeyEntity extends EntityInner { /* * RegistryKey entity properties @@ -23,6 +23,10 @@ public final class RegistryKeyEntity extends EntityInner { @JsonProperty(value = "properties") private RegistryKeyEntityProperties innerProperties; + /** Creates an instance of RegistryKeyEntity class. */ + public RegistryKeyEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java index 8121d653cb19d..4ac242b3b299b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.RegistryValueEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a registry value entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("RegistryValue") -@Fluent +@Immutable public final class RegistryValueEntity extends EntityInner { /* * RegistryKey entity properties @@ -23,6 +23,10 @@ public final class RegistryValueEntity extends EntityInner { @JsonProperty(value = "properties") private RegistryValueEntityProperties innerProperties; + /** Creates an instance of RegistryValueEntity class. */ + public RegistryValueEntity() { + } + /** * Get the innerProperties property: RegistryKey entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java index 7f214d1bf04f9..ca55b89110bad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RegistryValueKind.java @@ -37,6 +37,15 @@ public final class RegistryValueKind extends ExpandableStringEnum value; + /** Creates an instance of RelationList class. */ + public RelationList() { + } + /** * Get the nextLink property: URL to fetch the next set of relations. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java index 02aaa874b88de..87f9c940268ce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoList.java @@ -25,6 +25,10 @@ public final class RepoList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of RepoList class. */ + public RepoList() { + } + /** * Get the nextLink property: URL to fetch the next set of repositories. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java index dcb33e87b257f..78402e3cc10cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepoType.java @@ -16,6 +16,15 @@ public final class RepoType extends ExpandableStringEnum { /** Static value DevOps for RepoType. */ public static final RepoType DEV_OPS = fromString("DevOps"); + /** + * Creates a new instance of RepoType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RepoType() { + } + /** * Creates or finds a RepoType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java index 3e26879725a58..38e3c9a9d8c8e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Repository.java @@ -41,6 +41,10 @@ public final class Repository { @JsonProperty(value = "pathMapping") private List pathMapping; + /** Creates an instance of Repository class. */ + public Repository() { + } + /** * Get the url property: Url of repository. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java index 5e10c94993ffe..7b1c24757e918 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RepositoryResourceInfo.java @@ -28,6 +28,10 @@ public final class RepositoryResourceInfo { @JsonProperty(value = "azureDevOpsResourceInfo") private AzureDevOpsResourceInfo azureDevOpsResourceInfo; + /** Creates an instance of RepositoryResourceInfo class. */ + public RepositoryResourceInfo() { + } + /** * Get the webhook property: The webhook object created for the source-control. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java index 146d39665d202..c4bd2d0c0ac9f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/RequiredPermissions.java @@ -34,6 +34,10 @@ public final class RequiredPermissions { @JsonProperty(value = "delete") private Boolean delete; + /** Creates an instance of RequiredPermissions class. */ + public RequiredPermissions() { + } + /** * Get the action property: action permission. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java index 7024f46e5562d..faa24f5c78b97 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceProvider.java @@ -40,6 +40,10 @@ public class ResourceProvider { @JsonProperty(value = "requiredPermissions") private RequiredPermissions requiredPermissions; + /** Creates an instance of ResourceProvider class. */ + public ResourceProvider() { + } + /** * Get the provider property: Provider name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java index 6ed4515163c82..8d8a4234f62d5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ResourceWithEtag.java @@ -24,6 +24,10 @@ public class ResourceWithEtag extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of ResourceWithEtag class. */ + public ResourceWithEtag() { + } + /** * Get the etag property: Etag of the azure resource. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java index 21b538e67f101..9f5f260775fe4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SampleQueries.java @@ -22,6 +22,10 @@ public class SampleQueries { @JsonProperty(value = "query") private String query; + /** Creates an instance of SampleQueries class. */ + public SampleQueries() { + } + /** * Get the description property: The sample query description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java index 5d5575688e635..5debb8fd9a84c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRule.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private ScheduledAlertRuleProperties innerProperties; + /** Creates an instance of ScheduledAlertRule class. */ + public ScheduledAlertRule() { + } + /** * Get the innerProperties property: Scheduled alert rule properties. * @@ -519,6 +523,29 @@ public ScheduledAlertRule withAlertDetailsOverride(AlertDetailsOverride alertDet return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRule object itself. + */ + public ScheduledAlertRule withSentinelEntitiesMappings(List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java index 181410c28e15a..6f87af4aca6d2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleCommonProperties.java @@ -75,6 +75,16 @@ public class ScheduledAlertRuleCommonProperties { @JsonProperty(value = "alertDetailsOverride") private AlertDetailsOverride alertDetailsOverride; + /* + * Array of the sentinel entity mappings of the alert rule + */ + @JsonProperty(value = "sentinelEntitiesMappings") + private List sentinelEntitiesMappings; + + /** Creates an instance of ScheduledAlertRuleCommonProperties class. */ + public ScheduledAlertRuleCommonProperties() { + } + /** * Get the query property: The query that creates alerts for this rule. * @@ -275,6 +285,27 @@ public ScheduledAlertRuleCommonProperties withAlertDetailsOverride(AlertDetailsO return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.sentinelEntitiesMappings; + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleCommonProperties object itself. + */ + public ScheduledAlertRuleCommonProperties withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + this.sentinelEntitiesMappings = sentinelEntitiesMappings; + return this; + } + /** * Validates the instance. * @@ -290,5 +321,8 @@ public void validate() { if (alertDetailsOverride() != null) { alertDetailsOverride().validate(); } + if (sentinelEntitiesMappings() != null) { + sentinelEntitiesMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java index 143d98192d0da..166b63a356469 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ScheduledAlertRuleTemplate.java @@ -26,6 +26,10 @@ public final class ScheduledAlertRuleTemplate extends AlertRuleTemplateInner { @JsonProperty(value = "properties") private ScheduledAlertRuleTemplateProperties innerProperties; + /** Creates an instance of ScheduledAlertRuleTemplate class. */ + public ScheduledAlertRuleTemplate() { + } + /** * Get the innerProperties property: Scheduled alert rule template properties. * @@ -470,6 +474,30 @@ public ScheduledAlertRuleTemplate withAlertDetailsOverride(AlertDetailsOverride return this; } + /** + * Get the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @return the sentinelEntitiesMappings value. + */ + public List sentinelEntitiesMappings() { + return this.innerProperties() == null ? null : this.innerProperties().sentinelEntitiesMappings(); + } + + /** + * Set the sentinelEntitiesMappings property: Array of the sentinel entity mappings of the alert rule. + * + * @param sentinelEntitiesMappings the sentinelEntitiesMappings value to set. + * @return the ScheduledAlertRuleTemplate object itself. + */ + public ScheduledAlertRuleTemplate withSentinelEntitiesMappings( + List sentinelEntitiesMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new ScheduledAlertRuleTemplateProperties(); + } + this.innerProperties().withSentinelEntitiesMappings(sentinelEntitiesMappings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java index 3052a35d0c5c9..21f4fc0f0b0c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlert.java @@ -25,6 +25,10 @@ public final class SecurityAlert extends EntityInner { @JsonProperty(value = "properties") private SecurityAlertProperties innerProperties; + /** Creates an instance of SecurityAlert class. */ + public SecurityAlert() { + } + /** * Get the innerProperties property: SecurityAlert entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java index 3613253e952af..9ab3a972e6e6a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertPropertiesConfidenceReasonsItem.java @@ -22,6 +22,10 @@ public final class SecurityAlertPropertiesConfidenceReasonsItem { @JsonProperty(value = "reasonType", access = JsonProperty.Access.WRITE_ONLY) private String reasonType; + /** Creates an instance of SecurityAlertPropertiesConfidenceReasonsItem class. */ + public SecurityAlertPropertiesConfidenceReasonsItem() { + } + /** * Get the reason property: The reason's description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java index a34da5bbcc1a6..18476bc7bf7c9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityAlertTimelineItem.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.OffsetDateTime; +import java.util.List; /** Represents security alert timeline item. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @@ -70,6 +71,22 @@ public final class SecurityAlertTimelineItem extends EntityTimelineItem { @JsonProperty(value = "alertType", required = true) private String alertType; + /* + * The intent of the alert. + */ + @JsonProperty(value = "intent", access = JsonProperty.Access.WRITE_ONLY) + private KillChainIntent intent; + + /* + * The techniques of the alert. + */ + @JsonProperty(value = "techniques") + private List techniques; + + /** Creates an instance of SecurityAlertTimelineItem class. */ + public SecurityAlertTimelineItem() { + } + /** * Get the azureResourceId property: The alert azure resource id. * @@ -250,6 +267,35 @@ public SecurityAlertTimelineItem withAlertType(String alertType) { return this; } + /** + * Get the intent property: The intent of the alert. + * + * @return the intent value. + */ + public KillChainIntent intent() { + return this.intent; + } + + /** + * Get the techniques property: The techniques of the alert. + * + * @return the techniques value. + */ + public List techniques() { + return this.techniques; + } + + /** + * Set the techniques property: The techniques of the alert. + * + * @param techniques the techniques value to set. + * @return the SecurityAlertTimelineItem object itself. + */ + public SecurityAlertTimelineItem withTechniques(List techniques) { + this.techniques = techniques; + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java index 119f867b58eba..c934ef0402219 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityGroupEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SecurityGroupEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +16,7 @@ /** Represents a security group entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SecurityGroup") -@Fluent +@Immutable public final class SecurityGroupEntity extends EntityInner { /* * SecurityGroup entity properties @@ -24,6 +24,10 @@ public final class SecurityGroupEntity extends EntityInner { @JsonProperty(value = "properties") private SecurityGroupEntityProperties innerProperties; + /** Creates an instance of SecurityGroupEntity class. */ + public SecurityGroupEntity() { + } + /** * Get the innerProperties property: SecurityGroup entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java index eb9b7a727ef69..16f1f3a2a2ef2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettings.java @@ -42,12 +42,14 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings. + * @return the Security ML Analytics Settings along with {@link Response}. */ - SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Gets the Security ML Analytics Settings. @@ -55,14 +57,12 @@ public interface SecurityMLAnalyticsSettings { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Security ML Analytics Settings along with {@link Response}. + * @return the Security ML Analytics Settings. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + SecurityMLAnalyticsSetting get(String resourceGroupName, String workspaceName, String settingsResourceName); /** * Creates or updates the Security ML Analytics Settings. @@ -71,16 +71,18 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting. + * @return security ML Analytics Setting along with {@link Response}. */ - SecurityMLAnalyticsSetting createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, + Context context); /** * Creates or updates the Security ML Analytics Settings. @@ -89,18 +91,16 @@ SecurityMLAnalyticsSetting createOrUpdate( * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. * @param securityMLAnalyticsSetting The security ML Analytics setting. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return security ML Analytics Setting along with {@link Response}. + * @return security ML Analytics Setting. */ - Response createOrUpdateWithResponse( + SecurityMLAnalyticsSetting createOrUpdate( String resourceGroupName, String workspaceName, String settingsResourceName, - SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting, - Context context); + SecurityMLAnalyticsSettingInner securityMLAnalyticsSetting); /** * Delete the Security ML Analytics Settings. @@ -108,11 +108,14 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String settingsResourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String settingsResourceName, Context context); /** * Delete the Security ML Analytics Settings. @@ -120,12 +123,9 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param settingsResourceName Security ML Analytics Settings resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String settingsResourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String settingsResourceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java index 25eeab69e8b98..1f6989b762024 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsDataSource.java @@ -23,6 +23,10 @@ public final class SecurityMLAnalyticsSettingsDataSource { @JsonProperty(value = "dataTypes") private List dataTypes; + /** Creates an instance of SecurityMLAnalyticsSettingsDataSource class. */ + public SecurityMLAnalyticsSettingsDataSource() { + } + /** * Get the connectorId property: The connector id that provides the following data types. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java index 81074368d1146..4a893dec833a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsKind.java @@ -13,6 +13,15 @@ public final class SecurityMLAnalyticsSettingsKind extends ExpandableStringEnum< /** Static value Anomaly for SecurityMLAnalyticsSettingsKind. */ public static final SecurityMLAnalyticsSettingsKind ANOMALY = fromString("Anomaly"); + /** + * Creates a new instance of SecurityMLAnalyticsSettingsKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecurityMLAnalyticsSettingsKind() { + } + /** * Creates or finds a SecurityMLAnalyticsSettingsKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java index 8b72b6ba1ce9d..da720ca5591bf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SecurityMLAnalyticsSettingsList.java @@ -25,6 +25,10 @@ public final class SecurityMLAnalyticsSettingsList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SecurityMLAnalyticsSettingsList class. */ + public SecurityMLAnalyticsSettingsList() { + } + /** * Get the nextLink property: URL to fetch the next set of SecurityMLAnalyticsSettings. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java new file mode 100644 index 0000000000000..6185131fba800 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelEntityMapping.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A single sentinel entity mapping. */ +@Fluent +public final class SentinelEntityMapping { + /* + * the column name to be mapped to the SentinelEntities + */ + @JsonProperty(value = "columnName") + private String columnName; + + /** Creates an instance of SentinelEntityMapping class. */ + public SentinelEntityMapping() { + } + + /** + * Get the columnName property: the column name to be mapped to the SentinelEntities. + * + * @return the columnName value. + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the columnName property: the column name to be mapped to the SentinelEntities. + * + * @param columnName the columnName value to set. + * @return the SentinelEntityMapping object itself. + */ + public SentinelEntityMapping withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java index abcc5d92aa343..97d1d3a659b08 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SentinelOnboardingStates.java @@ -15,12 +15,14 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state. + * @return sentinel onboarding state along with {@link Response}. */ - SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Get Sentinel onboarding state. @@ -28,14 +30,12 @@ public interface SentinelOnboardingStates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sentinel onboarding state along with {@link Response}. + * @return sentinel onboarding state. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + SentinelOnboardingState get(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Delete Sentinel onboarding state. @@ -43,11 +43,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); /** * Delete Sentinel onboarding state. @@ -55,40 +58,37 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sentinelOnboardingStateName The Sentinel onboarding state name. Supports - default. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sentinelOnboardingStateName, Context context); + void delete(String resourceGroupName, String workspaceName, String sentinelOnboardingStateName); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states. + * @return all Sentinel onboarding states along with {@link Response}. */ - SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets all Sentinel onboarding states. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Sentinel onboarding states along with {@link Response}. + * @return all Sentinel onboarding states. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + SentinelOnboardingStatesList list(String resourceGroupName, String workspaceName); /** * Get Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java index 6ec2ac268c710..1b8478d489b8b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingKind.java @@ -22,6 +22,15 @@ public final class SettingKind extends ExpandableStringEnum { /** Static value Ueba for SettingKind. */ public static final SettingKind UEBA = fromString("Ueba"); + /** + * Creates a new instance of SettingKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingKind() { + } + /** * Creates or finds a SettingKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java index 94296a654ffb8..456e5b205918b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingType.java @@ -19,6 +19,15 @@ public final class SettingType extends ExpandableStringEnum { /** Static value InfoMessage for SettingType. */ public static final SettingType INFO_MESSAGE = fromString("InfoMessage"); + /** + * Creates a new instance of SettingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingType() { + } + /** * Creates or finds a SettingType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java index f9cb8e47afa61..be00c933f58d0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SettingsStatus.java @@ -16,6 +16,15 @@ public final class SettingsStatus extends ExpandableStringEnum { /** Static value Flighting for SettingsStatus. */ public static final SettingsStatus FLIGHTING = fromString("Flighting"); + /** + * Creates a new instance of SettingsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SettingsStatus() { + } + /** * Creates or finds a SettingsStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java index 8fa041261e9ab..e527e9d824cd8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlList.java @@ -25,6 +25,10 @@ public final class SourceControlList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SourceControlList class. */ + public SourceControlList() { + } + /** * Get the nextLink property: URL to fetch the next set of source controls. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java index d7301e3d70cc0..d01a07177d782 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceControlsOperations.java @@ -41,12 +41,14 @@ public interface SourceControlsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier. + * @return a source control byt its identifier along with {@link Response}. */ - SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** * Gets a source control byt its identifier. @@ -54,14 +56,12 @@ public interface SourceControlsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a source control byt its identifier along with {@link Response}. + * @return a source control byt its identifier. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); + SourceControl get(String resourceGroupName, String workspaceName, String sourceControlId); /** * Delete a source control. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String sourceControlId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String sourceControlId, Context context); /** * Delete a source control. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sourceControlId Source control Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String sourceControlId, Context context); + void delete(String resourceGroupName, String workspaceName, String sourceControlId); /** * Gets a source control byt its identifier. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java index 81b1a237ddf02..fe135dfaf18fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceKind.java @@ -22,6 +22,15 @@ public final class SourceKind extends ExpandableStringEnum { /** Static value SourceRepository for SourceKind. */ public static final SourceKind SOURCE_REPOSITORY = fromString("SourceRepository"); + /** + * Creates a new instance of SourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceKind() { + } + /** * Creates or finds a SourceKind from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java index b1e052ce22519..a1ee694bf57dd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SourceType.java @@ -16,6 +16,15 @@ public final class SourceType extends ExpandableStringEnum { /** Static value Remote storage for SourceType. */ public static final SourceType REMOTE_STORAGE = fromString("Remote storage"); + /** + * Creates a new instance of SourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceType() { + } + /** * Creates or finds a SourceType from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java new file mode 100644 index 0000000000000..05a882686bdb1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/State.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** State of recommendation. */ +public final class State extends ExpandableStringEnum { + /** Static value Active for State. */ + public static final State ACTIVE = fromString("Active"); + + /** Static value Disabled for State. */ + public static final State DISABLED = fromString("Disabled"); + + /** Static value CompletedByUser for State. */ + public static final State COMPLETED_BY_USER = fromString("CompletedByUser"); + + /** Static value CompletedByAction for State. */ + public static final State COMPLETED_BY_ACTION = fromString("CompletedByAction"); + + /** Static value Hidden for State. */ + public static final State HIDDEN = fromString("Hidden"); + + /** + * Creates a new instance of State value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public State() { + } + + /** + * Creates or finds a State from its string representation. + * + * @param name a name to look for. + * @return the corresponding State. + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * Gets known State values. + * + * @return known State values. + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java index e1aa218951eff..573224bc8aad8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SubmissionMailEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.SubmissionMailEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,7 +17,7 @@ /** Represents a submission mail entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("SubmissionMail") -@Fluent +@Immutable public final class SubmissionMailEntity extends EntityInner { /* * Submission mail entity properties @@ -25,6 +25,10 @@ public final class SubmissionMailEntity extends EntityInner { @JsonProperty(value = "properties") private SubmissionMailEntityProperties innerProperties; + /** Creates an instance of SubmissionMailEntity class. */ + public SubmissionMailEntity() { + } + /** * Get the innerProperties property: Submission mail entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java index e911816eb754d..e0a4460671f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/SupportTier.java @@ -19,6 +19,15 @@ public final class SupportTier extends ExpandableStringEnum { /** Static value Community for SupportTier. */ public static final SupportTier COMMUNITY = fromString("Community"); + /** + * Creates a new instance of SupportTier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SupportTier() { + } + /** * Creates or finds a SupportTier from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java index 897fc3f44ce7a..d929ff3f5dae5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TICheckRequirements.java @@ -21,6 +21,10 @@ public final class TICheckRequirements extends DataConnectorsCheckRequirements { @JsonProperty(value = "properties") private TICheckRequirementsProperties innerProperties; + /** Creates an instance of TICheckRequirements class. */ + public TICheckRequirements() { + } + /** * Get the innerProperties property: Threat Intelligence Platforms data connector check required properties. * @@ -30,6 +34,29 @@ private TICheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the TICheckRequirements object itself. + */ + public TICheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new TICheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java index 4d49f30e45e97..bddbd2d00a83b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnector.java @@ -23,6 +23,10 @@ public final class TIDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private TIDataConnectorProperties innerProperties; + /** Creates an instance of TIDataConnector class. */ + public TIDataConnector() { + } + /** * Get the innerProperties property: TI (Threat Intelligence) data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java index 6615ba9b2f749..728473320a946 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class TIDataConnectorDataTypes { @JsonProperty(value = "indicators", required = true) private TIDataConnectorDataTypesIndicators indicators; + /** Creates an instance of TIDataConnectorDataTypes class. */ + public TIDataConnectorDataTypes() { + } + /** * Get the indicators property: Data type for indicators connection. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java index a51ae50a528a8..84b7c9e247af0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TIDataConnectorDataTypesIndicators.java @@ -9,6 +9,10 @@ /** Data type for indicators connection. */ @Fluent public final class TIDataConnectorDataTypesIndicators extends DataConnectorDataTypeCommon { + /** Creates an instance of TIDataConnectorDataTypesIndicators class. */ + public TIDataConnectorDataTypesIndicators() { + } + /** {@inheritDoc} */ @Override public TIDataConnectorDataTypesIndicators withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java deleted file mode 100644 index 40d641ab84531..0000000000000 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TeamProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.securityinsights.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Describes team properties. */ -@Fluent -public final class TeamProperties { - /* - * The name of the team - */ - @JsonProperty(value = "teamName", required = true) - private String teamName; - - /* - * The description of the team - */ - @JsonProperty(value = "teamDescription") - private String teamDescription; - - /* - * List of member IDs to add to the team - */ - @JsonProperty(value = "memberIds") - private List memberIds; - - /* - * List of group IDs to add their members to the team - */ - @JsonProperty(value = "groupIds") - private List groupIds; - - /** - * Get the teamName property: The name of the team. - * - * @return the teamName value. - */ - public String teamName() { - return this.teamName; - } - - /** - * Set the teamName property: The name of the team. - * - * @param teamName the teamName value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - /** - * Get the teamDescription property: The description of the team. - * - * @return the teamDescription value. - */ - public String teamDescription() { - return this.teamDescription; - } - - /** - * Set the teamDescription property: The description of the team. - * - * @param teamDescription the teamDescription value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withTeamDescription(String teamDescription) { - this.teamDescription = teamDescription; - return this; - } - - /** - * Get the memberIds property: List of member IDs to add to the team. - * - * @return the memberIds value. - */ - public List memberIds() { - return this.memberIds; - } - - /** - * Set the memberIds property: List of member IDs to add to the team. - * - * @param memberIds the memberIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withMemberIds(List memberIds) { - this.memberIds = memberIds; - return this; - } - - /** - * Get the groupIds property: List of group IDs to add their members to the team. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: List of group IDs to add their members to the team. - * - * @param groupIds the groupIds value to set. - * @return the TeamProperties object itself. - */ - public TeamProperties withGroupIds(List groupIds) { - this.groupIds = groupIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (teamName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property teamName in model TeamProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TeamProperties.class); -} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java index f04cc179e840d..5e1474c1eb71a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TemplateStatus.java @@ -19,6 +19,15 @@ public final class TemplateStatus extends ExpandableStringEnum { /** Static value NotAvailable for TemplateStatus. */ public static final TemplateStatus NOT_AVAILABLE = fromString("NotAvailable"); + /** + * Creates a new instance of TemplateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TemplateStatus() { + } + /** * Creates or finds a TemplateStatus from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java index 9acbec19c77f4..fb95037b9ee03 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligence.java @@ -46,6 +46,10 @@ public final class ThreatIntelligence { @JsonProperty(value = "threatType", access = JsonProperty.Access.WRITE_ONLY) private String threatType; + /** Creates an instance of ThreatIntelligence class. */ + public ThreatIntelligence() { + } + /** * Get the confidence property: Confidence (must be between 0 and 1). * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java index 924536281280d..270af876c4348 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRule.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceAlertRule extends AlertRuleInner { @JsonProperty(value = "properties") private ThreatIntelligenceAlertRuleProperties innerProperties; + /** Creates an instance of ThreatIntelligenceAlertRule class. */ + public ThreatIntelligenceAlertRule() { + } + /** * Get the innerProperties property: Threat Intelligence alert rule properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java index 734f6a42748a1..ad91fae35db7c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAlertRuleTemplate.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceAlertRuleTemplate extends AlertRuleTemplate @JsonProperty(value = "properties") private ThreatIntelligenceAlertRuleTemplateProperties innerProperties; + /** Creates an instance of ThreatIntelligenceAlertRuleTemplate class. */ + public ThreatIntelligenceAlertRuleTemplate() { + } + /** * Get the innerProperties property: Threat Intelligence alert rule template properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java index 847257381b591..38a0f63db31c4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceAppendTags.java @@ -17,6 +17,10 @@ public final class ThreatIntelligenceAppendTags { @JsonProperty(value = "threatIntelligenceTags") private List threatIntelligenceTags; + /** Creates an instance of ThreatIntelligenceAppendTags class. */ + public ThreatIntelligenceAppendTags() { + } + /** * Get the threatIntelligenceTags property: List of tags to be appended. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java index 689e8a88e5646..7a86d8fe30a11 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceExternalReference.java @@ -43,6 +43,10 @@ public final class ThreatIntelligenceExternalReference { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map hashes; + /** Creates an instance of ThreatIntelligenceExternalReference class. */ + public ThreatIntelligenceExternalReference() { + } + /** * Get the description property: External reference description. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java index 86be0cc60915a..cecf231a67e7b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceFilteringCriteria.java @@ -89,6 +89,10 @@ public final class ThreatIntelligenceFilteringCriteria { @JsonProperty(value = "skipToken") private String skipToken; + /** Creates an instance of ThreatIntelligenceFilteringCriteria class. */ + public ThreatIntelligenceFilteringCriteria() { + } + /** * Get the pageSize property: Page size. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java index bb55e69667941..b052bbc4a4bb2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceGranularMarkingModel.java @@ -29,6 +29,10 @@ public final class ThreatIntelligenceGranularMarkingModel { @JsonProperty(value = "selectors") private List selectors; + /** Creates an instance of ThreatIntelligenceGranularMarkingModel class. */ + public ThreatIntelligenceGranularMarkingModel() { + } + /** * Get the language property: Language granular marking model. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java index a9e60f8006600..540eca0eb46cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorMetrics.java @@ -14,25 +14,25 @@ public interface ThreatIntelligenceIndicatorMetrics { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link + * Response}. */ - ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); + Response listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Get threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source) along with {@link - * Response}. + * @return threat intelligence indicators metrics (Indicators counts by Type, Threat Type, Source). */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + ThreatIntelligenceMetricsList list(String resourceGroupName, String workspaceName); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java index 5ce9f114369e2..cb0c015043d27 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicatorModel.java @@ -24,6 +24,10 @@ public final class ThreatIntelligenceIndicatorModel extends ThreatIntelligenceIn @JsonProperty(value = "properties") private ThreatIntelligenceIndicatorProperties innerProperties; + /** Creates an instance of ThreatIntelligenceIndicatorModel class. */ + public ThreatIntelligenceIndicatorModel() { + } + /** * Get the innerProperties property: Threat Intelligence Entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java index 464cb4b65fbe0..bf1b6241afe05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceIndicators.java @@ -10,20 +10,6 @@ /** Resource collection API of ThreatIntelligenceIndicators. */ public interface ThreatIntelligenceIndicators { - /** - * Create a new threat intelligence indicator. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. - */ - ThreatIntelligenceInformation createIndicator( - String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); - /** * Create a new threat intelligence indicator. * @@ -43,17 +29,18 @@ Response createIndicatorWithResponse( Context context); /** - * View a threat intelligence indicator by name. + * Create a new threat intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation createIndicator( + String resourceGroupName, String workspaceName, ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * View a threat intelligence indicator by name. @@ -71,22 +58,17 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String name, Context context); /** - * Update a threat Intelligence indicator. + * View a threat intelligence indicator by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. - * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return threat intelligence information object. */ - ThreatIntelligenceInformation create( - String resourceGroupName, - String workspaceName, - String name, - ThreatIntelligenceIndicatorModel threatIntelligenceProperties); + ThreatIntelligenceInformation get(String resourceGroupName, String workspaceName, String name); /** * Update a threat Intelligence indicator. @@ -109,16 +91,22 @@ Response createWithResponse( Context context); /** - * Delete a threat intelligence indicator. + * Update a threat Intelligence indicator. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. + * @param threatIntelligenceProperties Properties of threat intelligence indicators to create and update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return threat intelligence information object. */ - void delete(String resourceGroupName, String workspaceName, String name); + ThreatIntelligenceInformation create( + String resourceGroupName, + String workspaceName, + String name, + ThreatIntelligenceIndicatorModel threatIntelligenceProperties); /** * Delete a threat intelligence indicator. @@ -134,6 +122,18 @@ Response createWithResponse( */ Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + /** + * Delete a threat intelligence indicator. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param name Threat intelligence indicator name field. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + /** * Query threat intelligence indicators as per filtering criteria. * @@ -175,15 +175,18 @@ PagedIterable queryIndicators( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void appendTags( + Response appendTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags, + Context context); /** * Append tags to a threat intelligence indicator. @@ -192,18 +195,15 @@ void appendTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceAppendTags The threat intelligence append tags request body. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response appendTagsWithResponse( + void appendTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceAppendTags threatIntelligenceAppendTags, - Context context); + ThreatIntelligenceAppendTags threatIntelligenceAppendTags); /** * Replace tags added to a threat intelligence indicator. @@ -212,16 +212,18 @@ Response appendTagsWithResponse( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object. + * @return threat intelligence information object along with {@link Response}. */ - ThreatIntelligenceInformation replaceTags( + Response replaceTagsWithResponse( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, + Context context); /** * Replace tags added to a threat intelligence indicator. @@ -230,16 +232,14 @@ ThreatIntelligenceInformation replaceTags( * @param workspaceName The name of the workspace. * @param name Threat intelligence indicator name field. * @param threatIntelligenceReplaceTags Tags in the threat intelligence indicator to be replaced. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return threat intelligence information object along with {@link Response}. + * @return threat intelligence information object. */ - Response replaceTagsWithResponse( + ThreatIntelligenceInformation replaceTags( String resourceGroupName, String workspaceName, String name, - ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags, - Context context); + ThreatIntelligenceIndicatorModel threatIntelligenceReplaceTags); } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java index 63195abe89bbd..fc8d2b29c70cb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceInformationList.java @@ -25,6 +25,10 @@ public final class ThreatIntelligenceInformationList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ThreatIntelligenceInformationList class. */ + public ThreatIntelligenceInformationList() { + } + /** * Get the nextLink property: URL to fetch the next set of information objects. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java index 8a1ba6f2bd1d9..b9da00cd0cc65 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceKillChainPhase.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceKillChainPhase { @JsonProperty(value = "phaseName") private String phaseName; + /** Creates an instance of ThreatIntelligenceKillChainPhase class. */ + public ThreatIntelligenceKillChainPhase() { + } + /** * Get the killChainName property: Kill chainName name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java index 2cb0c00e17c5a..b1a55af9a16e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetric.java @@ -35,6 +35,10 @@ public final class ThreatIntelligenceMetric { @JsonProperty(value = "sourceMetrics") private List sourceMetrics; + /** Creates an instance of ThreatIntelligenceMetric class. */ + public ThreatIntelligenceMetric() { + } + /** * Get the lastUpdatedTimeUtc property: Last updated indicator metric. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java index 62bd0e31c2fc0..9c4b6e14c4a99 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetricEntity.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceMetricEntity { @JsonProperty(value = "metricValue") private Integer metricValue; + /** Creates an instance of ThreatIntelligenceMetricEntity class. */ + public ThreatIntelligenceMetricEntity() { + } + /** * Get the metricName property: Metric name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java index 2d20ceae39ac0..512a2b5cb9072 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceMetrics.java @@ -16,6 +16,10 @@ public final class ThreatIntelligenceMetrics { @JsonProperty(value = "properties") private ThreatIntelligenceMetric properties; + /** Creates an instance of ThreatIntelligenceMetrics class. */ + public ThreatIntelligenceMetrics() { + } + /** * Get the properties property: Threat intelligence metrics. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java index 1a80738051c9f..f4b8451c20be6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPattern.java @@ -23,6 +23,10 @@ public final class ThreatIntelligenceParsedPattern { @JsonProperty(value = "patternTypeValues") private List patternTypeValues; + /** Creates an instance of ThreatIntelligenceParsedPattern class. */ + public ThreatIntelligenceParsedPattern() { + } + /** * Get the patternTypeKey property: Pattern type key. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java index ead9ca6b88336..9753eba99ef8e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceParsedPatternTypeValue.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceParsedPatternTypeValue { @JsonProperty(value = "value") private String value; + /** Creates an instance of ThreatIntelligenceParsedPatternTypeValue class. */ + public ThreatIntelligenceParsedPatternTypeValue() { + } + /** * Get the valueType property: Type of the value. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java index 6595128b74d9d..a064accb2a4f0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceResourceKindEnum.java @@ -13,6 +13,15 @@ public final class ThreatIntelligenceResourceKindEnum extends ExpandableStringEn /** Static value indicator for ThreatIntelligenceResourceKindEnum. */ public static final ThreatIntelligenceResourceKindEnum INDICATOR = fromString("indicator"); + /** + * Creates a new instance of ThreatIntelligenceResourceKindEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceResourceKindEnum() { + } + /** * Creates or finds a ThreatIntelligenceResourceKindEnum from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java index 7c51d95d08ad6..a09ed7f49e5ee 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteria.java @@ -22,6 +22,10 @@ public final class ThreatIntelligenceSortingCriteria { @JsonProperty(value = "sortOrder") private ThreatIntelligenceSortingCriteriaEnum sortOrder; + /** Creates an instance of ThreatIntelligenceSortingCriteria class. */ + public ThreatIntelligenceSortingCriteria() { + } + /** * Get the itemKey property: Column name. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java index c5933ebe83428..4440f848cc0b7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ThreatIntelligenceSortingCriteriaEnum.java @@ -20,6 +20,15 @@ public final class ThreatIntelligenceSortingCriteriaEnum /** Static value descending for ThreatIntelligenceSortingCriteriaEnum. */ public static final ThreatIntelligenceSortingCriteriaEnum DESCENDING = fromString("descending"); + /** + * Creates a new instance of ThreatIntelligenceSortingCriteriaEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatIntelligenceSortingCriteriaEnum() { + } + /** * Creates or finds a ThreatIntelligenceSortingCriteriaEnum from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java index a6e561d9e99ec..b0c802193a4df 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiCheckRequirements.java @@ -21,6 +21,10 @@ public final class TiTaxiiCheckRequirements extends DataConnectorsCheckRequireme @JsonProperty(value = "properties") private TiTaxiiCheckRequirementsProperties innerProperties; + /** Creates an instance of TiTaxiiCheckRequirements class. */ + public TiTaxiiCheckRequirements() { + } + /** * Get the innerProperties property: Threat Intelligence TAXII check required properties. * @@ -30,6 +34,29 @@ private TiTaxiiCheckRequirementsProperties innerProperties() { return this.innerProperties; } + /** + * Get the tenantId property: The tenant id to connect to, and get the data from. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Set the tenantId property: The tenant id to connect to, and get the data from. + * + * @param tenantId the tenantId value to set. + * @return the TiTaxiiCheckRequirements object itself. + */ + public TiTaxiiCheckRequirements withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new TiTaxiiCheckRequirementsProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java index 125e1dd55a280..abc44000e104f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnector.java @@ -23,6 +23,10 @@ public final class TiTaxiiDataConnector extends DataConnectorInner { @JsonProperty(value = "properties") private TiTaxiiDataConnectorProperties innerProperties; + /** Creates an instance of TiTaxiiDataConnector class. */ + public TiTaxiiDataConnector() { + } + /** * Get the innerProperties property: Threat intelligence TAXII data connector properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java index 22f12b8a6ab9f..520e9eb072dab 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypes.java @@ -17,6 +17,10 @@ public final class TiTaxiiDataConnectorDataTypes { @JsonProperty(value = "taxiiClient", required = true) private TiTaxiiDataConnectorDataTypesTaxiiClient taxiiClient; + /** Creates an instance of TiTaxiiDataConnectorDataTypes class. */ + public TiTaxiiDataConnectorDataTypes() { + } + /** * Get the taxiiClient property: Data type for TAXII connector. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java index 7b2b40b0a6485..07402e5313caf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TiTaxiiDataConnectorDataTypesTaxiiClient.java @@ -9,6 +9,10 @@ /** Data type for TAXII connector. */ @Fluent public final class TiTaxiiDataConnectorDataTypesTaxiiClient extends DataConnectorDataTypeCommon { + /** Creates an instance of TiTaxiiDataConnectorDataTypesTaxiiClient class. */ + public TiTaxiiDataConnectorDataTypesTaxiiClient() { + } + /** {@inheritDoc} */ @Override public TiTaxiiDataConnectorDataTypesTaxiiClient withState(DataTypeState state) { diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java index d34ece2d531a3..49301c2fffb26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineAggregation.java @@ -23,6 +23,10 @@ public final class TimelineAggregation { @JsonProperty(value = "kind", required = true) private EntityTimelineKind kind; + /** Creates an instance of TimelineAggregation class. */ + public TimelineAggregation() { + } + /** * Get the count property: the total items found for a kind. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java index e6c563cb369f9..3deb6ab0b32e5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineError.java @@ -29,6 +29,10 @@ public final class TimelineError { @JsonProperty(value = "errorMessage", required = true) private String errorMessage; + /** Creates an instance of TimelineError class. */ + public TimelineError() { + } + /** * Get the kind property: the query kind. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java index 7d42bccca4700..0e2fbed3b2ab6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TimelineResultsMetadata.java @@ -30,6 +30,10 @@ public final class TimelineResultsMetadata { @JsonProperty(value = "errors") private List errors; + /** Creates an instance of TimelineResultsMetadata class. */ + public TimelineResultsMetadata() { + } + /** * Get the totalCount property: the total items found for the timeline request. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java new file mode 100644 index 0000000000000..b8117c24c87ce --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRun.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of TriggeredAnalyticsRuleRun. */ +public interface TriggeredAnalyticsRuleRun { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: Etag of the azure resource. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the executionTimeUtc property: The executionTimeUtc property. + * + * @return the executionTimeUtc value. + */ + OffsetDateTime executionTimeUtc(); + + /** + * Gets the ruleId property: The ruleId property. + * + * @return the ruleId value. + */ + String ruleId(); + + /** + * Gets the triggeredAnalyticsRuleRunId property: The triggeredAnalyticsRuleRunId property. + * + * @return the triggeredAnalyticsRuleRunId value. + */ + String triggeredAnalyticsRuleRunId(); + + /** + * Gets the provisioningState property: The triggered analytics rule run provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the ruleRunAdditionalData property: Dictionary of <any>. + * + * @return the ruleRunAdditionalData value. + */ + Map ruleRunAdditionalData(); + + /** + * Gets the inner com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner object. + * + * @return the inner object. + */ + TriggeredAnalyticsRuleRunInner innerModel(); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java new file mode 100644 index 0000000000000..c883a4aa0e7a5 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRunOperations.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of TriggeredAnalyticsRuleRunOperations. */ +public interface TriggeredAnalyticsRuleRunOperations { + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String workspaceName, String ruleRunId, Context context); + + /** + * Gets the triggered analytics rule run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param ruleRunId the triggered rule id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the triggered analytics rule run. + */ + TriggeredAnalyticsRuleRun get(String resourceGroupName, String workspaceName, String ruleRunId); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java new file mode 100644 index 0000000000000..40a4ddfc0cebb --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggeredAnalyticsRuleRuns.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.securityinsights.fluent.models.TriggeredAnalyticsRuleRunInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The triggered analytics rule run array. */ +@Fluent +public final class TriggeredAnalyticsRuleRuns { + /* + * The value property. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of TriggeredAnalyticsRuleRuns class. */ + public TriggeredAnalyticsRuleRuns() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the TriggeredAnalyticsRuleRuns object itself. + */ + public TriggeredAnalyticsRuleRuns withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model TriggeredAnalyticsRuleRuns")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggeredAnalyticsRuleRuns.class); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java index 9bb9323008777..ebeed445bade8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersOn.java @@ -16,6 +16,15 @@ public final class TriggersOn extends ExpandableStringEnum { /** Static value Alerts for TriggersOn. */ public static final TriggersOn ALERTS = fromString("Alerts"); + /** + * Creates a new instance of TriggersOn value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersOn() { + } + /** * Creates or finds a TriggersOn from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java index 84c11fc4fc6b0..20aa5497f51e8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/TriggersWhen.java @@ -16,6 +16,15 @@ public final class TriggersWhen extends ExpandableStringEnum { /** Static value Updated for TriggersWhen. */ public static final TriggersWhen UPDATED = fromString("Updated"); + /** + * Creates a new instance of TriggersWhen value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TriggersWhen() { + } + /** * Creates or finds a TriggersWhen from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java index 5a79fd5025442..ca29e5d7ff22b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Ueba.java @@ -23,6 +23,10 @@ public final class Ueba extends SettingsInner { @JsonProperty(value = "properties") private UebaProperties innerProperties; + /** Creates an instance of Ueba class. */ + public Ueba() { + } + /** * Get the innerProperties property: Ueba properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java index 8548886d5a2db..9590f086602ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UebaDataSources.java @@ -22,6 +22,15 @@ public final class UebaDataSources extends ExpandableStringEnum /** Static value SigninLogs for UebaDataSources. */ public static final UebaDataSources SIGNIN_LOGS = fromString("SigninLogs"); + /** + * Creates a new instance of UebaDataSources value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UebaDataSources() { + } + /** * Creates or finds a UebaDataSources from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java new file mode 100644 index 0000000000000..da5da9ac1aa13 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Updates.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.models; + +import com.azure.core.util.Context; +import java.util.List; +import java.util.UUID; + +/** Resource collection API of Updates. */ +public interface Updates { + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch); + + /** + * Patch a recommendation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param recommendationId Recommendation Id. + * @param recommendationPatch Recommendation Fields to Update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return recommendation object. + */ + Recommendation recommendation( + String resourceGroupName, + String workspaceName, + UUID recommendationId, + List recommendationPatch, + Context context); +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java index 0af80094b7e0f..e8975502da54c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UrlEntity.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.securityinsights.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.securityinsights.fluent.models.EntityInner; import com.azure.resourcemanager.securityinsights.fluent.models.UrlEntityProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,7 +15,7 @@ /** Represents a url entity. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind") @JsonTypeName("Url") -@Fluent +@Immutable public final class UrlEntity extends EntityInner { /* * Url entity properties @@ -23,6 +23,10 @@ public final class UrlEntity extends EntityInner { @JsonProperty(value = "properties") private UrlEntityProperties innerProperties; + /** Creates an instance of UrlEntity class. */ + public UrlEntity() { + } + /** * Get the innerProperties property: Url entity properties. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java index 8d8dc55f03095..000883c8a5f30 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/UserInfo.java @@ -29,6 +29,10 @@ public final class UserInfo { @JsonProperty(value = "objectId") private UUID objectId; + /** Creates an instance of UserInfo class. */ + public UserInfo() { + } + /** * Get the email property: The email of the user. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java index 7b74ced2e0681..2a7a5066bdeea 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/ValidationError.java @@ -23,6 +23,10 @@ public final class ValidationError { @JsonProperty(value = "errorMessages", access = JsonProperty.Access.WRITE_ONLY) private List errorMessages; + /** Creates an instance of ValidationError class. */ + public ValidationError() { + } + /** * Get the recordIndex property: The number of the record that has the error. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java index 285474b81325a..206f7814f0aa2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Version.java @@ -16,6 +16,15 @@ public final class Version extends ExpandableStringEnum { /** Static value V2 for Version. */ public static final Version V2 = fromString("V2"); + /** + * Creates a new instance of Version value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Version() { + } + /** * Creates or finds a Version from its string representation. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java index 97bc46f5f4bd7..746fe1d8db214 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItemList.java @@ -25,6 +25,10 @@ public final class WatchlistItemList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistItemList class. */ + public WatchlistItemList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlist item. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java index 9b56cdba24034..2c03a7964f815 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistItems.java @@ -48,12 +48,14 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ - WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Gets a watchlist, without its watchlist items. @@ -62,14 +64,12 @@ PagedIterable list( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + WatchlistItem get(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Delete a watchlist item. @@ -78,11 +78,14 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); /** * Delete a watchlist item. @@ -91,14 +94,11 @@ Response getWithResponse( * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. * @param watchlistItemId Watchlist Item Id (GUID). - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias, String watchlistItemId); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java index 4e03f77f637e8..4c0e933d47db5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistList.java @@ -25,6 +25,10 @@ public final class WatchlistList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of WatchlistList class. */ + public WatchlistList() { + } + /** * Get the nextLink property: URL to fetch the next set of watchlists. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java index 4e53d746f0644..026f4b39fa712 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Watchlists.java @@ -44,12 +44,14 @@ public interface Watchlists { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items. + * @return a watchlist, without its watchlist items along with {@link Response}. */ - Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); + Response getWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Gets a watchlist, without its watchlist items. @@ -57,14 +59,12 @@ public interface Watchlists { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a watchlist, without its watchlist items along with {@link Response}. + * @return a watchlist, without its watchlist items. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + Watchlist get(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Delete a watchlist. @@ -72,11 +72,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void delete(String resourceGroupName, String workspaceName, String watchlistAlias); + WatchlistsDeleteResponse deleteWithResponse( + String resourceGroupName, String workspaceName, String watchlistAlias, Context context); /** * Delete a watchlist. @@ -84,14 +87,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param watchlistAlias Watchlist Alias. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ - WatchlistsDeleteResponse deleteWithResponse( - String resourceGroupName, String workspaceName, String watchlistAlias, Context context); + void delete(String resourceGroupName, String workspaceName, String watchlistAlias); /** * Gets a watchlist, without its watchlist items. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java index 5356e46d32f66..8d9c07b9c859d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsCreateOrUpdateHeaders.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,8 @@ public final class WatchlistsCreateOrUpdateHeaders { @JsonProperty(value = "Azure-AsyncOperation") private String azureAsyncOperation; + private static final HttpHeaderName AZURE_ASYNC_OPERATION = HttpHeaderName.fromString("Azure-AsyncOperation"); + // HttpHeaders containing the raw property values. /** * Creates an instance of WatchlistsCreateOrUpdateHeaders class. @@ -24,7 +27,7 @@ public final class WatchlistsCreateOrUpdateHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public WatchlistsCreateOrUpdateHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); + this.azureAsyncOperation = rawHeaders.getValue(AZURE_ASYNC_OPERATION); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java index 8105fba3b9de5..fcbaf71f20790 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/WatchlistsDeleteHeaders.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.securityinsights.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,8 @@ public final class WatchlistsDeleteHeaders { @JsonProperty(value = "Azure-AsyncOperation") private String azureAsyncOperation; + private static final HttpHeaderName AZURE_ASYNC_OPERATION = HttpHeaderName.fromString("Azure-AsyncOperation"); + // HttpHeaders containing the raw property values. /** * Creates an instance of WatchlistsDeleteHeaders class. @@ -24,7 +27,7 @@ public final class WatchlistsDeleteHeaders { * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public WatchlistsDeleteHeaders(HttpHeaders rawHeaders) { - this.azureAsyncOperation = rawHeaders.getValue("Azure-AsyncOperation"); + this.azureAsyncOperation = rawHeaders.getValue(AZURE_ASYNC_OPERATION); } /** diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java index 8495bcf9e510f..d1be4d11642a0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/Webhook.java @@ -34,6 +34,10 @@ public final class Webhook { @JsonProperty(value = "rotateWebhookSecret") private Boolean rotateWebhookSecret; + /** Creates an instance of Webhook class. */ + public Webhook() { + } + /** * Get the webhookId property: Unique identifier for the webhook. * diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/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..00be2588fa8ed 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Actions CreateOrUpdate. */ public final class ActionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/CreateActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/CreateActionOfAlertRule.json */ /** * Sample code: Creates or updates an action of alert rule. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java index 4eade4f804870..1e9e3407b8adf 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Delete. */ public final class ActionsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/DeleteActionOfAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/DeleteActionOfAlertRule.json */ /** * Sample code: Delete an action of alert rule. @@ -25,6 +23,6 @@ public static void deleteAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java index 3d2f9a3fcd1a7..47a8e365bb028 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions Get. */ public final class ActionsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetActionOfAlertRuleById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/GetActionOfAlertRuleById.json */ /** * Sample code: Get an action of alert rule. @@ -25,6 +23,6 @@ public static void getAnActionOfAlertRule( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "912bec42-cb66-4c03-ac63-1761b6898c3e", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java index 61efbd321ea97..ed8ae8dd92da8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ActionsListByAlertRuleSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Actions ListByAlertRule. */ public final class ActionsListByAlertRuleSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/actions/GetAllActionsByAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/actions/GetAllActionsByAlertRule.json */ /** * Sample code: Get all actions of alert rule. @@ -18,6 +16,9 @@ public final class ActionsListByAlertRuleSamples { */ public static void getAllActionsOfAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.actions().listByAlertRule("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .actions() + .listByAlertRule( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java new file mode 100644 index 0000000000000..bae9f0af3ef15 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleOperationTriggerRuleRunSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.AnalyticsRuleRunTrigger; +import java.time.OffsetDateTime; + +/** Samples for AlertRuleOperation TriggerRuleRun. */ +public final class AlertRuleOperationTriggerRuleRunSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json + */ + /** + * Sample code: triggerRuleRun_Post. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggerRuleRunPost(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .alertRuleOperations() + .triggerRuleRun( + "myRg", + "myWorkspace", + "65360bb0-8986-4ade-a89d-af3cf44d28aa", + new AnalyticsRuleRunTrigger().withExecutionTimeUtc(OffsetDateTime.parse("2022-12-22T15:37:03.074Z")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java index 5e2ef04f866cc..67612adfe72d7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates Get. */ public final class AlertRuleTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplateById.json */ /** * Sample code: Get alert rule template by Id. @@ -20,6 +18,7 @@ public static void getAlertRuleTemplateById( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRuleTemplates() - .getWithResponse("myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java index 30931adbd1bbc..1cad2fc20a088 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRuleTemplatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRuleTemplates List. */ public final class AlertRuleTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRuleTemplates/GetAlertRuleTemplates.json */ /** * Sample code: Get all alert rule templates. @@ -18,6 +16,6 @@ public final class AlertRuleTemplatesListSamples { */ public static void getAllAlertRuleTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRuleTemplates().list("myRg", "myWorkspace", Context.NONE); + manager.alertRuleTemplates().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java index df3209f52c0cd..bc1c603bdc96d 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesCreateOrUpdateSamples.java @@ -4,9 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AlertDetail; import com.azure.resourcemanager.securityinsights.models.AlertDetailsOverride; +import com.azure.resourcemanager.securityinsights.models.AlertProperty; +import com.azure.resourcemanager.securityinsights.models.AlertPropertyMapping; import com.azure.resourcemanager.securityinsights.models.AlertSeverity; import com.azure.resourcemanager.securityinsights.models.AttackTactic; import com.azure.resourcemanager.securityinsights.models.EntityMapping; @@ -26,6 +27,7 @@ import com.azure.resourcemanager.securityinsights.models.MicrosoftSecurityProductName; import com.azure.resourcemanager.securityinsights.models.NrtAlertRule; import com.azure.resourcemanager.securityinsights.models.ScheduledAlertRule; +import com.azure.resourcemanager.securityinsights.models.SentinelEntityMapping; import com.azure.resourcemanager.securityinsights.models.TriggerOperator; import java.time.Duration; import java.util.Arrays; @@ -35,7 +37,7 @@ /** Samples for AlertRules CreateOrUpdate. */ public final class AlertRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateFusionAlertRule.json */ /** * Sample code: Creates or updates a Fusion alert rule. @@ -254,11 +256,11 @@ public static void createsOrUpdatesAFusionAlertRule( .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Creates or updates a MicrosoftSecurityIncidentCreation rule. @@ -278,11 +280,11 @@ public static void createsOrUpdatesAMicrosoftSecurityIncidentCreationRule( .withDisplayName("testing displayname") .withEnabled(true) .withProductFilter(MicrosoftSecurityProductName.MICROSOFT_CLOUD_APP_SECURITY), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateScheduledAlertRule.json */ /** * Sample code: Creates or updates a Scheduled alert rule. @@ -350,12 +352,26 @@ public static void createsOrUpdatesAScheduledAlertRule( .withAlertDetailsOverride( new AlertDetailsOverride() .withAlertDisplayNameFormat("Alert from {{Computer}}") - .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}")), - Context.NONE); + .withAlertDescriptionFormat("Suspicious activity was made by {{ComputerIP}}") + .withAlertDynamicProperties( + Arrays + .asList( + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_COMPONENT_NAME) + .withValue("ProductComponentNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.PRODUCT_NAME) + .withValue("ProductNameCustomColumn"), + new AlertPropertyMapping() + .withAlertProperty(AlertProperty.ALERT_LINK) + .withValue("Link")))) + .withSentinelEntitiesMappings( + Arrays.asList(new SentinelEntityMapping().withColumnName("Entities"))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateFusionAlertRuleWithFusionScenarioExclusion.json */ /** * Sample code: Creates or updates a Fusion alert rule with scenario exclusion pattern. @@ -574,11 +590,11 @@ public static void createsOrUpdatesAFusionAlertRuleWithScenarioExclusionPattern( .withEnabled(true) .withSourceSubTypeName("Palo Alto Networks") .withSeverityFilters(new FusionSubTypeSeverityFilter()))))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/CreateNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/CreateNrtAlertRule.json */ /** * Sample code: Creates or updates a Nrt alert rule. @@ -619,7 +635,7 @@ public static void createsOrUpdatesANrtAlertRule( Arrays.asList(EntityMappingType.HOST, EntityMappingType.ACCOUNT)))) .withEventGroupingSettings( new EventGroupingSettings().withAggregationKind(EventGroupingAggregationKind.ALERT_PER_RESULT)), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java index ae8c5d3527899..3b9353c725226 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Delete. */ public final class AlertRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/DeleteAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/DeleteAlertRule.json */ /** * Sample code: Delete an alert rule. @@ -19,6 +17,7 @@ public final class AlertRulesDeleteSamples { public static void deleteAnAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java index 5f59cda357eb7..a89714be3e1bb 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules Get. */ public final class AlertRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetScheduledAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetScheduledAlertRule.json */ /** * Sample code: Get a Scheduled alert rule. @@ -20,11 +18,12 @@ public static void getAScheduledAlertRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetNrtAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetNrtAlertRule.json */ /** * Sample code: Get an Nrt alert rule. @@ -34,11 +33,12 @@ public static void getAScheduledAlertRule( public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetFusionAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetFusionAlertRule.json */ /** * Sample code: Get a Fusion alert rule. @@ -46,11 +46,13 @@ public static void getAnNrtAlertRule(com.azure.resourcemanager.securityinsights. * @param manager Entry point to SecurityInsightsManager. */ public static void getAFusionAlertRule(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", Context.NONE); + manager + .alertRules() + .getWithResponse("myRg", "myWorkspace", "myFirstFusionRule", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetMicrosoftSecurityIncidentCreationAlertRule.json */ /** * Sample code: Get a MicrosoftSecurityIncidentCreation rule. @@ -61,6 +63,10 @@ public static void getAMicrosoftSecurityIncidentCreationRule( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .alertRules() - .getWithResponse("myRg", "myWorkspace", "microsoftSecurityIncidentCreationRuleExample", Context.NONE); + .getWithResponse( + "myRg", + "myWorkspace", + "microsoftSecurityIncidentCreationRuleExample", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java index a76a803ecb342..9992b12e063f5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AlertRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AlertRules List. */ public final class AlertRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/alertRules/GetAllAlertRules.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/alertRules/GetAllAlertRules.json */ /** * Sample code: Get all alert rules. @@ -17,6 +15,6 @@ public final class AlertRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllAlertRules(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.alertRules().list("myRg", "myWorkspace", Context.NONE); + manager.alertRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java index 0ddbba866ce2c..121324af71d34 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for AutomationRules CreateOrUpdate. */ public final class AutomationRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_CreateOrUpdate.json */ /** * Sample code: AutomationRules_CreateOrUpdate. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java index 9931b428f9930..80247880a7880 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Delete. */ public final class AutomationRulesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Delete.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_Delete.json */ /** * Sample code: AutomationRules_Delete. @@ -20,6 +18,7 @@ public static void automationRulesDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java index 79bd1f2bf1dd3..5b6788bfb383a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules Get. */ public final class AutomationRulesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_Get.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_Get.json */ /** * Sample code: AutomationRules_Get. @@ -19,6 +17,7 @@ public final class AutomationRulesGetSamples { public static void automationRulesGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .automationRules() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java index cb067a4161d23..96502b1ac8d06 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/AutomationRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for AutomationRules List. */ public final class AutomationRulesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/automationRules/AutomationRules_List.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/automationRules/AutomationRules_List.json */ /** * Sample code: AutomationRules_List. @@ -17,6 +15,6 @@ public final class AutomationRulesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void automationRulesList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.automationRules().list("myRg", "myWorkspace", Context.NONE); + manager.automationRules().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java index 02135e4b1f24a..4497d5644d4fe 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkOperationExpandSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.BookmarkExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for BookmarkOperation Expand. */ public final class BookmarkOperationExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/expand/PostExpandBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/expand/PostExpandBookmark.json */ /** * Sample code: Expand an bookmark. @@ -30,6 +29,6 @@ public static void expandAnBookmark(com.azure.resourcemanager.securityinsights.S .withEndTime(OffsetDateTime.parse("2020-01-24T17:21:00.000Z")) .withExpansionId(UUID.fromString("27f76e63-c41b-480f-bb18-12ad2e011d49")) .withStartTime(OffsetDateTime.parse("2019-12-25T17:21:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java index 4ee602ef802a8..797402ed6c4db 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for BookmarkRelations CreateOrUpdate. */ public final class BookmarkRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/CreateBookmarkRelation.json */ /** * Sample code: Creates or updates a bookmark relation. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java index 90fe86d803f01..bd16edc1a90da 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Delete. */ public final class BookmarkRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/DeleteBookmarkRelation.json */ /** * Sample code: Delete the bookmark relation. @@ -25,6 +23,6 @@ public static void deleteTheBookmarkRelation( "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java index 6ae73ac9318f4..65b3c638fe23b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations Get. */ public final class BookmarkRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/GetBookmarkRelationByName.json */ /** * Sample code: Get a bookmark relation. @@ -25,6 +23,6 @@ public static void getABookmarkRelation( "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java index c04cb45847c23..ac9be5fe46fe6 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarkRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for BookmarkRelations List. */ public final class BookmarkRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/relations/GetAllBookmarkRelations.json */ /** * Sample code: Get all bookmark relations. @@ -20,6 +18,14 @@ public static void getAllBookmarkRelations( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarkRelations() - .list("myRg", "myWorkspace", "2216d0e1-91e3-4902-89fd-d2df8c535096", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "2216d0e1-91e3-4902-89fd-d2df8c535096", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java index f54f13ae59da1..0d7a52cf168b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for Bookmarks CreateOrUpdate. */ public final class BookmarksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/CreateBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/CreateBookmark.json */ /** * Sample code: Creates or updates a bookmark. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java index adaf45b1a342c..68cb85086124c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Delete. */ public final class BookmarksDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/DeleteBookmark.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/DeleteBookmark.json */ /** * Sample code: Delete a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksDeleteSamples { public static void deleteABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java index cca078fc516b2..52a5ce223415e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks Get. */ public final class BookmarksGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarkById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/GetBookmarkById.json */ /** * Sample code: Get a bookmark. @@ -19,6 +17,7 @@ public final class BookmarksGetSamples { public static void getABookmark(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .bookmarks() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java index 7ff9e9471b73b..35e1f1b3b6959 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/BookmarksListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Bookmarks List. */ public final class BookmarksListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/bookmarks/GetBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/bookmarks/GetBookmarks.json */ /** * Sample code: Get all bookmarks. @@ -17,6 +15,6 @@ public final class BookmarksListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllBookmarks(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.bookmarks().list("myRg", "myWorkspace", Context.NONE); + manager.bookmarks().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java index 236b908d09558..9c9e9f1b24873 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCheckRequirementsOperationPostSamples.java @@ -4,12 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.AadCheckRequirements; import com.azure.resourcemanager.securityinsights.models.AscCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Dynamics365CheckRequirements; import com.azure.resourcemanager.securityinsights.models.IoTCheckRequirements; import com.azure.resourcemanager.securityinsights.models.McasCheckRequirements; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MstiCheckRequirements; import com.azure.resourcemanager.securityinsights.models.MtpCheckRequirements; import com.azure.resourcemanager.securityinsights.models.Office365ProjectCheckRequirements; @@ -22,7 +22,7 @@ /** Samples for DataConnectorsCheckRequirementsOperation Post. */ public final class DataConnectorsCheckRequirementsOperationPostSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficeATP.json */ /** * Sample code: Check requirements for OfficeATP. @@ -33,11 +33,15 @@ public static void checkRequirementsForOfficeATP( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeAtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeAtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOffice365Project.json */ /** * Sample code: Check requirements for Office365Project. @@ -48,11 +52,15 @@ public static void checkRequirementsForOffice365Project( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Office365ProjectCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Office365ProjectCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectory.json */ /** * Sample code: Check requirements for AAD. @@ -63,11 +71,15 @@ public static void checkRequirementsForAAD( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftCloudAppSecurity.json */ /** * Sample code: Check requirements for Mcas. @@ -78,11 +90,15 @@ public static void checkRequirementsForMcas( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsIoT.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsIoT.json */ /** * Sample code: Check requirements for IoT. @@ -97,11 +113,11 @@ public static void checkRequirementsForIoT( "myRg", "myWorkspace", new IoTCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMdatp.json */ /** * Sample code: Check requirements for Mdatp. @@ -112,11 +128,15 @@ public static void checkRequirementsForMdatp( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new McasCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new McasCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoAuthorization.json */ /** * Sample code: Check requirements for AAD - no authorization. @@ -127,11 +147,15 @@ public static void checkRequirementsForAADNoAuthorization( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureSecurityCenter.json */ /** * Sample code: Check requirements for ASC. @@ -146,11 +170,31 @@ public static void checkRequirementsForASC( "myRg", "myWorkspace", new AscCheckRequirements().withSubscriptionId("c0688291-89d7-4bed-87a2-a7b1bff43f4c"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftPurviewInformationProtection.json + */ + /** + * Sample code: Check requirements for MicrosoftPurviewInformationProtection. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void checkRequirementsForMicrosoftPurviewInformationProtection( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectorsCheckRequirementsOperations() + .postWithResponse( + "myRg", + "myWorkspace", + new MicrosoftPurviewInformationProtectionCheckRequirements() + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatProtection.json */ /** * Sample code: Check requirements for MicrosoftThreatProtection. @@ -161,11 +205,15 @@ public static void checkRequirementsForMicrosoftThreatProtection( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MtpCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MtpCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligenceTaxii.json */ /** * Sample code: Check requirements for TI Taxii. @@ -176,11 +224,15 @@ public static void checkRequirementsForTITaxii( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TiTaxiiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TiTaxiiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficeIRM.json */ /** * Sample code: Check requirements for OfficeIRM. @@ -191,11 +243,15 @@ public static void checkRequirementsForOfficeIRM( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficeIrmCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficeIrmCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsMicrosoftThreatIntelligence.json */ /** * Sample code: Check requirements for MicrosoftThreatIntelligence. @@ -206,11 +262,15 @@ public static void checkRequirementsForMicrosoftThreatIntelligence( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new MstiCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new MstiCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsOfficePowerBI.json */ /** * Sample code: Check requirements for OfficePowerBI. @@ -221,11 +281,15 @@ public static void checkRequirementsForOfficePowerBI( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new OfficePowerBICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new OfficePowerBICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsDynamics365.json */ /** * Sample code: Check requirements for Dynamics365. @@ -236,11 +300,15 @@ public static void checkRequirementsForDynamics365( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new Dynamics365CheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new Dynamics365CheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsAzureActiveDirectoryNoLicense.json */ /** * Sample code: Check requirements for AAD - no license. @@ -251,11 +319,15 @@ public static void checkRequirementsForAADNoLicense( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new AadCheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new AadCheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CheckRequirementsThreatIntelligence.json */ /** * Sample code: Check requirements for TI. @@ -266,6 +338,10 @@ public static void checkRequirementsForTI( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectorsCheckRequirementsOperations() - .postWithResponse("myRg", "myWorkspace", new TICheckRequirements(), Context.NONE); + .postWithResponse( + "myRg", + "myWorkspace", + new TICheckRequirements().withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java index d00218190776a..2f62c241555f4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsConnectSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.ConnectAuthKind; import com.azure.resourcemanager.securityinsights.models.DataConnectorConnectBody; @@ -15,7 +14,7 @@ /** Samples for DataConnectors Connect. */ public final class DataConnectorsConnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/ConnectAPIPollingV2Logs.json */ /** * Sample code: Connect an APIPolling V2 logs data connector. @@ -32,7 +31,7 @@ public static void connectAnAPIPollingV2LogsDataConnector( "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withDataCollectionEndpoint("https://test.eastus.ingest.monitor.azure.com") .withDataCollectionRuleImmutableId("dcr-34adsj9o7d6f9de204478b9cgb43b631") .withOutputStream("Custom-MyTableRawData") @@ -46,11 +45,11 @@ public static void connectAnAPIPollingV2LogsDataConnector( + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/ConnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/ConnectAPIPolling.json */ /** * Sample code: Connect an APIPolling data connector. @@ -67,7 +66,7 @@ public static void connectAnAPIPollingDataConnector( "316ec55e-7138-4d63-ab18-90c8a60fd1c8", new DataConnectorConnectBody() .withKind(ConnectAuthKind.APIKEY) - .withApiKey("fakeKeyPlaceholder") + .withApiKey("fakeTokenPlaceholder") .withRequestConfigUserInputValues( Arrays .asList( @@ -78,6 +77,6 @@ public static void connectAnAPIPollingDataConnector( + " Name\",\"placeHolderName\":\"{{placeHolder1}}\",\"placeHolderValue\":\"somePlaceHolderValue\",\"requestObjectKey\":\"apiEndpoint\"}", Object.class, SerializerEncoding.JSON))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java index 8a4b352fb2740..744b12cae555f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.Availability; import com.azure.resourcemanager.securityinsights.models.AvailabilityStatus; @@ -28,6 +27,15 @@ import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Dynamics365DataConnectorDataTypesDynamics365CdsActivities; import com.azure.resourcemanager.securityinsights.models.InstructionStepsInstructionsItem; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionConnectorDataTypesLogs; +import com.azure.resourcemanager.securityinsights.models.MicrosoftPurviewInformationProtectionDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnector; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypes; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesAlerts; +import com.azure.resourcemanager.securityinsights.models.MtpDataConnectorDataTypesIncidents; +import com.azure.resourcemanager.securityinsights.models.MtpFilteredProviders; +import com.azure.resourcemanager.securityinsights.models.MtpProvider; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypes; import com.azure.resourcemanager.securityinsights.models.Office365ProjectConnectorDataTypesLogs; import com.azure.resourcemanager.securityinsights.models.Office365ProjectDataConnector; @@ -60,7 +68,34 @@ /** Samples for DataConnectors CreateOrUpdate. */ public final class DataConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MicrosoftPurviewInformationProtectionDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MicrosoftPurviewInformationProtectionConnectorDataTypes() + .withLogs( + new MicrosoftPurviewInformationProtectionConnectorDataTypesLogs() + .withState(DataTypeState.ENABLED))) + .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOfficeDataConnetor.json */ /** * Sample code: Creates or updates an Office365 data connector. @@ -84,11 +119,40 @@ public static void createsOrUpdatesAnOffice365DataConnector( new OfficeDataConnectorDataTypesSharePoint().withState(DataTypeState.ENABLED)) .withTeams(new OfficeDataConnectorDataTypesTeams().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateMicrosoftThreatProtectionDataConnetor.json + */ + /** + * Sample code: Creates or updates a MicrosoftThreatProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsOrUpdatesAMicrosoftThreatProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .createOrUpdateWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + new MtpDataConnector() + .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withDataTypes( + new MtpDataConnectorDataTypes() + .withIncidents(new MtpDataConnectorDataTypesIncidents().withState(DataTypeState.DISABLED)) + .withAlerts(new MtpDataConnectorDataTypesAlerts().withState(DataTypeState.ENABLED))) + .withFilteredProviders( + new MtpFilteredProviders() + .withAlerts(Arrays.asList(MtpProvider.MICROSOFT_DEFENDER_FOR_CLOUD_APPS))) + .withTenantId("178265c4-3136-4ff6-8ed1-b5b62b4cb5f5"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOfficePowerBIDataConnector.json */ /** * Sample code: Creates or updates an Office PowerBI data connector. @@ -109,11 +173,11 @@ public static void createsOrUpdatesAnOfficePowerBIDataConnector( new OfficePowerBIConnectorDataTypes() .withLogs(new OfficePowerBIConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateThreatIntelligenceTaxiiDataConnector.json */ /** * Sample code: Creates or updates a Threat Intelligence Taxii data connector. @@ -135,7 +199,7 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( .withTaxiiServer("https://limo.anomali.com/api/v1/taxii2/feeds") .withCollectionId("135") .withUsername("--") - .withPassword("--") + .withPassword("fakeTokenPlaceholder") .withTaxiiLookbackPeriod(OffsetDateTime.parse("2020-01-01T13:00:30.123Z")) .withPollingFrequency(PollingFrequency.ONCE_ADAY) .withDataTypes( @@ -143,11 +207,11 @@ public static void createsOrUpdatesAThreatIntelligenceTaxiiDataConnector( .withTaxiiClient( new TiTaxiiDataConnectorDataTypesTaxiiClient().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateThreatIntelligenceDataConnector.json */ /** * Sample code: Creates or updates an Threat Intelligence Platform data connector. @@ -168,11 +232,11 @@ public static void createsOrUpdatesAnThreatIntelligencePlatformDataConnector( new TIDataConnectorDataTypes() .withIndicators(new TIDataConnectorDataTypesIndicators().withState(DataTypeState.ENABLED))) .withTenantId("06b3ccb8-1384-4bcc-aec7-852f6d57161b"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateDynamics365DataConnetor.json */ /** * Sample code: Creates or updates a Dynamics365 data connector. @@ -195,11 +259,11 @@ public static void createsOrUpdatesADynamics365DataConnector( new Dynamics365DataConnectorDataTypesDynamics365CdsActivities() .withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateGenericUI.json */ /** * Sample code: Creates or updates a GenericUI data connector. @@ -515,11 +579,11 @@ public static void createsOrUpdatesAGenericUIDataConnector( + "> NOTE: If a longer timeout duration is required, consider" + " upgrading to an [App Service" + " Plan](https://docs.microsoft.com/azure/azure-functions/functions-scale#timeout)")))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateOffice365ProjectDataConnetor.json */ /** * Sample code: Creates or updates an Office365 Project data connector. @@ -540,11 +604,11 @@ public static void createsOrUpdatesAnOffice365ProjectDataConnector( new Office365ProjectConnectorDataTypes() .withLogs(new Office365ProjectConnectorDataTypesLogs().withState(DataTypeState.ENABLED))) .withTenantId("2070ecc9-b4d5-4ae4-adaa-936fa1954fa8"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/CreateAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/CreateAPIPolling.json */ /** * Sample code: Creates or updates a APIPolling data connector. @@ -652,8 +716,8 @@ public static void createsOrUpdatesAAPIPollingDataConnector( .withAuth( new CodelessConnectorPollingAuthProperties() .withAuthType("APIKey") - .withApiKeyName("Authorization") - .withApiKeyIdentifier("token")) + .withApiKeyName("fakeTokenPlaceholder") + .withApiKeyIdentifier("fakeTokenPlaceholder")) .withRequest( new CodelessConnectorPollingRequestProperties() .withApiEndpoint("https://api.github.com/organizations/{{placeHolder1}}/audit-log") @@ -684,6 +748,6 @@ public static void createsOrUpdatesAAPIPollingDataConnector( .withResponse( new CodelessConnectorPollingResponseProperties() .withEventsJsonPaths(Arrays.asList("$")))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java index 54ce6d4bb0bc2..501dbce005257 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Delete. */ public final class DataConnectorsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOffice365ProjectDataConnetor.json */ /** * Sample code: Delete an Office365 Project data connector. @@ -20,11 +18,28 @@ public static void deleteAnOffice365ProjectDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteMicrosoftPurviewInformationProtectionDataConnetor.json + */ + /** + * Sample code: Delete an MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void deleteAnMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteGenericUI.json */ /** * Sample code: Delete a GenericUI data connector. @@ -35,11 +50,12 @@ public static void deleteAGenericUIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOfficeDataConnetor.json */ /** * Sample code: Delete an Office365 data connector. @@ -50,11 +66,12 @@ public static void deleteAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteOfficePowerBIDataConnetor.json */ /** * Sample code: Delete an Office PowerBI data connector. @@ -65,11 +82,12 @@ public static void deleteAnOfficePowerBIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DeleteAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DeleteAPIPolling.json */ /** * Sample code: Delete a APIPolling data connector. @@ -80,6 +98,7 @@ public static void deleteAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .deleteWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java index b9727cf73d26c..80a3d8541a176 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsDisconnectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Disconnect. */ public final class DataConnectorsDisconnectSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/DisconnectAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/DisconnectAPIPolling.json */ /** * Sample code: Disconnect an APIPolling data connector. @@ -20,6 +18,7 @@ public static void disconnectAnAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .disconnectWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .disconnectWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java index 4e229927f6b95..9640a0ea4d27e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors Get. */ public final class DataConnectorsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOffice365ProjectDataConnetorById.json */ /** * Sample code: Get an Office365 Project data connector. @@ -20,11 +18,12 @@ public static void getAnOffice365ProjectDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetGenericUI.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetGenericUI.json */ /** * Sample code: Get a GenericUI data connector. @@ -35,11 +34,12 @@ public static void getAGenericUIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOffice365AdvancedThreatProtectionById.json */ /** * Sample code: Get an Office ATP data connector. @@ -50,11 +50,12 @@ public static void getAnOfficeATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetIoTById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetIoTById.json */ /** * Sample code: Get a IoT data connector. @@ -65,11 +66,12 @@ public static void getAIoTDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "d2e5dc7a-f3a2-429d-954b-939fa8c2932e", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftCloudAppSecurityById.json */ /** * Sample code: Get a MCAS data connector. @@ -80,11 +82,12 @@ public static void getAMCASDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "b96d014d-b5c2-4a01-9aba-a8058f629d42", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetThreatIntelligenceTaxiiById.json */ /** * Sample code: Get a TI Taxii data connector. @@ -95,11 +98,12 @@ public static void getATITaxiiDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c39bb458-02a7-4b3f-b0c8-71a1d2692652", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftThreatIntelligenceById.json */ /** * Sample code: Get a MicrosoftThreatIntelligence data connector. @@ -110,11 +114,12 @@ public static void getAMicrosoftThreatIntelligenceDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureSecurityCenterById.json */ /** * Sample code: Get a ASC data connector. @@ -125,11 +130,12 @@ public static void getAASCDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "763f9fa1-c2d3-4fa2-93e9-bccd4899aa12", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetThreatIntelligenceById.json */ /** * Sample code: Get a TI data connector. @@ -139,11 +145,12 @@ public static void getAASCDataConnector( public static void getATIDataConnector(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAmazonWebServicesCloudTrailById.json */ /** * Sample code: Get an AwsCloudTrail data connector. @@ -154,11 +161,12 @@ public static void getAnAwsCloudTrailDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftDefenderAdvancedThreatProtectionById.json */ /** * Sample code: Get a MDATP data connector. @@ -169,11 +177,12 @@ public static void getAMDATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "06b3ccb8-1384-4bcc-aec7-852f6d57161b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftThreatProtectionById.json */ /** * Sample code: Get a MicrosoftThreatProtection data connector. @@ -184,11 +193,12 @@ public static void getAMicrosoftThreatProtectionDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c345bf40-8509-4ed2-b947-50cb773aaf04", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureActiveDirectoryById.json */ /** * Sample code: Get an AAD data connector. @@ -199,11 +209,28 @@ public static void getAnAADDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "f0cd27d2-5f03-4c06-ba31-d2dc82dcb51d", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftPurviewInformationProtectionDataConnetorById.json + */ + /** + * Sample code: Get a MicrosoftPurviewInformationProtection data connector. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getAMicrosoftPurviewInformationProtectionDataConnector( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .dataConnectors() + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAzureAdvancedThreatProtectionById.json */ /** * Sample code: Get an AATP data connector. @@ -214,11 +241,12 @@ public static void getAnAATPDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07e42cb3-e658-4e90-801c-efa0f29d3d44", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAPIPolling.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAPIPolling.json */ /** * Sample code: Get a APIPolling data connector. @@ -229,11 +257,12 @@ public static void getAAPIPollingDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "316ec55e-7138-4d63-ab18-90c8a60fd1c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetMicrosoftInsiderRiskManagementById.json */ /** * Sample code: Get an Office IRM data connector. @@ -244,11 +273,12 @@ public static void getAnOfficeIRMDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "3d3e955e-33eb-401d-89a7-251c81ddd660", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetDynamics365DataConnectorById.json */ /** * Sample code: Get a Dynamics365 data connector. @@ -259,11 +289,12 @@ public static void getADynamics365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "c2541efb-c9a6-47fe-9501-87d1017d1512", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOfficeDataConnetorById.json */ /** * Sample code: Get an Office365 data connector. @@ -274,11 +305,12 @@ public static void getAnOffice365DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetAmazonWebServicesS3ById.json */ /** * Sample code: Get an Aws S3 data connector. @@ -289,11 +321,12 @@ public static void getAnAwsS3DataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "afef3743-0c88-469c-84ff-ca2e87dc1e48", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetOfficePowerBIDataConnetorById.json */ /** * Sample code: Get an Office365 PowerBI data connector. @@ -304,6 +337,7 @@ public static void getAnOffice365PowerBIDataConnector( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .dataConnectors() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java index 962a0a285d9ea..e58c96968fec4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DataConnectorsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DataConnectors List. */ public final class DataConnectorsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/dataConnectors/GetDataConnectors.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/dataConnectors/GetDataConnectors.json */ /** * Sample code: Get all data connectors. @@ -18,6 +16,6 @@ public final class DataConnectorsListSamples { */ public static void getAllDataConnectors( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.dataConnectors().list("myRg", "myWorkspace", Context.NONE); + manager.dataConnectors().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java index 0bb699a3decd9..da9faf92b1600 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/DomainWhoisGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for DomainWhois Get. */ public final class DomainWhoisGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetWhoisByDomainName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/enrichment/GetWhoisByDomainName.json */ /** * Sample code: Get whois information for a single domain name. @@ -18,6 +16,6 @@ public final class DomainWhoisGetSamples { */ public static void getWhoisInformationForASingleDomainName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.domainWhois().getWithResponse("myRg", "microsoft.com", Context.NONE); + manager.domainWhois().getWithResponse("myRg", "microsoft.com", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java index c18a6971c4014..309523be2fc57 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesExpandSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityExpandParameters; import java.time.OffsetDateTime; import java.util.UUID; @@ -12,7 +11,7 @@ /** Samples for Entities Expand. */ public final class EntitiesExpandSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/expand/PostExpandEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/expand/PostExpandEntity.json */ /** * Sample code: Expand an entity. @@ -30,6 +29,6 @@ public static void expandAnEntity(com.azure.resourcemanager.securityinsights.Sec .withEndTime(OffsetDateTime.parse("2019-05-26T00:00:00.000Z")) .withExpansionId(UUID.fromString("a77992f3-25e9-4d01-99a4-5ff606cc410a")) .withStartTime(OffsetDateTime.parse("2019-04-25T00:00:00.000Z")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java index 87a4794ab75b7..1d993f407f241 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetInsightsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityGetInsightsParameters; import java.time.OffsetDateTime; import java.util.Arrays; @@ -13,7 +12,7 @@ /** Samples for Entities GetInsights. */ public final class EntitiesGetInsightsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/insights/PostGetInsights.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/insights/PostGetInsights.json */ /** * Sample code: Entity Insight. @@ -32,6 +31,6 @@ public static void entityInsight(com.azure.resourcemanager.securityinsights.Secu .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withAddDefaultExtendedTimeRange(false) .withInsightQueryIds(Arrays.asList(UUID.fromString("cae8d0aa-aa45-4d53-8d88-17dd64ffd4e4"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java index 03835df0aca65..5b3e9183fe601 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Entities Get. */ public final class EntitiesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSubmissionMailEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSubmissionMailEntityById.json */ /** * Sample code: Get a submissionMail entity. @@ -18,11 +16,14 @@ public final class EntitiesGetSamples { */ public static void getASubmissionMailEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetDnsEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetDnsEntityById.json */ /** * Sample code: Get a dns entity. @@ -30,11 +31,14 @@ public static void getASubmissionMailEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "f4e74920-f2c0-4412-a45f-66d94fdf01f8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileHashEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetFileHashEntityById.json */ /** * Sample code: Get a file hash entity. @@ -42,11 +46,14 @@ public static void getADnsEntity(com.azure.resourcemanager.securityinsights.Secu * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "ea359fa6-c1e5-f878-e105-6344f3e399a1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIoTDeviceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetIoTDeviceEntityById.json */ /** * Sample code: Get an IoT device entity. @@ -55,11 +62,14 @@ public static void getAFileHashEntity(com.azure.resourcemanager.securityinsights */ public static void getAnIoTDeviceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryKeyEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetRegistryKeyEntityById.json */ /** * Sample code: Get a registry key entity. @@ -68,11 +78,14 @@ public static void getAnIoTDeviceEntity( */ public static void getARegistryKeyEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailboxEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailboxEntityById.json */ /** * Sample code: Get a mailbox entity. @@ -80,11 +93,14 @@ public static void getARegistryKeyEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMalwareEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMalwareEntityById.json */ /** * Sample code: Get a malware entity. @@ -92,11 +108,14 @@ public static void getAMailboxEntity(com.azure.resourcemanager.securityinsights. * @param manager Entry point to SecurityInsightsManager. */ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityAlertEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSecurityAlertEntityById.json */ /** * Sample code: Get a security alert entity. @@ -105,11 +124,14 @@ public static void getAMalwareEntity(com.azure.resourcemanager.securityinsights. */ public static void getASecurityAlertEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "4aa486e0-6f85-41af-99ea-7acdce7be6c8", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetIpEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetIpEntityById.json */ /** * Sample code: Get an ip entity. @@ -117,11 +139,14 @@ public static void getASecurityAlertEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAccountEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetAccountEntityById.json */ /** * Sample code: Get an account entity. @@ -129,11 +154,14 @@ public static void getAnIpEntity(com.azure.resourcemanager.securityinsights.Secu * @param manager Entry point to SecurityInsightsManager. */ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetCloudApplicationEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetCloudApplicationEntityById.json */ /** * Sample code: Get a cloud application entity. @@ -142,11 +170,14 @@ public static void getAnAccountEntity(com.azure.resourcemanager.securityinsights */ public static void getACloudApplicationEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetFileEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetFileEntityById.json */ /** * Sample code: Get a file entity. @@ -154,11 +185,14 @@ public static void getACloudApplicationEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "af378b21-b4aa-4fe7-bc70-13f8621a322f", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetRegistryValueEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetRegistryValueEntityById.json */ /** * Sample code: Get a registry value entity. @@ -167,11 +201,14 @@ public static void getAFileEntity(com.azure.resourcemanager.securityinsights.Sec */ public static void getARegistryValueEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "dc44bd11-b348-4d76-ad29-37bf7aa41356", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetUrlEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetUrlEntityById.json */ /** * Sample code: Get a url entity. @@ -179,11 +216,14 @@ public static void getARegistryValueEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailClusterEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailClusterEntityById.json */ /** * Sample code: Get a mailCluster entity. @@ -192,11 +232,14 @@ public static void getAUrlEntity(com.azure.resourcemanager.securityinsights.Secu */ public static void getAMailClusterEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetSecurityGroupEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetSecurityGroupEntityById.json */ /** * Sample code: Get a security group entity. @@ -205,11 +248,14 @@ public static void getAMailClusterEntity( */ public static void getASecurityGroupEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetMailMessageEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetMailMessageEntityById.json */ /** * Sample code: Get a mailMessage entity. @@ -218,11 +264,14 @@ public static void getASecurityGroupEntity( */ public static void getAMailMessageEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetAzureResourceEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetAzureResourceEntityById.json */ /** * Sample code: Get an azure resource entity. @@ -231,11 +280,14 @@ public static void getAMailMessageEntity( */ public static void getAnAzureResourceEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetHostEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetHostEntityById.json */ /** * Sample code: Get a host entity. @@ -243,11 +295,14 @@ public static void getAnAzureResourceEntity( * @param manager Entry point to SecurityInsightsManager. */ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetProcessEntityById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetProcessEntityById.json */ /** * Sample code: Get a process entity. @@ -255,6 +310,9 @@ public static void getAHostEntity(com.azure.resourcemanager.securityinsights.Sec * @param manager Entry point to SecurityInsightsManager. */ public static void getAProcessEntity(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().getWithResponse("myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", Context.NONE); + manager + .entities() + .getWithResponse( + "myRg", "myWorkspace", "7264685c-038c-42c6-948c-38e14ef1fb98", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java index 660a3055de2e1..c6bf045fcc01e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesGetTimelineListSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityTimelineParameters; import java.time.OffsetDateTime; /** Samples for EntitiesGetTimeline List. */ public final class EntitiesGetTimelineListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/timeline/PostTimelineEntity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/timeline/PostTimelineEntity.json */ /** * Sample code: Entity timeline. @@ -29,6 +28,6 @@ public static void entityTimeline(com.azure.resourcemanager.securityinsights.Sec .withStartTime(OffsetDateTime.parse("2021-09-01T00:00:00.000Z")) .withEndTime(OffsetDateTime.parse("2021-10-01T00:00:00.000Z")) .withNumberOfBucket(4), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java index 76d03c4060947..c0778bb25a940 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Entities List. */ public final class EntitiesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetEntities.json */ /** * Sample code: Get all entities. @@ -17,6 +15,6 @@ public final class EntitiesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntities(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entities().list("myRg", "myWorkspace", Context.NONE); + manager.entities().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java index a07e0a7b42bda..1593a914757ce 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesQueriesSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityItemQueryKind; /** Samples for Entities Queries. */ public final class EntitiesQueriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/GetQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/GetQueries.json */ /** * Sample code: Get Entity Query. @@ -25,6 +24,6 @@ public static void getEntityQuery(com.azure.resourcemanager.securityinsights.Sec "myWorkspace", "e1d3d618-e11f-478b-98e3-bb381539a8e1", EntityItemQueryKind.INSIGHT, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java index 49db6e77c5cc4..8da972d21c48f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntitiesRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntitiesRelations List. */ public final class EntitiesRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetAllEntityRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/relations/GetAllEntityRelations.json */ /** * Sample code: Get all relations of an entity. @@ -20,6 +18,14 @@ public static void getAllRelationsOfAnEntity( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entitiesRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java index 719027f633537..934a44e1ef49f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ActivityCustomEntityQuery; import com.azure.resourcemanager.securityinsights.models.ActivityEntityQueriesPropertiesQueryDefinitions; import com.azure.resourcemanager.securityinsights.models.EntityType; @@ -15,7 +14,7 @@ /** Samples for EntityQueries CreateOrUpdate. */ public final class EntityQueriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/CreateEntityQueryActivity.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/CreateEntityQueryActivity.json */ /** * Sample code: Creates or updates an Activity entity query. @@ -85,7 +84,7 @@ public static void createsOrUpdatesAnActivityEntityQuery( Arrays.asList("Host_OMSAgentID"))) .withEntitiesFilter(mapOf("Host_OsFamily", Arrays.asList("Windows"))) .withEnabled(true), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java index 9ca8ca1c39648..56a8ce7d6f681 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueries Delete. */ public final class EntityQueriesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/DeleteEntityQuery.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/DeleteEntityQuery.json */ /** * Sample code: Delete an entity query. @@ -19,6 +17,7 @@ public final class EntityQueriesDeleteSamples { public static void deleteAnEntityQuery(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .deleteWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java index c5ddd58221cf6..e6d89ba876bba 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueries Get. */ public final class EntityQueriesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetActivityEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetActivityEntityQueryById.json */ /** * Sample code: Get an Activity entity query. @@ -20,11 +18,12 @@ public static void getAnActivityEntityQuery( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetExpansionEntityQueryById.json */ /** * Sample code: Get an Expansion entity query. @@ -35,6 +34,7 @@ public static void getAnExpansionEntityQuery( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueries() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java index 3f319789b3675..773fa3aeabfe7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueriesListSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EntityQueriesKind; /** Samples for EntityQueries List. */ public final class EntityQueriesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueries/GetEntityQueries.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueries/GetEntityQueries.json */ /** * Sample code: Get all entity queries. @@ -18,6 +17,8 @@ public final class EntityQueriesListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllEntityQueries(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueries().list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, Context.NONE); + manager + .entityQueries() + .list("myRg", "myWorkspace", EntityQueriesKind.EXPANSION, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java index 8e1290833c7a6..6a3ac566541f4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityQueryTemplates Get. */ public final class EntityQueryTemplatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueryTemplates/GetActivityEntityQueryTemplateById.json */ /** * Sample code: Get an Activity entity query template. @@ -20,6 +18,7 @@ public static void getAnActivityEntityQueryTemplate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .entityQueryTemplates() - .getWithResponse("myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "07da3cc8-c8ad-4710-a44e-334cdcb7882b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java index 4648fd151d8b9..a2bdd8d85270c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityQueryTemplatesListSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.Constant88; +import com.azure.resourcemanager.securityinsights.models.Constant96; /** Samples for EntityQueryTemplates List. */ public final class EntityQueryTemplatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entityQueryTemplates/GetEntityQueryTemplates.json */ /** * Sample code: Get all entity query templates. @@ -19,6 +18,8 @@ public final class EntityQueryTemplatesListSamples { */ public static void getAllEntityQueryTemplates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.entityQueryTemplates().list("myRg", "myWorkspace", Constant88.ACTIVITY, Context.NONE); + manager + .entityQueryTemplates() + .list("myRg", "myWorkspace", Constant96.ACTIVITY, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java index de44787f195e4..bc5abba4d79be 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/EntityRelationsGetRelationSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for EntityRelations GetRelation. */ public final class EntityRelationsGetRelationSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/entities/relations/GetEntityRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/entities/relations/GetEntityRelationByName.json */ /** * Sample code: Get an entity relation. @@ -24,6 +22,6 @@ public static void getAnEntityRelation(com.azure.resourcemanager.securityinsight "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java index a839ca483bbc9..0374434ff0412 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for FileImports Create. */ public final class FileImportsCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/CreateFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/CreateFileImport.json */ /** * Sample code: Create a file import. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java index 6e961ca4a8bdb..330e3bb1e22ad 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports Delete. */ public final class FileImportsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/DeleteFileImport.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/DeleteFileImport.json */ /** * Sample code: Delete a file import. @@ -17,6 +15,8 @@ public final class FileImportsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.fileImports().delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + manager + .fileImports() + .delete("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java index cf0ff15ffb5b4..22799bc0b7a32 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports Get. */ public final class FileImportsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImportById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/GetFileImportById.json */ /** * Sample code: Get a file import. @@ -19,6 +17,7 @@ public final class FileImportsGetSamples { public static void getAFileImport(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java index 4f080eb0b16ce..265bcbf3e7c66 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/FileImportsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for FileImports List. */ public final class FileImportsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/fileImports/GetFileImports.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/fileImports/GetFileImports.json */ /** * Sample code: Get all file imports. @@ -19,6 +17,13 @@ public final class FileImportsListSamples { public static void getAllFileImports(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .fileImports() - .list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java new file mode 100644 index 0000000000000..0bd5605f5cbc1 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetRecommendationsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for GetRecommendations List. */ +public final class GetRecommendationsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/GetRecommendations.json + */ + /** + * Sample code: Get Recommendations list. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getRecommendationsList( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getRecommendations().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java new file mode 100644 index 0000000000000..d2f1dd1b3780b --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetSingleRecommendationSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import java.util.UUID; + +/** Samples for Get SingleRecommendation. */ +public final class GetSingleRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/GetRecommendation.json + */ + /** + * Sample code: Get a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void getARecommendation(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .gets() + .singleRecommendationWithResponse( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java new file mode 100644 index 0000000000000..ef6d2a1a94c13 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/GetTriggeredAnalyticsRuleRunsListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for GetTriggeredAnalyticsRuleRuns List. */ +public final class GetTriggeredAnalyticsRuleRunsListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRuns_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRuns_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunsGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager.getTriggeredAnalyticsRuleRuns().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java index 8a16e508a98f1..7245a0274e545 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsCreateOrUpdateSamples.java @@ -7,14 +7,14 @@ /** Samples for IncidentComments CreateOrUpdate. */ public final class IncidentCommentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/CreateIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident comment. + * Sample code: IncidentComments_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncidentComment( + public static void incidentCommentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java index ab58f3db35c55..0e65935526d98 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsDeleteSamples.java @@ -4,19 +4,17 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Delete. */ public final class IncidentCommentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/DeleteIncidentComment.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_Delete.json */ /** - * Sample code: Delete the incident comment. + * Sample code: IncidentComments_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteTheIncidentComment( + public static void incidentCommentsDelete( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() @@ -25,6 +23,6 @@ public static void deleteTheIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java index b0cc0dbe7c41d..9bad60dfffa26 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsGetSamples.java @@ -4,20 +4,17 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments Get. */ public final class IncidentCommentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetIncidentCommentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_Get.json */ /** - * Sample code: Get an incident comment. + * Sample code: IncidentComments_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncidentComment( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentCommentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() .getWithResponse( @@ -25,6 +22,6 @@ public static void getAnIncidentComment( "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java index 3bdb6e55cdb50..e4e9a45a9439f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentCommentsListSamples.java @@ -4,22 +4,28 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentComments List. */ public final class IncidentCommentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/comments/GetAllIncidentComments.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentComments/IncidentComments_List.json */ /** - * Sample code: Get all incident comments. + * Sample code: IncidentComments_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentComments( + public static void incidentCommentsList( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentComments() - .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java index 4b99d62695e0c..131ce48c0ceda 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsCreateOrUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner; /** Samples for IncidentRelations CreateOrUpdate. */ public final class IncidentRelationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/CreateIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/CreateIncidentRelation.json */ /** * Sample code: Creates or updates an incident relation. @@ -29,6 +28,6 @@ public static void createsOrUpdatesAnIncidentRelation( new RelationInner() .withRelatedResourceId( "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/bookmarks/2216d0e1-91e3-4902-89fd-d2df8c535096"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java index e9f0630456b0b..c077d04bdede5 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Delete. */ public final class IncidentRelationsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/DeleteIncidentRelation.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/DeleteIncidentRelation.json */ /** * Sample code: Delete the incident relation. @@ -25,6 +23,6 @@ public static void deleteTheIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java index 9ca14fce1f49f..99832929f87c8 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations Get. */ public final class IncidentRelationsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetIncidentRelationByName.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/GetIncidentRelationByName.json */ /** * Sample code: Get an incident relation. @@ -25,6 +23,6 @@ public static void getAnIncidentRelation( "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java index 223b77dfe78f9..30c2145b206c9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentRelationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IncidentRelations List. */ public final class IncidentRelationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/relations/GetAllIncidentRelations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/relations/GetAllIncidentRelations.json */ /** * Sample code: Get all incident relations. @@ -20,6 +18,14 @@ public static void getAllIncidentRelations( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidentRelations() - .list("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", null, null, null, null, Context.NONE); + .list( + "myRg", + "myWorkspace", + "afbd324f-6c48-459c-8710-8d1e1cd03812", + null, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..6bc24f8cb0792 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.IncidentTaskStatus; + +/** Samples for IncidentTasks CreateOrUpdate. */ +public final class IncidentTasksCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_CreateOrUpdate.json + */ + /** + * Sample code: IncidentTasks_CreateOrUpdate. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksCreateOrUpdate( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .define("4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014") + .withExistingIncident("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5") + .withTitle("Task title") + .withStatus(IncidentTaskStatus.NEW) + .withDescription("Task description") + .create(); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java new file mode 100644 index 0000000000000..15d4ebffdd830 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksDeleteSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks Delete. */ +public final class IncidentTasksDeleteSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Delete.json + */ + /** + * Sample code: IncidentTasks_Delete. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .deleteWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java new file mode 100644 index 0000000000000..e1ebc19249655 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksGetSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks Get. */ +public final class IncidentTasksGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_Get.json + */ + /** + * Sample code: IncidentTasks_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .getWithResponse( + "myRg", + "myWorkspace", + "73e01a99-5cd7-4139-a149-9f2736ff2ab5", + "4bb36b7b-26ff-4d1c-9cbe-0d8ab3da0014", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java new file mode 100644 index 0000000000000..3299c92c24d6d --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentTasksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for IncidentTasks List. */ +public final class IncidentTasksListSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTasks/IncidentTasks_List.json + */ + /** + * Sample code: IncidentTasks_List. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void incidentTasksList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidentTasks() + .list("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java index fac6451584936..04aabb246c675 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateOrUpdateSamples.java @@ -15,30 +15,30 @@ /** Samples for Incidents CreateOrUpdate. */ public final class IncidentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_CreateOrUpdate.json */ /** - * Sample code: Creates or updates an incident. + * Sample code: Incidents_CreateOrUpdate. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsOrUpdatesAnIncident( + public static void incidentsCreateOrUpdate( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .define("73e01a99-5cd7-4139-a149-9f2736ff2ab5") .withExistingWorkspace("myRg", "myWorkspace") .withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\"") + .withTitle("My incident") + .withDescription("This is a demo incident") + .withSeverity(IncidentSeverity.HIGH) + .withStatus(IncidentStatus.CLOSED) .withClassification(IncidentClassification.FALSE_POSITIVE) + .withClassificationReason(IncidentClassificationReason.INACCURATE_DATA) .withClassificationComment("Not a malicious activity") - .withClassificationReason(IncidentClassificationReason.INCORRECT_ALERT_LOGIC) - .withDescription("This is a demo incident") + .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) .withFirstActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:00:30Z")) .withLastActivityTimeUtc(OffsetDateTime.parse("2019-01-01T13:05:30Z")) - .withOwner(new IncidentOwnerInfo().withObjectId(UUID.fromString("2046feea-040d-4a46-9e2b-91c2941bfa70"))) - .withSeverity(IncidentSeverity.HIGH) - .withStatus(IncidentStatus.CLOSED) - .withTitle("My incident") .create(); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java index 1d10ad7288690..a04ba57b8ff0e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsCreateTeamSamples.java @@ -4,28 +4,26 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.securityinsights.models.TeamProperties; +import com.azure.resourcemanager.securityinsights.fluent.models.TeamInformationInner; /** Samples for Incidents CreateTeam. */ public final class IncidentsCreateTeamSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/CreateTeam.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentTeam/Incidents_CreateTeam.json */ /** - * Sample code: Creates incident teams group. + * Sample code: Incidents_CreateTeam. * * @param manager Entry point to SecurityInsightsManager. */ - public static void createsIncidentTeamsGroup( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsCreateTeam(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() .createTeamWithResponse( - "ambawolvese5resourcegroup", - "AmbaE5WestCentralUS", + "myRg", + "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", - new TeamProperties().withTeamName("Team name").withTeamDescription("Team description"), - Context.NONE); + new TeamInformationInner(), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java index 7213c317f62f1..fe9739307ebc7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsDeleteSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Delete. */ public final class IncidentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/DeleteIncident.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_Delete.json */ /** - * Sample code: Delete an incident. + * Sample code: Incidents_Delete. * * @param manager Entry point to SecurityInsightsManager. */ - public static void deleteAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsDelete(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .deleteWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java index aaebebca140b2..395b0096187ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsGetSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents Get. */ public final class IncidentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidentById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_Get.json */ /** - * Sample code: Get an incident. + * Sample code: Incidents_Get. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAnIncident(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsGet(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .getWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ab5", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java index 521cc7b9a7eaa..0da110eda57f4 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListAlertsSamples.java @@ -4,22 +4,20 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListAlerts. */ public final class IncidentsListAlertsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentAlerts.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentAlerts/Incidents_ListAlerts.json */ /** - * Sample code: Get all incident alerts. + * Sample code: Incidents_ListAlerts. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentAlerts( - com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + public static void incidentsListAlerts(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listAlertsWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listAlertsWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java index 396a34e22e023..cbdf83bb0f8fd 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListBookmarksSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListBookmarks. */ public final class IncidentsListBookmarksSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetAllIncidentBookmarks.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentBookmarks/Incidents_ListBookmarks.json */ /** - * Sample code: Get all incident bookmarks. + * Sample code: Incidents_ListBookmarks. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidentBookmarks( + public static void incidentsListBookmarks( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listBookmarksWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listBookmarksWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java index 05dac3dfd2326..2adbbdd9d0325 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListEntitiesSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents ListEntities. */ public final class IncidentsListEntitiesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/entities/GetAllIncidentEntities.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/IncidentEntities/Incidents_ListEntities.json */ /** - * Sample code: Gets all incident related entities. + * Sample code: Incidents_ListEntities. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getsAllIncidentRelatedEntities( + public static void incidentsListEntities( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .listEntitiesWithResponse("myRg", "myWorkspace", "afbd324f-6c48-459c-8710-8d1e1cd03812", Context.NONE); + .listEntitiesWithResponse( + "myRg", "myWorkspace", "69a30280-6a4c-4aa7-9af0-5d63f335d600", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java index 12ee00a614f64..d1fdba00cc998 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsListSamples.java @@ -4,19 +4,26 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents List. */ public final class IncidentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/incidents/GetIncidents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/incidents/Incidents_List.json */ /** - * Sample code: Get all incidents. + * Sample code: Incidents_List. * * @param manager Entry point to SecurityInsightsManager. */ - public static void getAllIncidents(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.incidents().list("myRg", "myWorkspace", null, "properties/createdTimeUtc desc", 1, null, Context.NONE); + public static void incidentsList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .incidents() + .list( + "myRg", + "myWorkspace", + null, + "properties/createdTimeUtc desc", + 1, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java index 8aff9771734bc..7844540c408ef 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IncidentsRunPlaybookSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Incidents RunPlaybook. */ public final class IncidentsRunPlaybookSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/manualTrigger/Incidents_RunPlaybook.json */ /** * Sample code: Incidents_RunPlaybook. @@ -20,6 +18,7 @@ public static void incidentsRunPlaybook( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .incidents() - .runPlaybookWithResponse("myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, Context.NONE); + .runPlaybookWithResponse( + "myRg", "myWorkspace", "73e01a99-5cd7-4139-a149-9f2736ff2ar4", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java index 4c5af0fbd9f2e..53bd4aa9ce4cc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/IpGeodataGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for IpGeodata Get. */ public final class IpGeodataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/enrichment/GetGeodataByIp.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/enrichment/GetGeodataByIp.json */ /** * Sample code: Get geodata for a single IP address. @@ -18,6 +16,6 @@ public final class IpGeodataGetSamples { */ public static void getGeodataForASingleIPAddress( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", Context.NONE); + manager.ipGeodatas().getWithResponse("myRg", "1.2.3.4", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java index 2e1c2cff2c935..78709f65b9374 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataCreateSamples.java @@ -19,7 +19,7 @@ /** Samples for Metadata Create. */ public final class MetadataCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PutMetadata.json */ /** * Sample code: Create/update full metadata. @@ -95,7 +95,7 @@ public static void createUpdateFullMetadata( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PutMetadataMinimal.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PutMetadataMinimal.json */ /** * Sample code: Create/update minimal metadata. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java index 83b191e5ca95f..b4ae5c10a7254 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Delete. */ public final class MetadataDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/DeleteMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/DeleteMetadata.json */ /** * Sample code: Delete metadata. @@ -17,6 +15,6 @@ public final class MetadataDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().deleteWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java index 9d738dafd0858..78a8587f2733e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata Get. */ public final class MetadataGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetMetadata.json */ /** * Sample code: Get single metadata by name. @@ -18,6 +16,6 @@ public final class MetadataGetSamples { */ public static void getSingleMetadataByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE); + manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java index 05d6eb76725f7..c0bda646112b0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Metadata List. */ public final class MetadataListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetAllMetadata.json */ /** * Sample code: Get all metadata. @@ -17,11 +15,11 @@ public final class MetadataListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/GetAllMetadataOData.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/GetAllMetadataOData.json */ /** * Sample code: Get all metadata with OData filter/orderby/skip/top. @@ -30,6 +28,6 @@ public static void getAllMetadata(com.azure.resourcemanager.securityinsights.Sec */ public static void getAllMetadataWithODataFilterOrderbySkipTop( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + manager.metadatas().list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java index 91f5be55253b7..3503c14da52ff 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/MetadataUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.MetadataAuthor; import com.azure.resourcemanager.securityinsights.models.MetadataModel; /** Samples for Metadata Update. */ public final class MetadataUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/metadata/PatchMetadata.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/metadata/PatchMetadata.json */ /** * Sample code: Update metadata. @@ -20,7 +19,10 @@ public final class MetadataUpdateSamples { */ public static void updateMetadata(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { MetadataModel resource = - manager.metadatas().getWithResponse("myRg", "myWorkspace", "metadataName", Context.NONE).getValue(); + manager + .metadatas() + .getWithResponse("myRg", "myWorkspace", "metadataName", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withAuthor(new MetadataAuthor().withName("User Name").withEmail("email@microsoft.com")) diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java index 83381c6ff0914..01c2eabf876dc 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents Delete. */ public final class OfficeConsentsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/DeleteOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/DeleteOfficeConsents.json */ /** * Sample code: Delete an office consent. @@ -20,6 +18,7 @@ public static void deleteAnOfficeConsent( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .deleteWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java index 82ebecfad7426..3e90fdbb33d05 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents Get. */ public final class OfficeConsentsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsentsById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/GetOfficeConsentsById.json */ /** * Sample code: Get an office consent. @@ -19,6 +17,7 @@ public final class OfficeConsentsGetSamples { public static void getAnOfficeConsent(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .officeConsents() - .getWithResponse("myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "04e5fd05-ff86-4b97-b8d2-1c20933cb46c", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java index bff20163b14d3..ad60ae61f00e1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OfficeConsentsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for OfficeConsents List. */ public final class OfficeConsentsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/officeConsents/GetOfficeConsents.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/officeConsents/GetOfficeConsents.json */ /** * Sample code: Get all office consents. @@ -18,6 +16,6 @@ public final class OfficeConsentsListSamples { */ public static void getAllOfficeConsents( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.officeConsents().list("myRg", "myWorkspace", Context.NONE); + manager.officeConsents().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java index bd9e0689a55d5..4198431710bf0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/operations/ListOperations.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/operations/ListOperations.json */ /** * Sample code: Get all operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllOperations(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java index 9b87891b4ad72..a903aff2c0768 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings Delete. */ public final class ProductSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/DeleteEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/DeleteEyesOnSetting.json */ /** * Sample code: Delete EyesOn settings. @@ -18,6 +16,6 @@ public final class ProductSettingsDeleteSamples { */ public static void deleteEyesOnSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().deleteWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java index c48e37a907739..738e655c19a9c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings Get. */ public final class ProductSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/GetEyesOnSetting.json */ /** * Sample code: Get EyesOn settings. @@ -17,6 +15,6 @@ public final class ProductSettingsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getEyesOnSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", Context.NONE); + manager.productSettings().getWithResponse("myRg", "myWorkspace", "EyesOn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java index e54fd9e369a6e..8da29845e2924 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProductSettings List. */ public final class ProductSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/GetAllSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/GetAllSettings.json */ /** * Sample code: Get all settings. @@ -17,6 +15,6 @@ public final class ProductSettingsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllSettings(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.productSettings().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.productSettings().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java index d84adcba1067b..ff7a30dbaed87 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ProductSettingsUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.EyesOn; /** Samples for ProductSettings Update. */ public final class ProductSettingsUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/settings/UpdateEyesOnSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/settings/UpdateEyesOnSetting.json */ /** * Sample code: Update EyesOn settings. @@ -26,6 +25,6 @@ public static void updateEyesOnSettings( "myWorkspace", "EyesOn", new EyesOn().withEtag("\"0300bf09-0000-0000-0000-5c37296e0000\""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java index 4f4f433d1c48d..cd4a24e14a180 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.securityinsights.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.securityinsights.models.AnomalySecurityMLAnalyticsSettings; import com.azure.resourcemanager.securityinsights.models.AttackTactic; @@ -19,7 +18,7 @@ /** Samples for SecurityMLAnalyticsSettings CreateOrUpdate. */ public final class SecurityMLAnalyticsSettingsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/CreateAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Creates or updates a Anomaly Security ML Analytics Settings. @@ -73,6 +72,6 @@ public static void createsOrUpdatesAAnomalySecurityMLAnalyticsSettings( .withIsDefaultSettings(true) .withAnomalySettingsVersion(0) .withSettingsDefinitionId(UUID.fromString("f209187f-1d17-4431-94af-c141bf5f23db")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java index 5a7fbfb4f91a4..6dcb0e866afef 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Delete. */ public final class SecurityMLAnalyticsSettingsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/DeleteSecurityMLAnalyticsSetting.json */ /** * Sample code: Delete a Security ML Analytics Settings. @@ -20,6 +18,7 @@ public static void deleteASecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .deleteWithResponse("myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "f209187f-1d17-4431-94af-c141bf5f23db", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java index fa8f8cd73f740..0de9dccf0afe7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings Get. */ public final class SecurityMLAnalyticsSettingsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/GetAnomalySecurityMLAnalyticsSetting.json */ /** * Sample code: Get a Anomaly Security ML Analytics Settings. @@ -20,6 +18,6 @@ public static void getAAnomalySecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .securityMLAnalyticsSettings() - .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", Context.NONE); + .getWithResponse("myRg", "myWorkspace", "myFirstAnomalySettings", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java index a8eb1f6d60085..c289d53733336 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SecurityMLAnalyticsSettingsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SecurityMLAnalyticsSettings List. */ public final class SecurityMLAnalyticsSettingsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/securityMLAnalyticsSettings/GetAllSecurityMLAnalyticsSettings.json */ /** * Sample code: Get all Security ML Analytics Settings. @@ -18,6 +16,6 @@ public final class SecurityMLAnalyticsSettingsListSamples { */ public static void getAllSecurityMLAnalyticsSettings( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", Context.NONE); + manager.securityMLAnalyticsSettings().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java index 177a2c21f7abd..1e2255df17d7c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesCreateSamples.java @@ -7,7 +7,7 @@ /** Samples for SentinelOnboardingStates Create. */ public final class SentinelOnboardingStatesCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/CreateSentinelOnboardingState.json */ /** * Sample code: Create Sentinel onboarding state. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java index 73d131daaf987..6f58aef1bdb6c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Delete. */ public final class SentinelOnboardingStatesDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/DeleteSentinelOnboardingState.json */ /** * Sample code: Delete Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesDeleteSamples { */ public static void deleteSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().deleteWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .deleteWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java index 1e61ad09b71bd..7d1f86f5a85b1 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates Get. */ public final class SentinelOnboardingStatesGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/GetSentinelOnboardingState.json */ /** * Sample code: Get Sentinel onboarding state. @@ -18,6 +16,8 @@ public final class SentinelOnboardingStatesGetSamples { */ public static void getSentinelOnboardingState( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().getWithResponse("myRg", "myWorkspace", "default", Context.NONE); + manager + .sentinelOnboardingStates() + .getWithResponse("myRg", "myWorkspace", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java index 089fa7920c926..63c418655a073 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SentinelOnboardingStatesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SentinelOnboardingStates List. */ public final class SentinelOnboardingStatesListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/onboardingStates/GetAllSentinelOnboardingStates.json */ /** * Sample code: Get all Sentinel onboarding states. @@ -18,6 +16,6 @@ public final class SentinelOnboardingStatesListSamples { */ public static void getAllSentinelOnboardingStates( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager.sentinelOnboardingStates().listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java index eedc402653a90..e81d2692ec406 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlListRepositoriesSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.RepoType; /** Samples for SourceControl ListRepositories. */ public final class SourceControlListRepositoriesSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/repositories/GetRepositories.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/repositories/GetRepositories.json */ /** * Sample code: Get repository list. @@ -18,6 +17,8 @@ public final class SourceControlListRepositoriesSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getRepositoryList(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControls().listRepositories("myRg", "myWorkspace", RepoType.GITHUB, Context.NONE); + manager + .sourceControls() + .listRepositories("myRg", "myWorkspace", RepoType.GITHUB, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java index 3981370a4a6fe..98077dd7dc1e3 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationCreateSamples.java @@ -13,7 +13,7 @@ /** Samples for SourceControlsOperation Create. */ public final class SourceControlsOperationCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/CreateSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/CreateSourceControl.json */ /** * Sample code: Creates a source control. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java index 3479bbc73c0d5..752e63b550a7a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Delete. */ public final class SourceControlsOperationDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/DeleteSourceControl.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/DeleteSourceControl.json */ /** * Sample code: Delete a source control. @@ -20,6 +18,7 @@ public static void deleteASourceControl( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .deleteWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java index e311a8036dbac..73ba706e216f2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation Get. */ public final class SourceControlsOperationGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControlById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/GetSourceControlById.json */ /** * Sample code: Get a source control. @@ -19,6 +17,7 @@ public final class SourceControlsOperationGetSamples { public static void getASourceControl(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .sourceControlsOperations() - .getWithResponse("myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "789e0c1f-4a3d-43ad-809c-e713b677b04a", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java index 348b8fabfa696..84ef552a85d6c 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/SourceControlsOperationListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlsOperation List. */ public final class SourceControlsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/sourcecontrols/GetSourceControls.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/sourcecontrols/GetSourceControls.json */ /** * Sample code: Get all source controls. @@ -18,6 +16,6 @@ public final class SourceControlsOperationListSamples { */ public static void getAllSourceControls( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.sourceControlsOperations().list("myRg", "myWorkspace", Context.NONE); + manager.sourceControlsOperations().list("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java index 19453e0a796a1..d582e61f3a980 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorAppendTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceAppendTags; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator AppendTags. */ public final class ThreatIntelligenceIndicatorAppendTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/AppendTagsThreatIntelligence.json */ /** * Sample code: Append tags to a threat intelligence indicator. @@ -27,6 +26,6 @@ public static void appendTagsToAThreatIntelligenceIndicator( "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", new ThreatIntelligenceAppendTags().withThreatIntelligenceTags(Arrays.asList("tag1", "tag2")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java index 1934f75a9e79c..d7889f99ae9e0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateIndicatorSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator CreateIndicator. */ public final class ThreatIntelligenceIndicatorCreateIndicatorSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CreateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/CreateThreatIntelligence.json */ /** * Sample code: Create a new Threat Intelligence. @@ -43,6 +42,6 @@ public static void createANewThreatIntelligence( .withValidFrom("2021-09-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java index 6185703dc8aaa..aa7b68c0b4ab7 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorCreateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator Create. */ public final class ThreatIntelligenceIndicatorCreateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/UpdateThreatIntelligence.json */ /** * Sample code: Update a threat Intelligence indicator. @@ -44,6 +43,6 @@ public static void updateAThreatIntelligenceIndicator( .withValidFrom("2020-04-15T17:44:00.114052Z") .withValidUntil("") .withModified(""), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java index fe4c1fb359c4b..1e0c647af246b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Delete. */ public final class ThreatIntelligenceIndicatorDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/DeleteThreatIntelligence.json */ /** * Sample code: Delete a threat intelligence indicator. @@ -20,6 +18,7 @@ public static void deleteAThreatIntelligenceIndicator( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .deleteWithResponse("myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", Context.NONE); + .deleteWithResponse( + "myRg", "myWorkspace", "d9cd6f0b-96b9-3984-17cd-a779d1e15a93", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java index 73c9f32e24191..1453e8b917345 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicator Get. */ public final class ThreatIntelligenceIndicatorGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/GetThreatIntelligenceById.json */ /** * Sample code: View a threat intelligence indicator by name. @@ -20,6 +18,7 @@ public static void viewAThreatIntelligenceIndicatorByName( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicators() - .getWithResponse("myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", Context.NONE); + .getWithResponse( + "myRg", "myWorkspace", "e16ef847-962e-d7b6-9c8b-a33e4bd30e47", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java index d04ce8551107e..5bc253f65ae4a 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorMetricsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorMetrics List. */ public final class ThreatIntelligenceIndicatorMetricsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/CollectThreatIntelligenceMetrics.json */ /** * Sample code: Get threat intelligence indicators metrics. @@ -18,6 +16,8 @@ public final class ThreatIntelligenceIndicatorMetricsListSamples { */ public static void getThreatIntelligenceIndicatorsMetrics( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.threatIntelligenceIndicatorMetrics().listWithResponse("myRg", "myWorkspace", Context.NONE); + manager + .threatIntelligenceIndicatorMetrics() + .listWithResponse("myRg", "myWorkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java index 487339a28251a..620c548b28085 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorQueryIndicatorsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceFilteringCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteria; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceSortingCriteriaEnum; @@ -13,7 +12,7 @@ /** Samples for ThreatIntelligenceIndicator QueryIndicators. */ public final class ThreatIntelligenceIndicatorQueryIndicatorsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/QueryThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/QueryThreatIntelligence.json */ /** * Sample code: Query threat intelligence indicators as per filtering criteria. @@ -37,9 +36,9 @@ public static void queryThreatIntelligenceIndicatorsAsPerFilteringCriteria( Arrays .asList( new ThreatIntelligenceSortingCriteria() - .withItemKey("lastUpdatedTimeUtc") + .withItemKey("fakeTokenPlaceholder") .withSortOrder(ThreatIntelligenceSortingCriteriaEnum.DESCENDING))) .withSources(Arrays.asList("Azure Sentinel")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java index 96e9c364d8e4a..1b4892500f4ca 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorReplaceTagsSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.securityinsights.models.ThreatIntelligenceIndicatorModel; import java.util.Arrays; /** Samples for ThreatIntelligenceIndicator ReplaceTags. */ public final class ThreatIntelligenceIndicatorReplaceTagsSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/ReplaceTagsThreatIntelligence.json */ /** * Sample code: Replace tags to a Threat Intelligence. @@ -29,6 +28,6 @@ public static void replaceTagsToAThreatIntelligence( new ThreatIntelligenceIndicatorModel() .withEtag("\"0000262c-0000-0800-0000-5e9767060000\"") .withThreatIntelligenceTags(Arrays.asList("patching tags")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java index 3ab41f9ce6d62..6895732b68078 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/ThreatIntelligenceIndicatorsOperationListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for ThreatIntelligenceIndicatorsOperation List. */ public final class ThreatIntelligenceIndicatorsOperationListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/threatintelligence/GetThreatIntelligence.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/threatintelligence/GetThreatIntelligence.json */ /** * Sample code: Get all threat intelligence indicators. @@ -20,6 +18,6 @@ public static void getAllThreatIntelligenceIndicators( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { manager .threatIntelligenceIndicatorsOperations() - .list("myRg", "myWorkspace", null, null, null, null, Context.NONE); + .list("myRg", "myWorkspace", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java new file mode 100644 index 0000000000000..bd6b7bd106bc4 --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/TriggeredAnalyticsRuleRunOperationGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +/** Samples for TriggeredAnalyticsRuleRunOperation Get. */ +public final class TriggeredAnalyticsRuleRunOperationGetSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRun_Get.json + */ + /** + * Sample code: triggeredAnalyticsRuleRun_Get. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void triggeredAnalyticsRuleRunGet( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .triggeredAnalyticsRuleRunOperations() + .getWithResponse( + "myRg", "myWorkspace", "65360bb0-8986-4ade-a89d-af3cf44d28aa", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java new file mode 100644 index 0000000000000..ef5aa3e5600fd --- /dev/null +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/UpdateRecommendationSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.securityinsights.generated; + +import com.azure.resourcemanager.securityinsights.models.RecommendationPatch; +import com.azure.resourcemanager.securityinsights.models.State; +import java.util.Arrays; +import java.util.UUID; + +/** Samples for Update Recommendation. */ +public final class UpdateRecommendationSamples { + /* + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/recommendations/PatchRecommendation.json + */ + /** + * Sample code: Creates a recommendation. + * + * @param manager Entry point to SecurityInsightsManager. + */ + public static void createsARecommendation( + com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { + manager + .updates() + .recommendation( + "myRg", + "myWorkspace", + UUID.fromString("6d4b54eb-8684-4aa3-a156-3aa37b8014bc"), + Arrays.asList(new RecommendationPatch().withState(State.ACTIVE)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java index f6508ac2af4a5..66e68115f7b6b 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for WatchlistItems CreateOrUpdate. */ public final class WatchlistItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlistItem.json */ /** * Sample code: Creates or updates a watchlist item. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java index 95b63e3a64e9e..9ab18e399cef9 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Delete. */ public final class WatchlistItemsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlistItem.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/DeleteWatchlistItem.json */ /** * Sample code: Delete a watchlist Item. @@ -21,6 +19,10 @@ public static void deleteAWatchlistItem( manager .watchlistItems() .deleteWithResponse( - "myRg", "myWorkspace", "highValueAsset", "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "4008512e-1d30-48b2-9ee2-d3612ed9d3ea", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java index e86b44a1108a0..aef50552e69b2 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems Get. */ public final class WatchlistItemsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItemById.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistItemById.json */ /** * Sample code: Get a watchlist item. @@ -20,6 +18,10 @@ public static void getAWatchlistItem(com.azure.resourcemanager.securityinsights. manager .watchlistItems() .getWithResponse( - "myRg", "myWorkspace", "highValueAsset", "3f8901fe-63d9-4875-9ad5-9fb3b8105797", Context.NONE); + "myRg", + "myWorkspace", + "highValueAsset", + "3f8901fe-63d9-4875-9ad5-9fb3b8105797", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java index 7fe192510721d..4c9ba2c72f97e 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistItemsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for WatchlistItems List. */ public final class WatchlistItemsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistItems.json */ /** * Sample code: Get all watchlist Items. @@ -18,6 +16,6 @@ public final class WatchlistItemsListSamples { */ public static void getAllWatchlistItems( com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, Context.NONE); + manager.watchlistItems().list("myRg", "myWorkspace", "highValueAsset", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java index d668e090cc94b..7a023bc1c4ae0 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Watchlists CreateOrUpdate. */ public final class WatchlistsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlistAndWatchlistItems.json */ /** * Sample code: Creates or updates a watchlist and bulk creates watchlist items. @@ -36,7 +36,7 @@ public static void createsOrUpdatesAWatchlistAndBulkCreatesWatchlistItems( } /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/CreateWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/CreateWatchlist.json */ /** * Sample code: Creates or updates a watchlist. diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java index 173a9fdce43f9..f75409e979a43 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Delete. */ public final class WatchlistsDeleteSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/DeleteWatchlist.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/DeleteWatchlist.json */ /** * Sample code: Delete a watchlist. @@ -17,6 +15,8 @@ public final class WatchlistsDeleteSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void deleteAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().deleteWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager + .watchlists() + .deleteWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java index 5de292dd4f01a..70b6e638a549f 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists Get. */ public final class WatchlistsGetSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlistByAlias.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlistByAlias.json */ /** * Sample code: Get a watchlist. @@ -17,6 +15,6 @@ public final class WatchlistsGetSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAWatchlist(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", Context.NONE); + manager.watchlists().getWithResponse("myRg", "myWorkspace", "highValueAsset", com.azure.core.util.Context.NONE); } } diff --git a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java index 1ff890f70c810..496eb73b6d622 100644 --- a/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java +++ b/sdk/securityinsights/azure-resourcemanager-securityinsights/src/samples/java/com/azure/resourcemanager/securityinsights/generated/WatchlistsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.securityinsights.generated; -import com.azure.core.util.Context; - /** Samples for Watchlists List. */ public final class WatchlistsListSamples { /* - * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2022-09-01-preview/examples/watchlists/GetWatchlists.json + * x-ms-original-file: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2023-02-01-preview/examples/watchlists/GetWatchlists.json */ /** * Sample code: Get all watchlists. @@ -17,6 +15,6 @@ public final class WatchlistsListSamples { * @param manager Entry point to SecurityInsightsManager. */ public static void getAllWatchlists(com.azure.resourcemanager.securityinsights.SecurityInsightsManager manager) { - manager.watchlists().list("myRg", "myWorkspace", null, Context.NONE); + manager.watchlists().list("myRg", "myWorkspace", null, com.azure.core.util.Context.NONE); } }